Video broadcasting method and device in a kind of application program
Technical field
This application involves the video broadcasting methods and device in software technology field more particularly to a kind of application program.
Background technique
Currently, if user is when using APP1, it is desirable to when watching the video of a certain website of the push of APP1, general benefit
It is carried out with the Software Development Kit (abbreviation: SDK, foreign language full name: Software Development Kit) carried in mobile phone
Video playing, but before SDK plays video, user can be prompted to need mobile phone that the corresponding APP2 in the source video sequence website is installed,
That is, user, which needs first to install the APP2 in mobile phone just, can play the video that user wants viewing.
However, cumbersome when user is according to prompt installation APP2, it has not been convenient to, and the APP of the new installation will occupy hand
Resource in machine.
Summary of the invention
In order to solve the above-mentioned technical problem or it at least is partially solved above-mentioned technical problem, this application provides one kind to answer
With the video broadcasting method and device in program.
In a first aspect, being applied to terminal, the method this application provides the video broadcasting method in a kind of application program
Include:
In application program operational process, detect whether that receiving user plays target video by the application program
Video playing request;
If receiving the video playing request, the browsing being embedded in by the first video playback window in the application program
Device assembly obtains the corresponding video flowing of the target video in the source video sequence website of the target video;
Play the video flowing.
Optionally, the browser component by the application program is in the source video sequence website of the target video
It is middle to obtain the corresponding video flowing of the target video, comprising:
It is opened in default website and is embedded by the browser component that the first video playback window in the application program is embedded in
The second video playback window, to be sent using second video playback window to server corresponding with the default website
Video connection request, and then the server is made to obtain the target video pair in the source video sequence website of the target video
The video flowing answered.
Optionally, the method also includes:
When receiving video playing request, the video of the target video is extracted in video playing request
Mark;
Source video sequence corresponding with video identifier website is obtained in preset configuration table.
Second aspect, the embodiment of the invention provides the video broadcasting methods in a kind of application program, are applied to server,
The described method includes:
If receiving the video connection request of application program transmission, request to connect using preset video access component accesses
Target video source video sequence website;
Obtain video flowing corresponding with the video in the source video sequence website;
Give the video stream to the default website.
Optionally, the method also includes:
When receiving the video connection request, the mark and view of target video are extracted in the video connection request
Frequency source web;
The mark of the target video and source video sequence website are sent to the browser access component.
The third aspect, the embodiment of the invention provides the video play device in a kind of application program, described device includes:
Detection module, for detecting whether that receiving user passes through the application program in application program operational process
Play the video playing request of target video;
First obtains module, if passing through the first video in the application program for receiving the video playing request
The browser component of broadcast window insertion, it is corresponding in the source video sequence website of the target video to obtain the target video
Video flowing;
Playing module, for playing the video flowing.
Optionally, described first module is obtained, is also used to:
It is opened in default website and is embedded by the browser component that the first video playback window in the application program is embedded in
The second video playback window, to be sent using second video playback window to server corresponding with the default website
Video connection request, and then the server is made to obtain the target video pair in the source video sequence website of the target video
The video flowing answered.
Optionally, described device further include:
First extraction module, for being extracted in video playing request when receiving video playing request
The video identifier of the target video;
Second obtains module, for obtaining source video sequence corresponding with video identifier website in preset configuration table.
Fourth aspect, the embodiment of the invention provides the video play device in a kind of application program, described device includes:
Access modules, if the video connection request for receiving application program transmission, utilizes preset video access group
The source video sequence website of the target video of part access request connection;
Third obtains module, for obtaining video flowing corresponding with the video in the source video sequence website;
First sending module, for giving the video stream to the default website.
Optionally, described device further include:
Second extraction module, for being extracted in the video connection request when receiving the video connection request
The mark of target video and source video sequence website;
Second sending module is visited for the mark of the target video and source video sequence website to be sent to the browser
Ask component.
Above-mentioned technical proposal provided by the embodiments of the present application has the advantages that compared with prior art
The embodiment of the present invention passes through application program, the corresponding default website of application program and the corresponding server in default website
Information interaction, when making to play from the video of other source video sequence websites, it appears that as the broadcasting in application program,
But it is actually to be played using webpage, without installing additional application, operation outside unordered user's amount of imports, easy to operate, section
Save terminal resource.
Detailed description of the invention
The drawings herein are incorporated into the specification and forms part of this specification, and shows and meets implementation of the invention
Example, and be used to explain the principle of the present invention together with specification.
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below
There is attached drawing needed in technical description to be briefly described, it should be apparent that, for those of ordinary skill in the art
Speech, without any creative labor, is also possible to obtain other drawings based on these drawings.
Fig. 1 is the flow chart of the video broadcasting method in a kind of application program provided by the embodiments of the present application;
Fig. 2 is the flow chart of the video broadcasting method in another application program provided by the embodiments of the present application;
Fig. 3 is the structure chart of the video play device in a kind of application program provided by the embodiments of the present application;
Fig. 4 is the structure chart of the video play device in another application program provided by the embodiments of the present application.
Specific embodiment
To keep the purposes, technical schemes and advantages of the embodiment of the present application clearer, below in conjunction with the embodiment of the present application
In attached drawing, the technical scheme in the embodiment of the application is clearly and completely described, it is clear that described embodiment is
A part of the embodiment of the application, instead of all the embodiments.Based on the embodiment in the application, ordinary skill people
Member's every other embodiment obtained without making creative work, shall fall in the protection scope of this application.
Since user is when needing to play the video of source video sequence corresponding with APP2 website using APP1, need according to mentioning
Show cumbersome when installation APP2, it has not been convenient to, and the APP of the new installation will occupy the resource in mobile phone.For this purpose, in the present invention
One embodiment in, provide the video broadcasting method in a kind of application program, the method can be applied to terminal, exemplary
, terminal can refer to mobile phone or tablet computer etc., and the terminal is connect with server by communication link, and terminal can pass through
Communication link and server transmit information, as shown in Figure 1, which comprises
Step S101 detects whether that receive user is played by the application program in application program operational process
The video playing of target video is requested;
In embodiments of the present invention, user can trigger life by way of the video play button in pressing application program
It is requested at video playing.
Step S102 passes through the first video playback window in the application program if receiving the video playing request
The browser component of insertion obtains the corresponding video flowing of the target video in the source video sequence website of the target video;
When receiving video playing request, the target video can be extracted in video playing request
Video identifier;Source video sequence corresponding with video identifier website is obtained in preset configuration table.
In this step, the browser component that can be embedded in by the first video playback window in the application program is opened
The second video playback window embedded in default website, with using second video playback window to the default website pair
The server answered sends video connection request, and then obtains the server in the source video sequence website of the target video
The corresponding video flowing of the target video.
Illustratively, default website can refer to the official website of application program, embed the second video playing window in advance in official website
Mouthful, the second video playback window is connected to the corresponding server in official website.
Step S103 plays the video flowing.
The embodiment of the present invention passes through application program, the corresponding default website of application program and the corresponding server in default website
Information interaction, when making to play from the video of other source video sequence websites, it appears that as the broadcasting in application program,
But it is actually to be played using webpage, without installing additional application, operation outside unordered user's amount of imports, easy to operate, section
Save terminal resource.
In another embodiment of the present invention, the video broadcasting method in a kind of application program is also provided, the method can
To be applied to server, as shown in Figure 2, which comprises
Step S201 is visited if receiving the video connection request of application program transmission using preset video access component
Ask the source video sequence website of the target video of request connection;
The mark of target video can be extracted in the video connection request when receiving the video connection request
And source video sequence website;The mark of the target video and source video sequence website are sent to the browser access component.
In embodiments of the present invention, browser access component can refer to that Java Scrip, browser access component can be adjusted
With the webpage version video of access source video sequence website, so that user appears like the broadcasting in an application program, but practical
On be to be played using webpage.
Step S202 obtains video flowing corresponding with the video in the source video sequence website;
Step S203 gives the video stream to the default website.
The embodiment of the present invention is by the information exchange between server and default website, so that playing from other videos
When the video of source web, without installing additional application, operation outside unordered user's amount of imports is easy to operate, saves terminal money
Source.
In another embodiment of the present invention, the video play device in a kind of application program is also provided, as shown in figure 3,
Described device includes:
Detection module 11, in application program operational process, detecting whether to receive user by described using journey
Sequence plays the video playing request of target video;
First obtains module 12, if passing through the first view in the application program for receiving the video playing request
The browser component of frequency broadcast window insertion, it is corresponding to obtain the target video in the source video sequence website of the target video
Video flowing;
Playing module 13, for playing the video flowing.
In another embodiment of the present invention, described first obtains module, is also used to:
It is opened in default website and is embedded by the browser component that the first video playback window in the application program is embedded in
The second video playback window, to be sent using second video playback window to server corresponding with the default website
Video connection request, and then the server is made to obtain the target video pair in the source video sequence website of the target video
The video flowing answered.
In another embodiment of the present invention, described device further include:
First extraction module, for being extracted in video playing request when receiving video playing request
The video identifier of the target video;
Second obtains module, for obtaining source video sequence corresponding with video identifier website in preset configuration table.
In another embodiment of the present invention, the video play device in a kind of application program is also provided, as shown in figure 4,
Described device includes:
Access modules 21, if the video connection request for receiving application program transmission, utilizes preset video access
The source video sequence website of the target video of component accesses request connection;
Third obtains module 22, for obtaining video flowing corresponding with the video in the source video sequence website;
First sending module 23, for giving the video stream to the default website.
In another embodiment of the present invention, described device further include:
Second extraction module, for being extracted in the video connection request when receiving the video connection request
The mark of target video and source video sequence website;
Second sending module is visited for the mark of the target video and source video sequence website to be sent to the browser
Ask component.
It should be noted that, in this document, the relational terms of such as " first " and " second " or the like are used merely to one
A entity or operation with another entity or operate distinguish, without necessarily requiring or implying these entities or operation it
Between there are any actual relationship or orders.Moreover, the terms "include", "comprise" or its any other variant are intended to
Cover non-exclusive inclusion, so that the process, method, article or equipment for including a series of elements not only includes those
Element, but also including other elements that are not explicitly listed, or further include for this process, method, article or setting
Standby intrinsic element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that
There is also other identical elements in the process, method, article or apparatus that includes the element.
The above is only a specific embodiment of the invention, is made skilled artisans appreciate that or realizing this hair
It is bright.Various modifications to these embodiments will be apparent to one skilled in the art, as defined herein
General Principle can be realized in other embodiments without departing from the spirit or scope of the present invention.Therefore, of the invention
It is not intended to be limited to the embodiments shown herein, and is to fit to and applied principle and features of novelty phase one herein
The widest scope of cause.