CN105208442B - A kind of video broadcasting method and device of video playing application program - Google Patents
A kind of video broadcasting method and device of video playing application program Download PDFInfo
- Publication number
- CN105208442B CN105208442B CN201410302706.3A CN201410302706A CN105208442B CN 105208442 B CN105208442 B CN 105208442B CN 201410302706 A CN201410302706 A CN 201410302706A CN 105208442 B CN105208442 B CN 105208442B
- Authority
- CN
- China
- Prior art keywords
- video
- current page
- source address
- application program
- labels
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/02—Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L65/00—Network arrangements, protocols or services for supporting real-time applications in data packet communication
- H04L65/60—Network streaming of media packets
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
- H04N21/433—Content storage operation, e.g. storage operation in response to a pause request, caching operations
- H04N21/4333—Processing operations in response to a pause request
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/47—End-user applications
- H04N21/478—Supplemental services, e.g. displaying phone caller identification, shopping application
- H04N21/4782—Web browsing, e.g. WebTV
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/80—Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
- H04N21/81—Monomedia components thereof
- H04N21/8166—Monomedia components thereof involving executable data, e.g. software
- H04N21/8173—End-user applications, e.g. Web browser, game
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/80—Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
- H04N21/81—Monomedia components thereof
- H04N21/8166—Monomedia components thereof involving executable data, e.g. software
- H04N21/8193—Monomedia components thereof involving executable data, e.g. software dedicated tools, e.g. video decoder software or IPMP tool
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/80—Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
- H04N21/85—Assembly of content; Generation of multimedia applications
- H04N21/858—Linking data to content, e.g. by linking an URL to a video object, by creating a hotspot
- H04N21/8586—Linking data to content, e.g. by linking an URL to a video object, by creating a hotspot by using a URL
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/47—End-user applications
- H04N21/478—Supplemental services, e.g. displaying phone caller identification, shopping application
- H04N21/4788—Supplemental services, e.g. displaying phone caller identification, shopping application communicating with other users, e.g. chatting
Landscapes
- Engineering & Computer Science (AREA)
- Signal Processing (AREA)
- Multimedia (AREA)
- General Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Computer Networks & Wireless Communication (AREA)
- Stored Programmes (AREA)
- Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
- Information Transfer Between Computers (AREA)
Abstract
本发明提供了一种视频播放应用程序的视频播放方法及装置,包括:监控当前页面,该当前页面是在视频播放应用程序的网页控件内显示的网页;在确定当前页面设置了有效的视频源地址时,获取视频源地址;根据视频源地址获取视频源,并调用视频播放应用程序指定的播放器进行播放。采用本发明所提供的技术方案,监控当前页面,以及确定当前页面是否设置了有效的视频源地址,获取视频源地址,调用视频播放应用程序指定的播放器进行播放的实施,涉及的是页面上的操作,都可以通过浏览器控件来实施,都与浏览器内核无关,因此方案操作实现简单、无需对浏览器底层进行复杂修改。
The present invention provides a video playing method and device of a video playing application program, comprising: monitoring the current page, which is a web page displayed in the web page control of the video playing application program; determining that an effective video source is set on the current page address, get the video source address; get the video source according to the video source address, and call the player specified by the video playback application to play. Adopting the technical scheme provided by the present invention, monitoring the current page, and determining whether the current page is provided with a valid video source address, obtaining the video source address, calling the player specified by the video playback application program to play, involves the implementation on the page All operations can be implemented through browser controls and have nothing to do with the browser kernel. Therefore, the operation of the solution is simple to implement and does not require complex modifications to the bottom layer of the browser.
Description
技术领域technical field
本发明涉及视频处理领域,尤其涉及一种视频播放应用程序的视频播放方法及装置。The invention relates to the field of video processing, in particular to a video playing method and device for a video playing application program.
背景技术Background technique
在现有技术中,一些视频播放应用程序为了丰富视频播放的内容,通常与一些视频网站进行合作,以便能够播放更多的视频,这些视频播放应用程序在播放合作网站上的视频时,需要进入这些网站进行播放,这时就产生了选择哪个播放器播放这些视频的问题。In the prior art, in order to enrich the content of video playback, some video playback applications usually cooperate with some video websites so as to play more videos. When these video playback applications play videos on cooperative websites, they need to enter These websites play, and at this moment, the problem of choosing which player to play these videos arises.
例如,在视频播放应用程序中嵌入html(Hyper Text Markup Language,超文本标记语言)5页面进行内容展示,当页面中包含视频内容时,在决定采用哪个播放器对该视频内容进行播放时,视频的播放行为一般由系统浏览器决定,也即,由系统浏览器决定是采用预定的播放器进行播放、或者是直接在网页页面上播放、或者是弹出提示框提示用户选择哪个播放器进行播放。For example, html (Hyper Text Markup Language, Hypertext Markup Language) 5 pages are embedded in a video playback application program for content display. When the page contains video content, when deciding which player to use to play the video content, the video The playback behavior of .
然而,系统浏览器指定的播放器可能在当前的视频播放应用程序中并不能正常播放;或者是在一种移动设备上可以播放,在另一种移动设备上不能播放,使得这中选择播放器的方式可扩展性不强。However, the player specified by the system browser may not be able to play normally in the current video playback application; or it can be played on one mobile device, but not on another mobile device, so that the selected player The way scalability is not strong.
为了解决这个问题,目前各种产品解决这个方案的方法为:In order to solve this problem, the current methods of various products to solve this problem are as follows:
(1)通过使用自定义浏览器内核,并自行实现浏览器内部的播放接口,从而在播放时拦截播放操作;但其不足在于,需要自定义浏览器内核,工作量较大,实现较为复杂。(1) By using a custom browser kernel and implementing the playback interface inside the browser by itself, the playback operation is intercepted during playback; but the disadvantage is that a custom browser kernel is required, which requires a large workload and complicated implementation.
(2)通过Hook技术拦截浏览器内核调用播放器的接口,从而在无法自定义浏览器内核的情况下拦截播放操作;但其不足在于,需要对浏览器进行较为复杂的Hook操作,难以稳定实现,也容易受浏览器内核版本升级的影响。(2) Intercept the interface of the browser kernel calling the player through Hook technology, so as to intercept the playback operation when the browser kernel cannot be customized; but its disadvantage is that it needs to perform more complicated Hook operations on the browser, which is difficult to implement stably , are also vulnerable to browser kernel version upgrades.
因此,现有技术的不足在于:缺少一种简便的在视频播放应用程序中指定播放器播放视频的方式。Therefore, the deficiency of the prior art is that it lacks an easy way to specify a player to play video in the video playing application program.
发明内容Contents of the invention
本发明实施例中提供了一种视频播放应用程序的视频播放方法及装置,使得在视频播放应用程序中播放视频时,能够以简单的方式实现指定播放器。Embodiments of the present invention provide a video playing method and device for a video playing application, so that when playing a video in the video playing application, a specified player can be realized in a simple manner.
本发明实施例中提供了一种视频播放应用程序的视频播放方法,包括如下步骤:An embodiment of the present invention provides a video playback method for a video playback application, comprising the following steps:
监控当前页面,所述当前页面是在视频播放应用程序的网页控件内显示的网页;Monitoring the current page, the current page is a webpage displayed in the webpage control of the video playback application;
在确定当前页面设置了有效的视频源地址时,获取视频源地址;When it is determined that a valid video source address is set on the current page, obtain the video source address;
根据所述视频源地址获取视频源,并调用视频播放应用程序指定的播放器进行播放。Obtain the video source according to the video source address, and call the player specified by the video playing application program to play.
本发明实施例中还提供了一种视频播放应用程序的视频播放装置,包括:The embodiment of the present invention also provides a video playback device for a video playback application, including:
监控模块,用于监控当前页面,该当前页面是在视频播放应用程序的网页控件内显示的网页;The monitoring module is used to monitor the current page, which is a webpage displayed in the webpage control of the video playback application program;
获取模块,用于在确定当前页面设置了有效的视频源地址时,获取视频源地址;The obtaining module is used to obtain the video source address when it is determined that a valid video source address is set on the current page;
播放模块,用于根据该视频源地址获取视频源,并调用视频播放应用程序指定的播放器进行播放。The playback module is used to obtain the video source according to the video source address, and call the player specified by the video playback application to play.
本发明的有益效果如下:The beneficial effects of the present invention are as follows:
在本发明实施例所提供的技术方案中,监控当前页面,以及确定当前页面是否设置了有效的视频源地址,获取视频源地址,调用视频播放应用程序指定的播放器进行播放的实施,涉及的是页面上的操作,都可以通过浏览器控件来实施,都与浏览器内核无关,因此方案实施简单、运行稳定,也不受浏览器内核的改动影响。In the technical solution provided by the embodiment of the present invention, monitor the current page, and determine whether the current page is set with a valid video source address, obtain the video source address, and call the player specified by the video playback application program to play the implementation, involving All operations on the page can be implemented through browser controls, and have nothing to do with the browser kernel. Therefore, the implementation of the solution is simple, the operation is stable, and it is not affected by changes in the browser kernel.
具体的,监控当前页面,以及确定当前页面是否设置了有效的视频源地址,获取视频源地址;是通过浏览器控件的标准接口注入脚本即可实现的方式,同时,仅需再通过浏览器控件的扩展接口提供一个接口,该脚本便可以调用视频播放应用程序指定的播放器进行播放。由于通过浏览器控件在页面注入脚本以及提供一个调用接口都是容易实现的方式,因此,本发明实施例提供的技术方案能够在视频播放应用程序中播放视频时以简单的方式实现指定播放器。Specifically, monitor the current page, determine whether the current page has a valid video source address, and obtain the video source address; this can be achieved by injecting scripts through the standard interface of the browser control, and at the same time, only through the browser control The extension interface of provides an interface, and the script can call the player specified by the video playback application to play. Since injecting scripts into a page through a browser control and providing a calling interface are both easy to implement, the technical solution provided by the embodiment of the present invention can implement a specified player in a simple manner when playing a video in a video playing application.
附图说明Description of drawings
下面将参照附图描述本发明的具体实施例,其中:Specific embodiments of the present invention will be described below with reference to the accompanying drawings, wherein:
图1为本发明实施例视频播放应用程序的视频播放方法实施流程示意图;FIG. 1 is a schematic diagram of the implementation flow of a video playback method of a video playback application program according to an embodiment of the present invention;
图2为本发明实施例视频播放应用程序的视频播放装置结构示意图。FIG. 2 is a schematic structural diagram of a video playback device for a video playback application program according to an embodiment of the present invention.
具体实施方式Detailed ways
为了使本发明的技术方案及优点更加清楚明白,以下结合附图对本发明的示例性实施例进行进一步详细的说明,显然,所描述的实施例仅是本发明的一部分实施例,而不是所有实施例的穷举。In order to make the technical solutions and advantages of the present invention clearer, the exemplary embodiments of the present invention will be further described in detail below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all implementations. Exhaustive list of examples.
图1为视频播放应用程序的视频播放方法实施流程示意图,如图所示,可以包括如下步骤:Figure 1 is a schematic diagram of the implementation process of a video playback method for a video playback application, as shown in the figure, may include the following steps:
步骤101、监控当前页面,所述当前页面是在视频播放应用程序的网页控件内显示的网页;Step 101, monitor the current page, the current page is a webpage displayed in the webpage control of the video playback application;
步骤102、在确定当前页面设置了有效的视频源地址时,获取视频源地址;Step 102, when it is determined that a valid video source address is set on the current page, obtain the video source address;
步骤103、根据所述视频源地址获取视频源,并调用视频播放应用程序指定的播放器进行播放。Step 103, obtain the video source according to the video source address, and call the player specified by the video playing application program to play.
实施中,可以通过向当前页面注入一段脚本的方式来实施上述步骤,具体实施中,只需通过浏览器控件的标准接口即可向当前页面注入实现该步骤的脚本,这是本领域技术人员容易实现的。During implementation, the above steps can be implemented by injecting a section of script into the current page. In specific implementation, the script for realizing this step can be injected into the current page only through the standard interface of the browser control, which is easy for those skilled in the art. Achieved.
实施中,监控当前页面时,监控的可以是当前页面的Video标签;During implementation, when monitoring the current page, the Video tag of the current page may be monitored;
可以在确定Video标签中设置了有效的视频源地址时,确定当前页面设置了有效的视频源地址;When it is determined that a valid video source address is set in the Video tag, it can be determined that a valid video source address is set on the current page;
获取视频源地址,可以是获取Video标签正在播放的视频源地址。Get the source address of the video, which can be the source address of the video being played by the Video tag.
在实施中以Video标签为例,是因为当前页面中较为常见,也最容易实施,因此以之为例;但是,用其它的方式也是可以的,Video标签主要针对的是html5页面的实施,事实上,在其他制式或者标准下,只要能够实现监控当前页面、获取视频源地址的目的,用其他标签、控件等也能实施;本例中,Video标签仅用于教导本领域技术人员具体如何实施本发明,但不意味仅能使用Video标签一种方式,实施过程中可以结合实践需要来确定相应的方式。In the implementation, the Video tag is used as an example because it is relatively common in the current page and is the easiest to implement, so it is used as an example; however, it is also possible to use other methods. The Video tag is mainly aimed at the implementation of html5 pages. In fact, In other formats or standards, as long as the purpose of monitoring the current page and obtaining the video source address can be achieved, other tags and controls can also be used; in this example, the Video tag is only used to teach those skilled in the art how to implement The present invention does not mean that only one method of using the Video tag can be used, and the corresponding method can be determined in combination with practical needs during implementation.
实施中,监控当前页面的Video标签,可以是在网页控件内的网页更新完成时开始监控的。In implementation, the monitoring of the Video tag of the current page may be started when the update of the webpage in the webpage control is completed.
实施中,获取Video标签正在播放的视频源地址,可以是通过当前页面的DOM(Document Object Model,文档对象模型)结构获取的。During implementation, the acquisition of the source address of the video being played by the Video tag may be acquired through the DOM (Document Object Model, Document Object Model) structure of the current page.
实施中,还可以进一步包括:创建定时器;则监控当前页面的Video标签,可以是在定时器执行时进行监控的。In implementation, it may further include: creating a timer; then monitoring the Video tag of the current page may be monitored when the timer is executed.
实施中,还可以进一步包括:在确定Video标签中设置了有效的视频源地址时,可以将Video标签的播放状态修改为暂停。In implementation, it may further include: when it is determined that a valid video source address is set in the Video tag, modifying the playback state of the Video tag to pause.
具体实施中,本步骤的作用在于监控开始播放的行为,因为只有这个时候,才比较容易确定Video标签已经设置了有效的视频源地址。具体的则可以通过监控Video标签的视频源地址参数src,当发现src中已经设置了有效的视频地址,则代表开始播放,就可以将Video标签的播放状态修改为暂停。In specific implementation, the function of this step is to monitor the behavior of starting to play, because only at this time, it is relatively easy to determine that the Video tag has been set with a valid video source address. Specifically, by monitoring the video source address parameter src of the Video tag, when it is found that a valid video address has been set in src, it means that the playback starts, and the playback status of the Video tag can be modified to pause.
实施中,调用视频播放应用程序指定的播放器进行播放,可以包括:In the implementation, calling the player specified by the video playback application to play may include:
通过浏览器控件的扩展接口向当前页面提供播放接口;Provide a playback interface to the current page through the extended interface of the browser control;
通过该播放接口调用视频播放应用程序指定的播放器进行播放。Call the player specified by the video playback application program through this playback interface to play.
下面以Video标签为例进行说明。The following uses the Video tag as an example for illustration.
在调用视频播放应用程序指定的播放器进行播放时,需要用到播放接口,则可以提前通过浏览器控件的扩展接口向当前页面提供播放接口。具体的,视频播放应用程序可以使用系统默认浏览器控件向当前页面提供播放接口,向当前页面提供播放接口,是指为当前网页内的页面脚本程序提供一个调用视频播放应用程序指定播放器的入口。页面脚本程序下述简称为脚本,脚本是批处理文件的延伸,是一种纯文本保存的程序,一般来说的计算机脚本程序是确定的一系列控制计算机进行运算操作动作的组合,在其中可以实现一定的逻辑分支等。脚本简单地说就是一条条的文字命令,这些文字命令是可以看到的(如可以用记事本打开查看、编辑),脚本程序在执行时,是由系统的一个解释器,将其一条条的翻译成机器可识别的指令,并按程序顺序执行。脚本通常可以由应用程序临时调用并执行。各类脚本被广泛地应用于网页设计中。When the player specified by the video playback application is called to play, the playback interface is needed, and the playback interface can be provided to the current page through the extension interface of the browser control in advance. Specifically, the video playback application can use the default browser control of the system to provide a playback interface to the current page. Providing a playback interface to the current page refers to providing an entry for the page script program in the current web page to call the specified player of the video playback application. . The page script program is hereinafter referred to as the script. The script is an extension of the batch file. Realize certain logical branches, etc. Simply put, a script is a series of text commands, which can be seen (for example, you can use Notepad to open, view and edit). Translate into machine-recognizable instructions and execute them in sequence. Scripts can usually be invoked and executed temporarily by applications. Various scripts are widely used in web design.
实施中,提供播放接口方式可以有多种,比如:通过浏览器控件的扩展接口向当前页面的脚本提供播放接口,脚本的实施在下面进行说明。In the implementation, there are many ways to provide the playback interface, for example: providing the playback interface to the script of the current page through the extension interface of the browser control, and the implementation of the script will be described below.
通过浏览器控件的扩展接口向当前页面的脚本提供播放接口的具体实施可以如下:The specific implementation of providing the playback interface to the script of the current page through the extended interface of the browser control can be as follows:
向javascript脚本提供可调用的接口,比如安卓的WebView控件通过addJavascriptInterface方式就可以向浏览器控件中运行的javascript脚本提供一个接口。因此,视频播放应用程序可以将调用播放器的功能封装为一个接口,然后将这个扩展接口提供给当前页面上的脚本。Provide a callable interface to the javascript script, for example, the Android WebView control can provide an interface to the javascript script running in the browser control through the addJavascriptInterface method. Therefore, the video playing application can encapsulate the function of invoking the player as an interface, and then provide this extended interface to the script on the current page.
具体实现视频播放应用程序的视频播放方法时,可以采用编写脚本的方式来实现,也即通过脚本的编写来自动实现监控当前页面、获取视频源地址、调用接口等。When specifically implementing the video playing method of the video playing application program, it can be implemented by writing a script, that is, by writing the script to automatically monitor the current page, obtain the video source address, call the interface, and the like.
则在实施中,每当网页控件内的网页更新完成时,就可以通过浏览器控件的标准接口,向当前页面注入一段实现上述功能的脚本;Then in implementation, whenever the webpage update in the webpage control is completed, a section of script that realizes the above functions can be injected into the current page through the standard interface of the browser control;
进一步的,脚本还可以实现以下功能:Furthermore, the script can also implement the following functions:
创建一个定时器T,则监控当前页面的Video标签,可以是在定时器执行时进行监控,设定定时器以后,即可按照需要通过定时器的设置来控制实施例中提供的方案的实施;Create a timer T to monitor the Video tag of the current page, which can be monitored when the timer is executed. After the timer is set, the implementation of the scheme provided in the embodiment can be controlled by setting the timer as required;
这样,通过脚本的执行可以实现:在定时器T执行时,监控当前页面中的Video标签,假如Video标签中设置了有效的视频源地址处于播放状态,则通过当前页面的DOM结构,获取Video标签正在播放的视频源地址,并将Video标签的播放状态修改为暂停;然后根据获取的Video标签正在播放的视频源地址,获取视频源,采用视频播放应用程序本身指定的播放器进行视频播放。In this way, through the execution of the script, it can be realized: when the timer T is executed, monitor the Video tag in the current page, if the Video tag is set to a valid video source address and is playing, then get the Video tag through the DOM structure of the current page The source address of the video being played, and modify the playback state of the Video tag to pause; then, according to the acquired video source address of the video tag being played, obtain the video source, and use the player specified by the video playback application itself to play the video.
获取Video标签正在播放的视频源地址具体可以是:以HTML5的标准播放器控件video标签为例,它含有src、poster、preload、autoplay、loop、controls、height、width等属性。其中,src属性是用于指定视频的地址;poster属性用于指定一张图片;autoplay用于设置视频是否自动播放,当出现这一属性时表示自动播放;loop属性用于指定视频是否循环播放。Obtaining the source address of the video being played by the Video tag can specifically be: Take the HTML5 standard player control video tag as an example, which contains attributes such as src, poster, preload, autoplay, loop, controls, height, and width. Among them, the src attribute is used to specify the address of the video; the poster attribute is used to specify a picture; autoplay is used to set whether the video is automatically played, and when this attribute appears, it means automatic playback; the loop attribute is used to specify whether the video is played in a loop.
HTML5提供有新的Video标签,具体代码如下:HTML5 provides a new Video tag, the specific code is as follows:
在检测到该Video标签里的状态为播放(可以是自动播放或者是指定时间播放),就可获取到Video标签里的src参数对应的视频源地址(也即上述举例的“http://media.w3.org/2010/05/sintel/trailer.ogv”)。After detecting that the status in the Video tag is playing (it can be automatically played or played at a specified time), you can get the video source address corresponding to the src parameter in the Video tag (that is, the above example "http://media .w3.org/2010/05/sintel/trailer.ogv”).
将Video标签的播放状态修改为暂停的方式,使得网页的视频并不会按照现有技术播放,呈献给用户的只是视频播放应用程序指定的播放器播放的视频,使得用户感知良好。Modifying the playback state of the Video tag to a pause mode makes the video on the webpage not play according to the prior art, and what is presented to the user is only the video played by the player specified by the video playback application program, which makes the user feel good.
基于同一发明构思,本发明还提供了一种视频播放应用程序的视频播放装置,由于该装置解决问题的原理与一种视频播放应用程序的视频播放方法相似,因此该装置的实施可以参见方法的实施,重复之处不再赘述。Based on the same inventive concept, the present invention also provides a video playback device for a video playback application program. Since the problem-solving principle of the device is similar to a video playback method for a video playback application program, the implementation of the device can refer to the method. implementation, the repetition will not be repeated.
图2为视频播放应用程序的视频播放装置结构示意图,如图所示,装置中可以包括:Fig. 2 is a schematic structural diagram of a video playback device of a video playback application program, as shown in the figure, the device may include:
监控模块201,用于监控当前页面,所述当前页面是在视频播放应用程序的网页控件内显示的网页;The monitoring module 201 is used to monitor the current page, and the current page is a webpage displayed in the webpage control of the video playback application;
获取模块202,用于在确定当前页面设置了有效的视频源地址时,获取视频源地址;Obtaining module 202, used for obtaining the video source address when determining that the current page is set with a valid video source address;
播放模块203,用于根据所述视频源地址获取视频源,并调用视频播放应用程序指定的播放器进行播放。The playing module 203 is configured to obtain the video source according to the video source address, and call the player specified by the video playing application program to play.
实施中,监控模块201可以进一步用于监控当前页面的Video标签。In implementation, the monitoring module 201 can be further used to monitor the Video tag of the current page.
获取模块202可以进一步用于在确定Video标签中设置了有效的视频源地址时,确定当前页面设置了有效的视频源地址;在获取视频源地址时,获取Video标签正在播放的视频源地址。The acquisition module 202 can be further used to determine that a valid video source address is set in the current page when determining that a valid video source address is set in the Video tag; when acquiring the video source address, acquire the video source address being played by the Video tag.
实施中,监控模块201可以进一步用于在网页控件内的网页更新完成时开始监控当前页面的Video标签。During implementation, the monitoring module 201 may be further configured to start monitoring the Video tag of the current page when the webpage update in the webpage control is completed.
实施中,获取模块202可以进一步用于通过当前页面的DOM结构获取Video标签正在播放的视频源地址。During implementation, the obtaining module 202 may be further used to obtain the source address of the video being played by the Video tag through the DOM structure of the current page.
实施中,可以进一步包括:定时器;In implementation, it may further include: a timer;
监控模块201可以进一步用于在定时器执行时监控当前页面的Video标签。The monitoring module 201 can be further used to monitor the Video tag of the current page when the timer is executed.
实施中,可以进一步包括:In implementation, it may further include:
暂停模块,用于在确定Video标签中设置了有效的视频源地址时,将Video标签的播放状态修改为暂停。The pause module is used to modify the playback state of the Video tag to pause when it is determined that a valid video source address is set in the Video tag.
实施中,播放模块203可以进一步用于通过浏览器控件的扩展接口向当前页面提供的播放接口调用视频播放应用程序指定的播放器进行播放。In practice, the playing module 203 can be further configured to call the player specified by the video playing application program to play the playing interface provided by the browser control extension interface to the current page.
为了描述的方便,以上所述装置的各部分以功能分为各个模块或单元分别描述。当然,在实施本发明时可以把各模块或单元的功能在同一个或多个软件或硬件中实现。For the convenience of description, each part of the device described above is divided into modules or units by function and described separately. Of course, when implementing the present invention, the functions of each module or unit can be implemented in one or more pieces of software or hardware.
下面再以用户在视频播放应用程序中播放视频的实施实例来进行说明。The implementation example in which a user plays a video in a video playing application program is used for illustration below.
视频播放应用程序通过浏览器控件的扩展接口向当前页面提供播放接口;The video playback application provides a playback interface to the current page through the extended interface of the browser control;
每当网页控件内的网页更新完成时,视频播放应用程序通过浏览器控件的标准接口,向当前页面注入一段脚本,该脚本的功能是:监控当前页面,以及确定当前页面是否设置了有效的视频源地址,获取视频源地址,调用视频播放应用程序指定的播放器进行播放。Whenever the update of the webpage in the webpage control is completed, the video playback application injects a script into the current page through the standard interface of the browser control. Source address, get the video source address, and call the player specified by the video playback application to play.
用户在视频播放应用程序显示出的页面内容上选择欲观看的视频。假设该视频是通过第三方视频网站合作获得。那么,用户点击该视频,也即在Video标签中设置了有效的视频源地址。The user selects the video to watch on the page content displayed by the video playing application program. Assume that the video is obtained through cooperation with a third-party video website. Then, when the user clicks on the video, a valid video source address is set in the Video tag.
脚本在确定Video标签中设置了有效的视频源地址时,将Video标签的播放状态修改为暂停,暂停该播放器控件的播放;获取Video标签正在播放的视频源地址,并根据视频源地址获取视频源,并调用视频播放应用程序指定的播放器进行播放。When the script determines that a valid video source address is set in the Video tag, it changes the playback status of the Video tag to pause, and pauses the playback of the player control; obtains the video source address that the Video tag is playing, and obtains the video according to the video source address source, and call the player specified by the video playback application to play.
本发明实施例所提供的技术方案不涉及系统浏览器内核改动,通过标准接口获取视频源地址并通过播放接口即可调用指定的播放器实现视频播放,因此本发明实施例所提供的技术方案不仅实现简单、无需对底层进行复杂修改;还不受操作系统限制,可以用于Android系统、iOS系统等操作系统,具有扩展性佳、跨平台可用等优点。The technical solution provided by the embodiment of the present invention does not involve the modification of the system browser kernel, and the video source address can be obtained through the standard interface and the specified player can be called to realize video playback through the playback interface. Therefore, the technical solution provided by the embodiment of the present invention not only It is simple to implement and does not require complex modifications to the bottom layer; it is not limited by the operating system and can be used in operating systems such as Android and iOS systems, and has the advantages of good scalability and cross-platform availability.
本领域的技术人员应明白,本发明的实施例可提供为方法、系统、或计算机程序产品。因此,本发明可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art should understand that the embodiments of the present invention may be provided as methods, systems, or computer program products. Accordingly, the present invention can take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
本发明是参照根据本发明实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It should be understood that each procedure and/or block in the flowchart and/or block diagram, and a combination of procedures and/or blocks in the flowchart and/or block diagram can be realized by computer program instructions. These computer program instructions may be provided to a general purpose computer, special purpose computer, embedded processor, or processor of other programmable data processing equipment to produce a machine such that the instructions executed by the processor of the computer or other programmable data processing equipment produce a An apparatus for realizing the functions specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing apparatus to operate in a specific manner, such that the instructions stored in the computer-readable memory produce an article of manufacture comprising instruction means, the instructions The device realizes the function specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded onto a computer or other programmable data processing device, causing a series of operational steps to be performed on the computer or other programmable device to produce a computer-implemented process, thereby The instructions provide steps for implementing the functions specified in the flow chart or blocks of the flowchart and/or the block or blocks of the block diagrams.
以上实施例仅用以说明本发明的技术方案,而非对其进行限制。因此,在不背离本发明的精神及其实质的情况下,本领域技术人员可作出各种改变、替换和变型。很显然,但这些改变、替换和变型都应涵盖于本发明权利要求的保护范围之内。The above embodiments are only used to illustrate the technical solution of the present invention, not to limit it. Therefore, those skilled in the art can make various changes, substitutions and alterations without departing from the spirit and essence of the present invention. Obviously, these changes, substitutions and modifications should all fall within the protection scope of the claims of the present invention.
Claims (14)
Priority Applications (3)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410302706.3A CN105208442B (en) | 2014-06-27 | 2014-06-27 | A kind of video broadcasting method and device of video playing application program |
PCT/CN2015/082372 WO2015197013A1 (en) | 2014-06-27 | 2015-06-25 | Video playing method and device for video playing application program |
US15/321,519 US20170171288A1 (en) | 2014-06-27 | 2015-06-25 | Video playing method and device for video playing application program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410302706.3A CN105208442B (en) | 2014-06-27 | 2014-06-27 | A kind of video broadcasting method and device of video playing application program |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105208442A CN105208442A (en) | 2015-12-30 |
CN105208442B true CN105208442B (en) | 2018-06-26 |
Family
ID=54936975
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410302706.3A Expired - Fee Related CN105208442B (en) | 2014-06-27 | 2014-06-27 | A kind of video broadcasting method and device of video playing application program |
Country Status (3)
Country | Link |
---|---|
US (1) | US20170171288A1 (en) |
CN (1) | CN105208442B (en) |
WO (1) | WO2015197013A1 (en) |
Families Citing this family (17)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106303638B (en) * | 2016-08-30 | 2019-09-17 | 北京奇艺世纪科技有限公司 | A kind of audio and video playing method and device based on HTML5 player |
CN108449645B (en) * | 2017-02-16 | 2022-02-01 | 腾讯科技(深圳)有限公司 | Video playing method and device based on mobile terminal iOS system |
CN108040279B (en) * | 2017-12-07 | 2021-01-08 | 麒麟合盛网络技术股份有限公司 | Video acceleration method and device |
CN108777819B (en) * | 2018-09-13 | 2019-02-05 | 上海二三四五网络科技有限公司 | A kind of control method and control device based on browser player plays video web page |
CN111158678B (en) * | 2018-11-08 | 2023-05-05 | 阿里巴巴集团控股有限公司 | Video playing method and device, client device and electronic device |
CN109756779A (en) * | 2018-12-28 | 2019-05-14 | 深圳豪客互联网有限公司 | Video broadcasting method and device in a kind of application program |
CN111523065B (en) * | 2019-02-02 | 2023-04-25 | 阿里巴巴集团控股有限公司 | Rich text data processing method and device, electronic equipment and computer storage medium |
CN110225404A (en) * | 2019-06-17 | 2019-09-10 | 深圳市正易龙科技有限公司 | Video broadcasting method, terminal and computer readable storage medium |
CN110784750B (en) * | 2019-08-13 | 2022-11-11 | 腾讯科技(深圳)有限公司 | Video playing method and device and computer equipment |
CN112911367B (en) * | 2019-12-03 | 2022-04-19 | 腾讯科技(深圳)有限公司 | Video playing interface processing method and device and electronic equipment |
CN111372137B (en) * | 2020-03-13 | 2022-11-29 | 青岛海信宽带多媒体技术有限公司 | Method and device for automatically correcting player state by browser and display equipment |
CN112135199B (en) * | 2020-09-23 | 2022-07-29 | 平安国际智慧城市科技股份有限公司 | Video playing method based on multiple types of video sources and related equipment |
CN112954431A (en) * | 2021-01-29 | 2021-06-11 | 北京奇艺世纪科技有限公司 | Video playing method and device, video playing equipment and readable storage medium |
CN113271500B (en) * | 2021-04-06 | 2022-06-21 | 北京硬核聚视科技有限公司 | Artificial simulation video playing test system and method |
CN113973233A (en) * | 2021-10-22 | 2022-01-25 | 深圳小湃科技有限公司 | Optimization method, device, device and storage medium for multi-platform video switching playback |
CN114598920B (en) * | 2022-03-04 | 2023-05-23 | 北京百度网讯科技有限公司 | A video playback control method, device, equipment and storage medium |
CN119854582A (en) * | 2025-03-20 | 2025-04-18 | 天翼视联科技有限公司 | Designated video monitoring playing method and device based on intelligent agent and storage medium |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102298947A (en) * | 2011-08-23 | 2011-12-28 | 百度在线网络技术(北京)有限公司 | Method for carrying out playing switching among multimedia players and equipment |
CN102779046A (en) * | 2012-07-04 | 2012-11-14 | 合一网络技术(北京)有限公司 | Video playing system based on HTML5 development and video playing method thereof |
CN103347219A (en) * | 2013-06-26 | 2013-10-09 | 广东欧珀移动通信有限公司 | A method of playing network video online |
CN103686410A (en) * | 2013-12-10 | 2014-03-26 | 乐视网信息技术(北京)股份有限公司 | Method and terminal for video playing |
CN103686456A (en) * | 2013-12-10 | 2014-03-26 | 乐视网信息技术(北京)股份有限公司 | Method and video client side for video playing |
CN103747345A (en) * | 2013-12-16 | 2014-04-23 | 乐视网信息技术(北京)股份有限公司 | Method and equipment for video playing of intelligent televisions |
Family Cites Families (27)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6335927B1 (en) * | 1996-11-18 | 2002-01-01 | Mci Communications Corporation | System and method for providing requested quality of service in a hybrid network |
GB2389496B (en) * | 2001-02-09 | 2005-04-06 | Quadriga Technology Ltd | Method and apparatus for distributing data |
US20060008256A1 (en) * | 2003-10-01 | 2006-01-12 | Khedouri Robert K | Audio visual player apparatus and system and method of content distribution using the same |
WO2006085844A1 (en) * | 2005-01-31 | 2006-08-17 | Thomson Licensing | Personal monitoring and information apparatus |
US7809802B2 (en) * | 2005-04-20 | 2010-10-05 | Videoegg, Inc. | Browser based video editing |
US20070186006A1 (en) * | 2006-01-27 | 2007-08-09 | Murray Frank H | Systems and Methods for Creation and Use of a Timeline of Broadcast Streaming Media Programs |
US7941525B1 (en) * | 2006-04-01 | 2011-05-10 | ClickTale, Ltd. | Method and system for monitoring an activity of a user |
WO2008035745A1 (en) * | 2006-09-20 | 2008-03-27 | Panasonic Corporation | Monitor system, camera and video image coding method |
WO2008121967A2 (en) * | 2007-03-30 | 2008-10-09 | Google Inc. | Interactive media display across devices |
US8069414B2 (en) * | 2007-07-18 | 2011-11-29 | Google Inc. | Embedded video player |
CN101106576B (en) * | 2007-08-10 | 2011-10-12 | 腾讯科技(深圳)有限公司 | A wireless application system and method for mobile terminal |
US8285121B2 (en) * | 2007-10-07 | 2012-10-09 | Fall Front Wireless Ny, Llc | Digital network-based video tagging system |
US8990692B2 (en) * | 2009-03-26 | 2015-03-24 | Google Inc. | Time-marked hyperlinking to video content |
US20120210205A1 (en) * | 2011-02-11 | 2012-08-16 | Greg Sherwood | System and method for using an application on a mobile device to transfer internet media content |
KR101734835B1 (en) * | 2010-01-28 | 2017-05-19 | 톰슨 라이센싱 | A method and apparatus for retransmission decision making |
US8793650B2 (en) * | 2010-06-11 | 2014-07-29 | Microsoft Corporation | Dynamic web application notifications including task bar overlays |
US8526782B2 (en) * | 2010-12-22 | 2013-09-03 | Coincident.Tv, Inc. | Switched annotations in playing audiovisual works |
US9049259B2 (en) * | 2011-05-03 | 2015-06-02 | Onepatont Software Limited | System and method for dynamically providing visual action or activity news feed |
WO2013081007A1 (en) * | 2011-11-30 | 2013-06-06 | 三菱電機株式会社 | Video monitoring system |
US20180285148A1 (en) * | 2012-02-17 | 2018-10-04 | Google Inc. | Automate control of media playback based on visibility |
US8782693B2 (en) * | 2012-02-29 | 2014-07-15 | Google Inc. | Interfaces to allow video ad serving into a mobile phone application video stream |
WO2013172989A1 (en) * | 2012-05-14 | 2013-11-21 | Sealed Air Corporation (Us) | Thin sealing device for side sealing machine |
WO2014047425A1 (en) * | 2012-09-21 | 2014-03-27 | Comment Bubble, Inc. | Timestamped commentary system for video content |
US9613011B2 (en) * | 2012-12-20 | 2017-04-04 | Cable Television Laboratories, Inc. | Cross-reference of shared browser applications |
US20150347164A1 (en) * | 2012-12-25 | 2015-12-03 | Beijing Qihoo Technology Company Limited | Method and Device for Playing Plug-in in Browser |
US20140281886A1 (en) * | 2013-03-14 | 2014-09-18 | Media Direct, Inc. | Systems and methods for creating or updating an application using website content |
US9558787B2 (en) * | 2014-01-29 | 2017-01-31 | Google Inc. | Media application backgrounding |
-
2014
- 2014-06-27 CN CN201410302706.3A patent/CN105208442B/en not_active Expired - Fee Related
-
2015
- 2015-06-25 US US15/321,519 patent/US20170171288A1/en not_active Abandoned
- 2015-06-25 WO PCT/CN2015/082372 patent/WO2015197013A1/en active Application Filing
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102298947A (en) * | 2011-08-23 | 2011-12-28 | 百度在线网络技术(北京)有限公司 | Method for carrying out playing switching among multimedia players and equipment |
CN102779046A (en) * | 2012-07-04 | 2012-11-14 | 合一网络技术(北京)有限公司 | Video playing system based on HTML5 development and video playing method thereof |
CN103347219A (en) * | 2013-06-26 | 2013-10-09 | 广东欧珀移动通信有限公司 | A method of playing network video online |
CN103686410A (en) * | 2013-12-10 | 2014-03-26 | 乐视网信息技术(北京)股份有限公司 | Method and terminal for video playing |
CN103686456A (en) * | 2013-12-10 | 2014-03-26 | 乐视网信息技术(北京)股份有限公司 | Method and video client side for video playing |
CN103747345A (en) * | 2013-12-16 | 2014-04-23 | 乐视网信息技术(北京)股份有限公司 | Method and equipment for video playing of intelligent televisions |
Also Published As
Publication number | Publication date |
---|---|
WO2015197013A1 (en) | 2015-12-30 |
CN105208442A (en) | 2015-12-30 |
US20170171288A1 (en) | 2017-06-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105208442B (en) | A kind of video broadcasting method and device of video playing application program | |
US11741183B2 (en) | Systems and methods for hosted applications | |
US10056113B2 (en) | Video processing method and associated electronic device | |
CN105100869B (en) | Barrage display methods and device | |
US11620784B2 (en) | Virtual scene display method and apparatus, and storage medium | |
US10209760B2 (en) | Browser-driven power saving | |
WO2017219833A1 (en) | Method and apparatus for developing and managing application program page | |
US20140098118A1 (en) | Graphic Rendering | |
WO2017206396A1 (en) | Video playing method and device | |
CN105791994B (en) | Webkit browser video playing method and device based on Android system | |
US11397555B2 (en) | Background pre-loading and refreshing of applications with audio inhibition | |
CN106383712B (en) | Toast component implementation method and system | |
CN114116443B (en) | A page data transmission method, device, system and medium | |
CN110134450B (en) | Video redirection method, device and computer readable storage medium | |
CN112416496A (en) | Page display method and device and storage medium | |
US9380189B2 (en) | Method of providing information configuration function in video play device and video play device | |
CN104133847B (en) | A kind of method and apparatus that sound control is carried out in browser | |
US9389830B2 (en) | Combined multi-source input interface | |
US20190230188A1 (en) | Hosted application as web widget toolkit | |
CN110704125B (en) | Webpage loading method and device, storage medium and terminal equipment | |
HK1203655A1 (en) | An enriching method, system and apparatus for microblog pages |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CP03 | Change of name, title or address | ||
CP03 | Change of name, title or address |
Address after: 100041 A-0071 2, 3 building, 30 Shixing street, Shijingshan District, Beijing. Patentee after: Beijing Cheetah Mobile Technology Co.,Ltd. Address before: 100022 the 12 level of Fuxing International Center, 237 Chaoyang North Road, Chaoyang District, Beijing. Patentee before: SHELL INTERNET (BEIJING) SECURITY TECHNOLOGY Co.,Ltd. |
|
CF01 | Termination of patent right due to non-payment of annual fee | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20180626 |