WO2014101486A1 - 浏览器中插件的播放方法及装置 - Google Patents
浏览器中插件的播放方法及装置 Download PDFInfo
- Publication number
- WO2014101486A1 WO2014101486A1 PCT/CN2013/083729 CN2013083729W WO2014101486A1 WO 2014101486 A1 WO2014101486 A1 WO 2014101486A1 CN 2013083729 W CN2013083729 W CN 2013083729W WO 2014101486 A1 WO2014101486 A1 WO 2014101486A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- plug
- video
- play
- flash
- browser
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 610
- 238000004364 calculation method Methods 0.000 claims abstract description 40
- 230000008569 process Effects 0.000 claims description 465
- 230000006854 communication Effects 0.000 claims description 35
- 238000004891 communication Methods 0.000 claims description 34
- 230000002452 interceptive effect Effects 0.000 claims description 12
- 238000004590 computer program Methods 0.000 claims description 10
- 230000006870 function Effects 0.000 description 87
- 230000000694 effects Effects 0.000 description 40
- 230000000903 blocking effect Effects 0.000 description 32
- 238000010586 diagram Methods 0.000 description 27
- 238000012544 monitoring process Methods 0.000 description 12
- 230000009471 action Effects 0.000 description 10
- 238000012360 testing method Methods 0.000 description 10
- 239000002699 waste material Substances 0.000 description 8
- 241000700605 Viruses Species 0.000 description 7
- 230000003993 interaction Effects 0.000 description 5
- 238000012545 processing Methods 0.000 description 5
- 230000004044 response Effects 0.000 description 4
- 230000008901 benefit Effects 0.000 description 3
- 238000011084 recovery Methods 0.000 description 3
- 238000004064 recycling Methods 0.000 description 3
- 238000013468 resource allocation Methods 0.000 description 3
- 230000003213 activating effect Effects 0.000 description 2
- 239000000284 extract Substances 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 239000000969 carrier Substances 0.000 description 1
- 230000003203 everyday effect Effects 0.000 description 1
- 238000009434 installation Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000000926 separation method Methods 0.000 description 1
- 230000001960 triggered effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44521—Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
- G06F9/44526—Plug-ins; Add-ons
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/957—Browsing optimisation, e.g. caching or content distillation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0484—Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
-
- 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
Definitions
- the present invention relates to the field of network applications, and in particular, to a method and device for playing a plug-in in a browser. Background technique
- the active object usually refers to the browser's plugin, such as the Act iveX plugin.
- the Act iveX plugin needs to be embedded in a web page, the plugin and page will run under the same process. If the plug-in is stuck or crashes, it will cause the entire web page to exit, which affects the stability of the page operation. When the page process crashes or crashes, it will cause the Act i veX plugin on the page to exit, which affects the stability of the Act iveX plugin.
- the user cannot dynamically adjust the size and display position of the ActiveX plugin.
- the loading and playing of the Act iveX plugin is automatically triggered when the user opens the web page.
- many webpages are embedded with various audio and video plug-ins, such as the Flash plug-in, which may be content or advertisements that the user does not care about.
- the Flash content will be automatically loaded and played at the first time. For the user, this unnecessary plug-in playback wastes user resources, such as wasting power, bandwidth, and system resources, and also extends page open time.
- the bandwidth of the server providing the video itself is relatively small, or the interaction between the video and the page is problematic, the problem of comparing the card during playback of the video often occurs, that is, the video often pauses for a while.
- the video that has been playing for a while cannot be buffered and cannot continue playing. Even more, there may be a problem that the video cannot be played at all because the video is invalid after opening the web page.
- the present invention has been made in order to provide a playback apparatus for a plug-in in a browser and a corresponding method of playing a plug-in in a browser that overcomes the above problems or at least partially solves or alleviates the above problems.
- a method for playing a plug-in in a browser including: when a page process of a browser loads and activates a first plug-in, creating a separate process different from a page process, loading and loading in a separate process Activating a second plugin, wherein the second plugin copies information of the first plugin; in an independent process, calculating information of the second plugin, and obtaining a calculation result; according to the calculation result, in a play window Drawing and playing the second plug-in.
- a playback apparatus for a plug-in in a browser including: a creation module configured to create an independent process different from a page process when a page process of a browser loads and activates the first plug-in, Loading and activating a second plug-in in a separate process, wherein the second plug-in copies information of the first plug-in; and the calculating module is configured to calculate, in an independent process, information of the second plug-in to obtain a calculation
- the playback module is configured to draw and play the second plugin in the play window according to the calculation result.
- a computer program comprising computer readable code causing the server to perform any of claims 1-10 when run on a server The playing method of the plug-in in the browser.
- a computer readable medium storing the computer program according to claim 21 is provided.
- the first plug-in is loaded and activated in the page process of the browser, but the first plug-in is not drawn and played, but an independent process different from the page process is created, and is loaded in a separate process.
- the second plug-in is activated, and the copying of the first plug-in information is implemented by using the second plug-in. Since the information of the first plug-in and the second plug-in are consistent, the calculation of the information of the second plug-in is consistent with the calculation result obtained by calculating the information of the first plug-in, and the result is in the play window according to the calculation result.
- the content played by drawing and playing the second plug-in should also be consistent.
- the second plug-in since the second plug-in is set in a separate process, a process is shared with the independent process, and two different processes are applied to the page process respectively. Therefore, the operation of the second plug-in and the operation of the page process are independent, and one party has a problem and Can not affect the stability of the other party. If the second plugin is stuck or crashed, it will not cause the entire webpage to exit, which can improve the stability of the page operation. Similarly, when the page process is stuck or crashed, it will not cause the second plugin in the page to exit. , improve the stability of the plugin operation. It can be seen that the playing method of the plug-in in the browser provided by the embodiment of the invention can improve the stability of the running of the browser without affecting the playing effect.
- the first plug-in can be called a proxy object, and the second plug-in is an active object.
- the embodiment of the present invention runs the proxy object in the page process, and runs the active object in the independent process, so that the real browser plug-in, such as the real ActiveX plug-in, is separated from the page process, so that the browser plug-in does not have a problem.
- a browser process that affects the embedded browser plug-in that is, when the browser plug-in has a problem, it does not affect the page progress, thereby improving the stability of the browser.
- the browser plug-in has a security problem such as a virus
- the browser plug-in since the browser plug-in is separated from the page process, it does not affect the running of the page process, thereby improving the security of the browser.
- the object thread running the browser plug-in can be suspended, reduced, or terminated, so that the independent process can orient the system resources such as the memory usage of the browser plug-in and the CPU usage.
- the allocation, the realization of better resource allocation and recycling methods, more reasonable scheduling of computer resources, termination of the process so that the process exit can also make resource recovery more thorough.
- FIG. 1 is a flowchart showing a process of playing a plug-in in a browser according to an embodiment of the first part of the present invention
- FIG. 2 is a schematic diagram showing communication between a page process and an independent process according to an embodiment of the first part of the present invention
- FIG. 3 is a schematic diagram showing a flash plug-in play when a flash plug-in has no play window in a page process according to an embodiment of the first part of the present invention
- FIG. 4 is a schematic diagram showing a flash plug-in playback when a flash plug-in has a play window in a page process according to an embodiment of the first part of the present invention
- FIG. 5 is a block diagram showing the structure of a playback device of a plug-in in a browser according to an embodiment of the first part of the present invention.
- 6 is a flow chart showing a method of creating a browser active object according to a first embodiment of the second part of the present invention
- 7 is a flow chart showing a method of creating a browser active object according to a second embodiment of the second part of the present invention
- FIG. 8 is a view showing a browser active object according to a second embodiment of the second part of the present invention
- FIG. 9 is a flow chart showing a method of creating a browser active object according to a fourth embodiment of the second embodiment of the present invention
- FIG. 10 is a view showing a fifth embodiment of the second part according to the present invention.
- FIG. 11 is a structural block diagram of a device for creating a browser active object according to a sixth embodiment of the second part of the present invention
- FIG. 12 is a view showing a second embodiment of the present invention
- FIG. 13 is a block diagram showing the structure of a device for creating a browser active object according to the eighth embodiment of the second embodiment of the present invention.
- FIG. 14 is a flow chart showing a video playing method according to a third embodiment of the present invention.
- FIG. 15 is a flow chart showing a first video library preset method according to the third embodiment of the present invention.
- 16 is a flowchart of a second video library preset method according to the third embodiment of the present invention.
- 17 is a flowchart of a method for playing a video according to a second embodiment of the present invention.
- FIG. 18 is a schematic diagram of a method for playing a video according to a third embodiment of the present invention.
- Figure 19 is a block diagram showing the structure of a server according to a fourth embodiment of the present invention.
- Figure 20 is a block diagram showing the structure of a browser according to a fourth embodiment of the present invention.
- Figure 21 is a block diagram showing the structure of a video playback system according to a fifth embodiment of the present invention.
- Figure 22 is a schematic block diagram showing a server for performing the method according to the present invention.
- Fig. 23 schematically shows a storage unit for holding or carrying program code implementing the method according to the invention.
- FIG. 1 is a flow chart showing the processing of a method for playing a plug-in in a browser according to an embodiment of the present invention.
- the playing method of the plug-in in the browser includes steps S102 to S106. The specific description of each step is as follows.
- Step S102 When the page process of the browser loads and activates the first plugin, create a separate process different from the page process, and load and activate the second plugin in the independent process, where the second plugin copies the information of the first plugin.
- Step S104 Calculate information of the second plug-in in an independent process, and obtain a calculation result.
- Step S106 Perform drawing and playing on the second plug-in in the play window according to the calculation result.
- the first plug-in is loaded and activated in the page process of the browser, but the first plug-in is not drawn and played, but an independent process different from the page process is created, and is loaded in a separate process.
- the second plug-in is activated, and the copying of the first plug-in information is implemented by using the second plug-in. Since the information of the first plug-in and the second plug-in are consistent, the calculation of the information of the second plug-in is consistent with the calculation result obtained by calculating the information of the first plug-in, and the result is in the play window according to the calculation result.
- the content played by drawing and playing the second plug-in should also be consistent.
- the second plug-in since the second plug-in is set in a separate process, a process is shared with the independent process, and two different processes are applied to the page process respectively. Therefore, the operation of the second plug-in and the operation of the page process are independent, and one party has a problem and Can not affect the stability of the other party. If the second plugin is stuck or crashed, it will not cause the entire webpage to exit, which can improve the stability of the page operation. Similarly, when the page process is stuck or crashed, it will not cause the second plugin in the page to exit. , improve the stability of the plugin operation. It can be seen that the playing method of the plug-in in the browser provided by the embodiment of the invention can improve the stability of the running of the browser without affecting the playing effect.
- the first plug-in can be referred to as a proxy object, and the second plug-in is an active object.
- the embodiment of the present invention runs the proxy object in the page process, and runs the active object in the independent process, so that the real browser plug-in, such as the real ActiveX plug-in, is separated from the page process, so that the browser plug-in does not have a problem.
- a browser process that affects the embedded browser plug-in that is, when the browser plug-in has a problem, it does not affect the page progress, thereby improving the stability of the browser.
- the browser plug-in has a security problem such as a virus
- the operation of the page process is not affected, thereby improving the security of the browser.
- the object thread running the browser plug-in can be suspended, reduced, or terminated, so that the independent process can orient the system resources such as the memory usage of the browser plug-in and the CPU usage.
- the allocation, the realization of better resource allocation and recycling methods, more reasonable scheduling of computer resources, termination of the process so that the process exit can also make resource recovery more thorough.
- the first plug-in is a proxy object
- the second plug-in is an active object
- the initiative of the first plug-in and the second plug-in is different.
- the method for playing the plug-in in the browser provided by the embodiment of the present invention can implement two-way communication, and the page process and the independent process are not fixed.
- the plug-in in the independent process may be separated into the page process.
- the proxy object and the active object role are interchanged, and the specific processing is similar.
- step S102 the second plug-in needs to copy the information of the first plug-in in order to ensure the consistency of the playback effect.
- this example provides a preferred mode of copying.
- a first control object is generated for the first plugin in the page process.
- a second control object is generated for the second plugin in the independent process.
- the second control object and the first control object are used for interactive communication, and the information of the first plug-in is obtained, and the information of the obtained first plug-in is sent to the second plug-in by using the second control object.
- the setting plug-in and the control object are mutually operated by a pointer, wherein the pointer can call a plurality of standard interfaces.
- the first plug-in and the first control object are mutually operated by the pointer, and the second plug-in and the second control object are mutually operated by the same type of pointer.
- the pointer can be an IUnknown pointer, and the IUnknown pointer will call many standard interfaces, such as I01e0bject, IVi ewObject, and the like.
- a first window associated with the first control object may be created in the page process, and then the second control object is associated with the second control object in the independent process. Two windows. Then, the first window and the second window are used for interactive communication.
- the information of the interactive communication may be any information involved in the plug-in playback, for example, the size of the plug-in, the focus of the thread in the page process, the refresh operation of the thread of the page process, the execution of the script, and the like.
- the specific information here is only an example, and the information itself is not limited, and the communication may also involve other information played by the plug-in.
- Step S106 mentions that the second plug-in is played and played in the play window according to the calculation result.
- SP when playing the second plug-in, can be divided into two cases, one is that the play window of the first plug-in does not exist in the page process, and the other is that the play window of the first plug-in exists in the page process. The two are now specified separately.
- a separate play window is created by using the independent process.
- the playback window is newly created by a separate process, there is no connection to the original page process.
- One or more timers are set in the independent process, and the calculation result of the second plug-in is obtained periodically, and then the second plug-in is drawn and played in the new play window according to the calculation result.
- the independent play process is also newly created.
- the newly created play window is set as the parent window of the original play window, and then the second plug-in is drawn and played in the newly created play window according to the calculation result.
- the newly created play window can be moved or scaled on the browser to achieve mobility, scalability, and more. If you want the playback window to be rendered in the playback window of the original page process, you only need to set the newly created playback window to the window position of the original page process.
- the independent process informs the page process that there is no play window. If the page process cannot know the existence of the play window, the play window cannot be controlled, thereby realizing the separation of the plug-in from the page process and improving the stability of the browser.
- the first plugin and/or the second plugin are ActiveX plugins.
- the flash plug-in is a commonly used Act iveX plug-in.
- the flash plug-in is run in the page process as an example.
- the playback method of the plug-in in the browser provided by the embodiment of the present invention is specifically described.
- FIG. 2 shows a schematic diagram of communication between a page process and an independent process in accordance with one embodiment of the present invention.
- the browser when the browser creates the Act iveX plugin (the first plugin mentioned above), it will query the registry according to the plugin CLSID or ProgID (acquire CLSID through CLSIDFromProgID) to check whether the system has been installed accordingly. The plugin, if installed, will continue the creation process.
- the browser gets the I Unknown pointer of the corresponding plugin by calling CoGetClassObject and then interoperating through the standard interface.
- CoGetClassObject executes the procedure by querying the Act iveX path through the CLSID. After obtaining the Act iveX path, call LoadLibrary to load the Act iveX plugin, call its export function Dl lGetClassObject to get the class factory pointer (IClassFactory ), and then call the IClassFactory Createlnstance method to get the Act.
- the IUnknown pointer corresponding to the iveX plugin.
- Hook (intercept) CoGetClassObject creates an Act iveX control object (that is, the first control object corresponding to the first plugin), and the ActiveX control object includes a series of interfaces.
- the IUnknown pointer will call many standard interfaces, such as I01e0bject, IVi ewObject, and so on.
- the CreateClass of IClassFactory is called, the created Act iveX control object is returned to the IUnknown pointer of the Act iveX plugin.
- the page process When the page process activates the Act iveX plugin, it extracts information about the control's properties, URL, size, etc., then creates a separate process and loads the Act iveX plugin (ie the second plugin) in a separate process.
- the Act iveX control object includes a series of interfaces, such as many standard interfaces that the IUnknown pointer will call. , such as I01e0bject, IVi ewObject, etc. Then, when the CreateClass of IClassFactory is called, the other Act iveX control object created is returned to the IUnknown pointer of the Act iveX plugin of the independent process.
- the method provided by this embodiment can intercept all requests that the page process directly interacts with the independent process. If the page process and the independent process need to communicate, the two ActiveX control objects created in advance are used to implement the process between the two processes. Information exchange. Due to the independence of the independent process and the page process, the specific calculation process of the flash plug-in is performed in a separate process, and thus does not affect the original page process.
- a new play window can be created, and then the result calculated in the independent process is drawn in the newly created play window, and the following two cases are specifically described as follows.
- the flash plugin in the page process is the case of a flash plugin without a play window.
- FIG. 3 is a schematic diagram showing a flash plug-in playback when a flash plug-in has no play window in a page process according to an embodiment of the present invention.
- Figure 3 when the result calculated in the independent process is drawn in the newly created play window, there is a timer in the independent process, and the Draw method of the IVi ewObject interface is called according to the predetermined time interval to obtain the drawing data, so as to calculate The data is drawn into the newly created flash play window.
- the new play window can be set at the flash play window position of the original page, but the window can be moved, scaled, etc., to meet the needs of the user.
- the flash plugin in the page process is the case with a flash plugin that plays the window.
- FIG. 4 is a schematic diagram showing a flash plug-in playback when a flash plug-in in a page process has a play window according to an embodiment of the present invention.
- the result calculated in the independent process is drawn in the newly created play window, and the newly created play window is set as the parent window of the flash play window in the original page.
- the corresponding window is obtained, and then the parent window of the flash play window is set by SetParent.
- the new play window can be set at the flash play window position of the original page, but the window can be moved, scaled, etc., to meet the needs of the user.
- the independent process when the window is acquired, the independent process returns null. Specifically, when the page process scrolls the page, the IOleWindow interface GetWindow method of the flash object is called to determine whether the flash object has a window. If there is a window, the window is moved by sending a medical-MOVE message, and the window is moved by GetWindow to prohibit the page process from moving the flash window. .
- the embodiment provides a method for playing a plug-in in a browser, which realizes the real stripping of the webpage and the plug-in, and further solves the problem that the embedded plug-in function is incomplete and the plug-in and the page interact with each other.
- an embodiment of the present invention further provides a playback device for a plug-in in a browser, which can implement a method for playing a plug-in in a browser of any of the above preferred embodiments.
- FIG. 5 is a block diagram showing the structure of a playback device of a plug-in in a browser according to an embodiment of the present invention. Referring to FIG. 5, the playback device of the plug-in in the browser includes at least:
- the creating module 501 is configured to: when the page process of the browser loads and activate the first plugin, create a separate process different from the page process, and load and activate the second plugin in the independent process, where the second plugin copies the first plugin
- the calculation module 502 is configured to calculate the information of the second plug-in in an independent process to obtain a calculation result.
- the playing module 503 is configured to draw and play the second plug-in in the play window according to the calculation result.
- the creation module 501 can also be configured to:
- the second control object and the first control object are used for interactive communication to obtain information of the first plug-in;
- the first plug-in and the first control object are mutually operated by pointers, wherein the pointer is capable of calling a plurality of standard interfaces;
- the second plugin and the second control object interact with each other through pointers of the same type.
- the creating module 501 can also be configured as:
- the first window and the second window are used for interactive communication.
- the information of the interactive communication includes at least one of the following:
- the play module 503 can also be configured to:
- the independent play process is used to create a new play window
- the second plug-in is drawn and played in the new play window.
- the play module 503 can also be configured to:
- a separate play window is created by using a separate process, and the newly created play window is set as the parent window of the original play window;
- the second plug-in is drawn and played in the newly created play window according to the calculation result.
- the newly created play window can be moved or scaled on the browser.
- the playback device of the plug-in in the browser may further include a notification module 504.
- the telling module 504 can utilize the independent process to inform the page process that there is no play window.
- the first plugin and/or the second plugin are ActiveX plugins.
- the method and device for playing the plug-in in the browser provided by the embodiment of the present invention can achieve the following beneficial effects:
- the first plug-in is loaded and activated in the page process of the browser, but the first plug-in is not Draw the play, but create a separate process different from the page process, and load and activate the second plugin in the independent process, and use the second plugin to copy the first plugin information. Since the information of the first plug-in and the second plug-in are consistent, the calculation of the information of the second plug-in is consistent with the calculation result obtained by calculating the information of the first plug-in, and the result is in the play window according to the calculation result. The content played by drawing and playing the second plug-in should also be consistent.
- the second plug-in since the second plug-in is set in a separate process, a process is shared with the independent process, and two different processes are applied to the page process respectively. Therefore, the operation of the second plug-in and the operation of the page process are independent, and one party has a problem and Can not affect the stability of the other party. If the second plugin is stuck or crashed, it will not cause the entire webpage to exit, which can improve the stability of the page operation. Similarly, when the page process is stuck or crashed, it will not cause the second plugin in the page to exit. , improve the stability of the plugin operation. It can be seen that the playing method of the plug-in in the browser provided by the embodiment of the invention can improve the stability of the running of the browser without affecting the playing effect.
- the first plug-in can be called a proxy object, and the second plug-in is an active object.
- the embodiment of the present invention runs the proxy object in the page process, and runs the active object in the independent process, so that the real browser plug-in, such as the real ActiveX plug-in, is separated from the page process, so that the browser plug-in does not have a problem.
- a browser process that affects the embedded browser plug-in that is, when the browser plug-in has a problem, it does not affect the page progress, thereby improving the stability of the browser.
- the browser plug-in has a security problem such as a virus
- the browser plug-in since the browser plug-in is separated from the page process, it does not affect the running of the page process, thereby improving the security of the browser.
- the object thread running the browser plug-in can be suspended, reduced, or terminated, so that the independent process can orient the system resources such as the memory usage of the browser plug-in and the CPU usage.
- the allocation, the realization of better resource allocation and recycling methods, more reasonable scheduling of computer resources, termination of the process so that the process exit can also make resource recovery more thorough.
- the creation of the Flash plug-in is taken as an example.
- the present invention is not limited to the Flash plug-in, and may be other Act iveX plug-ins, such as Baidu AV, QV0D (fast broadcast) and the like.
- step S601 shows a flow diagram of a method 600 of creating a browser active object in accordance with a first embodiment of the present invention.
- method 600 begins in step S601, where the creation of the Flash plugin is prevented until the browser's page process creates the Flash plugin.
- the browser's page process obtains the Flash plugin's class identifier (CLSID) or the component's string identifier (ProgID) through the CLS IDFromProgID method, according to the existing process, and then the page.
- the process queries the registry according to the CLS ID or ProgID of the Flash plugin to check whether the plugin is installed on the system. If the plugin is installed, the Flash plugin is further created.
- CLSID Flash plugin's class identifier
- ProgID component's string identifier
- this method differs from the existing process in that, after obtaining the CLSID or ProgID, it is determined whether it is the CLSID or ProgID of the Flash plug-in, and if so, the execution of the query of the registry is stopped, so that the Flash plug-in will not be created. It should be noted that stopping the execution of the query registry is an optional implementation that prevents the creation of the Flash plug-in. This method can also prevent further creation of the Flash plug-in after querying the registry to confirm that the Flash plug-in is installed. Through this step, although there is a Flash plugin in the page, since the Flash plugin is blocked after the page is opened, the corresponding Flash content will not be played in the page.
- step S602 the Flash plug-in is continuously created according to the request initiated by the user to execute the Flash plug-in function, and the function of the Flash plug-in is executed after the creation is completed, that is, the corresponding Flash content is played.
- the page process receives the user's request to click to play the Flash, no longer prevents the creation of the Flash plugin, and continues to create the Flash plugin. Taking the action of stopping the query of the registry as an example, the page process continues to execute the query of the registry according to the CLSID or ProgID of the Flash plugin, to check whether the plugin is installed in the system, and further create the flash if the plugin is installed. Plugin. After the Flash plugin is created, the corresponding Flash content will be played according to the default properties, thus realizing the point-and-click broadcast of the Flash content corresponding to the Flash plug-in.
- the Flash plug-in before the browser process of the browser creates the Flash plug-in, the Flash plug-in is blocked by default; after the user initiates the request to play the Flash, the Flash plug-in is continuously created, and the Flash plug-in is After the creation is completed, the corresponding Flash content is played, thereby realizing the point-and-click broadcast of the Flash content corresponding to the Flash plug-in.
- unnecessary plug-in playback is avoided to waste user resources, saving power, bandwidth and system resources.
- the method provided in this embodiment prevents the creation of a Flash plugin by default when the page is loaded, and uses a limited resource for loading the page, thereby improving the loading speed of the page.
- FIG. 7 shows a flow diagram of a method 700 of creating a browser active object in accordance with a second embodiment of the present invention.
- the proxy object is created in the page process, and the active object is continuously created in the independent process, so that the real Flash plug-in and the page are made.
- the process is separated.
- the method 700 begins in step S701, preventing the creation of the Flash plug-in before the browser's page process creates the Flash plug-in.
- the browser's page process obtains the CLS ID or ProgID of the Flash plugin through the CLSIDFromProgID method, and after obtaining the CLSID or ProgID, determines whether it is the CLSID or ProgID of the Flash plugin, and if so, stops executing the query.
- the registry action so that the Flash plugin will not be created. Stopping the execution of the query registry is an optional implementation that prevents the creation of a Flash plugin. This method can also prevent further creation of the Flash plugin after querying the registry to confirm that the Flash plugin has been installed.
- step S702 in which the operation of the Flash plug-in function is intercepted according to the request initiated by the user, and the operation of the Flash plug-in active object is created by the page process of the browser, and the Flash plug-in proxy object is created in the page process of the browser to replace the actual created object. Flash plugin activity object, the Flash plugin proxy object runs in the page process.
- the page process receives the user's request to click to play the Flash, no longer prevents the creation of the Flash plugin, and continues to create the Flash plugin.
- the page process continues to execute the query of the registry according to the CLSID or ProgID of the Flash plugin, to check whether the plugin is installed in the system, and further create the flash if the plugin is installed.
- Plugin when the page process is ready to further create a Flash plugin, the CoGetClassObject is intercepted, and a Flash plugin proxy object is created.
- the Flash plugin proxy object includes a series of interfaces, including many standard interfaces that the IUnknown pointer (also referred to as an interface pointer) will call. For example, I01e0bject, IVi ewObject, etc. Then, when the Createlnstance of IClas sFactory is called, the created Flash plugin proxy object is returned to the IUnknown pointer of the page process.
- IUnknown pointer also referred to as an interface pointer
- step S703 a separate process independent of the page process is created, in which the Flash plugin activity object is created, and the Flash plugin activity object here is the real Flash plugin.
- the page process activates the Flash plugin proxy object, information about the properties, URL, size, and the like of the Flash plugin is extracted, and then a separate process is created. Specifically, create a file (document) into which an object (object) is inserted.
- the independent process calls CoGetClassObject to intercept the CoGetClassObject and create a Flash plugin active object.
- the Flash plugin activity object includes a series of interfaces, including many standard interfaces that the IUnknown pointer will call, such as I01e0bject, IVi ewObj ect, and so on.
- the created Flash plugin active object is returned to the IUnknown pointer of the independent process.
- a window associated with the plug-in object is created in the Flash plug-in proxy object and the Flash plug-in active object, respectively, for the Flash plug-in proxy object to communicate with the Flash plug-in active object.
- step S704 the Flash plug-in active object is invoked by the Flash plug-in proxy object to communicate with the independent process, and/or the Flash plug-in proxy object communicates with the independent process by the Flash plug-in active object, and the Flash plug-in active object is implemented.
- the Flash plugin proxy object communicates with the independent process to call the Flash plugin activity object, so that the Flash plugin active object plays the corresponding Flash content, thereby implementing the Flash plugin corresponding Flash content is instantly clickable.
- the Flash plug-in before the browser process of the browser creates the Flash plug-in, the Flash plug-in is blocked by default; after the user initiates the request to play the Flash, the real Flash plug-in is created in the independent process. After the real Flash plugin is created, the corresponding Flash content is played by calling the real Flash plugin, thereby realizing the point-and-click broadcast of the Flash content corresponding to the Flash plug-in.
- unnecessary plug-in playback is avoided to waste user resources, saving power, bandwidth and system resources.
- the point-and-click broadcast of the Flash content is realized.
- the method provided in this embodiment prevents the creation of the Flash plugin by default when the page is loaded, and uses limited resources for loading the page, thereby improving the loading speed of the page.
- the method by running the proxy object in the page process and running the active object in the independent process, the real Flash plugin is separated from the page process, so that the Flash plugin does not affect the page process when the problem occurs, and the method is improved.
- the stability of the browser especially when the Flash plugin has a security problem such as a virus, does not affect the page process, and improves the security of the browser; at the same time, the problem of the page process does not affect the normality of the Flash plugin. Run, improve the stability of the plugin.
- the method 800 begins in step S801, in which after the browser process of the browser creates the Flash plugin, the execution of the Flash plugin is prevented by intercepting the timing message in the thread message loop or by modifying the properties of the Flash plugin. Function, which prevents the Flash plugin from playing the corresponding Flash content.
- the browser's page process obtains the CLSID or ProgID of the Flash plugin through the CLSIDFromProgID method, and then the page process queries the registry according to the CLSID or ProgID of the Flash plugin to check whether the plugin is installed on the system.
- the page process obtains the IUnknown pointer of the Flash plugin by calling CoGetClassObject, and calls the standard interface according to the IUnknown pointer to perform related operations, thereby completing the creation of the Flash plugin.
- the execution process of CoGetClassObject is as follows: CLSID to the registry to query the Act iveX path, after obtaining the Act iveX path, call LoadLibrary to load the Flash plugin, call the export function Dl lGetClassOb ject to get the class factory pointer ( IClassFactory ), and then call the IClassFactory Creatlnstance method to get the Flash.
- the IUnknown pointer corresponding to the plugin.
- the default properties of the Flash plugin can be obtained and modified by calling the relevant interface. Normally, the default property of the Flash plugin is play. At this point, the default property of the Flash plugin is changed from play to pause or stop, which prevents the Flash plugin from playing Flash content. Specifically, according to the IUnknown pointer of the Flash plugin, you can find the function that records the properties of the Flash plugin. Call this function to modify the properties of the Flash plugin. Modifying the properties of the Flash plugin is an optional way to prevent the Flash plugin from playing Flash content. This implementation is suitable for Flash plugins that play animations. The method also provides another implementation method for preventing the Flash plug-in from playing Flash content, that is, intercepting the timing message in the thread message loop.
- the Flash plug-in for playing animation and video is applicable.
- the timing message in the thread message loop (such as 0x401 message) is a driver message of the Flash plug-in, and the Flash plug-in only performs the corresponding function when receiving the timing message periodically, and the method intercepts the timing message.
- the Flash plugin does not receive this message, so the Flash plugin will not play the corresponding Flash content.
- step S801 the method 800 proceeds to step S802, in which the drawing function of the Flash plug-in is intercepted, a custom drawing function is used to draw a custom interface, and the customized interface is displayed at a specified position of the browser.
- the interface for stopping the playback may appear at the designated position of the browser where the Flash content is originally displayed.
- This method may replace the interface that stops playing with a customized interface, such as a blank screen, Define images or custom Flash, etc.
- the specific method is to intercept the drawing function of the Flash plug-in, which is used to draw the interface to stop playing, call the custom drawing function to draw the custom interface and display.
- step S803 the function implemented by the Flash plug-in is continued by canceling the interception of the timing message in the thread loop or by modifying the properties of the Flash plug-in according to the request initiated by the user to execute the function implemented by the Flash plug-in. That is to continue playing Flash content.
- this step re-modifies the properties of the Flash plug-in, that is, the properties of the Flash plug-in are changed from being paused or stopped to being played, so that the Flash plug-in You can continue to play the corresponding Flash content.
- step S801 cancels the interception of the timing message, so that the Flash plug-in continues to play the corresponding Flash content.
- the Flash plug-in is prevented from playing the Flash content by intercepting the timing message in the thread message loop or modifying the properties of the Flash plug-in; After the user initiates the request to play the Flash, the Flash plug-in continues to play the Flash content by canceling the interception of the timing message in the thread message loop or modifying the properties of the Flash plug-in, thereby realizing the Flash content corresponding to the Flash plug-in.
- Instant broadcast Compared with the prior art, the unnecessary plug-in playback is avoided to cause user resources to wave Fees, saving power, bandwidth and system resources.
- the method has created a Flash plug-in when the Flash plug-in is prevented from playing the Flash content. After the user initiates the request to play the Flash, the Flash plug-in is not required to be created, and the playback can be started directly, and the response time is short.
- FIG. 9 is a flow chart showing a method 400 of creating a browser active object in accordance with a fourth embodiment of the present invention. Different from the third embodiment described above, this embodiment creates a proxy object in the page process, and continues to create an active object in the independent process, so that the real Flash plugin is separated from the page process.
- the method 900 starts at step S901, intercepting a page process of a browser to create a Flash plugin activity object, and creating a Flash plugin proxy object in a page process of the browser to replace the Flash plugin activity object actually to be created, the Flash The plugin proxy object runs in the page process.
- Flash plugin proxy object when there is a Flash plugin in the page, when the page process is ready to create a Flash plugin, the CoGetClassObject is intercepted, and a Flash plugin proxy object is created.
- the Flash plugin proxy object includes a series of interfaces, including many that the IUnknown pointer will call. Standard interfaces, such as I01e0bject, IVi ewObject, etc. Then, when the CreateClass of IClassFactory is called, the created Flash plugin proxy object is returned to the page process's IUnknown pointer.
- step S902 a separate process independent of the page process is created, in which the Flash plugin activity object is created, and the Flash plugin activity object here is the real Flash plugin.
- the page process activates the Flash plugin proxy object, information about the properties, URL, size, and the like of the Flash plugin is extracted, and then a separate process is created. Specifically, create a file (document) into which an object (object) is inserted.
- the independent process calls CoGetClassObject to intercept the CoGetClassObject and create a Flash plugin active object.
- the Flash plugin activity object includes a series of interfaces, including many standard interfaces that the IUnknown pointer will call, such as I01e0bject, IVi ewObj ect, and so on.
- the created Flash plugin active object is returned to the IUnknown pointer of the independent process.
- a window associated with the plug-in object is created in the Flash plug-in proxy object and the Flash plug-in active object, respectively, for the Flash plug-in proxy object to communicate with the Flash plug-in active object.
- step S903 in which the function of implementing the Flash plugin activity object is prevented by intercepting the timing message in the thread message loop or by modifying the properties of the Flash plugin activity object, that is, preventing the Flash plugin from playing the corresponding Flash content.
- the related content of this step is similar to that of the third embodiment, except that this step is executed in a separate process, and the corresponding steps of the third embodiment are executed in the page process.
- step S903 the method 900 proceeds to step S904, where a custom drawing function is called to draw a customized interface, and the customized interface is displayed at a specified position of the browser.
- the interface for stopping the playback may appear at the designated position of the browser where the Flash content is originally displayed.
- This method may replace the interface for stopping the playback with a custom interface, such as a blank screen, Define images or custom Flash, etc. Specifically, the following two methods can be used:
- step S905 the function implemented by the Flash plug-in is continued by canceling the interception of the timing message in the thread loop or by modifying the attributes of the Flash plug-in according to the request initiated by the user to execute the function implemented by the Flash plug-in. That is, the Flash content continues to play.
- the function of continuing to implement the Flash plug-in implementation is to call the Flash plug-in active object by communicating with the independent process through the Flash plug-in proxy object, and/or, the Flash plug-in proxy object and the independent process communication are implemented by the Flash plug-in active object.
- the cancellation of intercepting the timing message in the thread loop or by modifying the properties of the Flash plugin is done in a separate process.
- a Flash plugin proxy object is created in a page process of the browser, a real Flash plugin is created in a separate process, and after the real Flash plugin is created, the thread message is intercepted.
- the method has created a Flash plug-in when the Flash plug-in is prevented from playing the Flash content. After the user initiates the request to play the Flash, the Flash plug-in is not required to be created, and the playback can be started directly, and the response time is short.
- the real Flash plugin is separated from the page process, so that the Flash plugin does not affect the page process when the problem occurs, and the method is improved.
- the stability of the browser especially when the Flash plugin has a security problem such as a virus, does not affect the page process, and improves the security of the browser; at the same time, the problem of the page process does not affect the normality of the Flash plugin. Run, improve the stability of the plugin.
- FIG. 10 is a block diagram showing the structure of a device for creating a browser active object according to a fifth embodiment of the present invention.
- the apparatus includes a blocking module 1010, a first creation module 1020, and an execution module 1030. Further, the blocking module 1010, the first creating module 1020, and the executing module 1030 are both sub-modules of the page process module 1000.
- the blocking module 1010 is adapted to prevent the creation of the active object in the page process before the browser creates the active object.
- the first creation module 1020 continues to create the activity object in the page process based on the user-initiated request to perform the function implemented by the activity object.
- the execution module 1030 is adapted to perform the function of the active object implementation after the first creation module 1020 creates the active object.
- the page process obtains the CLSID or ProgID of the Flash plug-in by using the CLSIDFromProgID method, and determines whether it is the CLSID or ProgID of the Flash plug-in. If the blocking module 1010 blocks the action of the first creating module 1020, Causes it to stop executing the query registry, thereby preventing the creation of a Flash plugin. After the page process receives the user's request to click the Flash, the blocking module 1010 releases the blocking, and the first creating module 1020 continues to perform the operation of querying the registry according to the CLSID or the ProgID of the Flash plugin, to check whether the plugin is installed in the system. See the installed plugin to further create the Flash plugin. After the Flash plug-in is created, the execution module 1030 plays the corresponding Flash content according to the default attribute, thereby implementing the Flash content corresponding to the Flash plug-in. Instant broadcast.
- the blocking module blocks the creation of the Flash plug-in by default; after the user initiates the request to play the Flash, the first creation module continues to create the Flash.
- the plug-in, and after the Flash plug-in is created the execution module plays the corresponding Flash content, thereby realizing the point-and-click broadcast of the Flash content corresponding to the Flash plug-in.
- unnecessary plug-in playback is avoided, which wastes user resources and saves power, bandwidth and system resources.
- the device provided in this embodiment prevents the creation of the Flash plugin by default when the page is loaded, and uses limited resources for loading the page, thereby improving the loading speed of the page.
- Figure 11 is a block diagram showing the structure of a device for creating a browser active object according to a sixth embodiment of the present invention.
- the apparatus includes a page process module 1110 and an independent process module 1120, and a communication window 1130 created in the page process module 1110 and the independent process module 1120, respectively.
- the page process module 1110 includes sub-modules: a blocking module 1111 and a second creating module 1112; and the independent process module 1120 includes sub-modules: a first creating module 1121 and an executing module 1122.
- the blocking module 1111 is adapted to prevent the creation of an active object in the page process before the browser creates the active object.
- the second creating module 1112 is adapted to intercept the browser process of the browser to load the active object according to the request initiated by the user to perform the function implemented by the active object, and create a proxy object in the browser process of the browser to replace the active object to be created, the proxy The object runs in the page process.
- the first creation module 1121 is adapted to create an active object in a separate process that is independent of the browser's page process.
- Execution module 1122 invokes the active object by communicating with the independent process via the communication window 1130 via the proxy window, and/or the proxy object is invoked by the active object via the communication window 1130 to communicate with the active object, performing the functions implemented by the active object.
- the page process obtains the CLSID or ProgID of the Flash plug-in by using the CLSIDFromProgID method, and determines whether it is the CLSID or ProgID of the Flash plug-in. If the blocking module 1111 blocks the action of the second creating module 1112, Causes it to stop executing the query registry, thereby preventing the creation of a Flash plugin.
- the blocking module 1111 unblocks, and the second creating module 1112 continues to perform the operation of querying the registry according to the CLSID or the ProgID of the Flash plugin, to check whether the plugin is installed in the system, if See the installed plugin to further create the Flash plugin.
- the second creation module 1112 intercepts the CoGetClassObject and creates a Flash plugin proxy object, the Flash plugin proxy object including a series of interfaces, including many standard interfaces that the IUnknown pointer will call, such as I01e0bject, IVi ewObject and so on.
- the created Flash plugin proxy object is returned to the IUnknown pointer of the page process.
- the page process activates the Flash plugin proxy object, information about the properties, URL, size, etc. of the Flash plugin is extracted, and then a separate process is created by the independent process module 1120.
- the independent process calls CoGetClassObject
- the first creation module 1121 intercepts the CoGetClassObject and creates a Flash plugin active object.
- the Flash plugin activity object includes a series of interfaces, including many standard interfaces that the IUnknown pointer will call, such as I01e0bject, IVi ewObject, and so on.
- the created Flash plugin activity object is returned to the IUnknown pointer of the independent process.
- the execution module 1122 invokes the Flash plugin activity object by communicating with the independent process through the Flash plugin proxy object, so that the Flash plugin activity object plays the corresponding Flash content, thereby implementing the Flash plugin proxy object.
- the Flash content corresponding to the Flash plug-in is click-to-play.
- the blocking module blocks the creation of the Flash plug-in by default; after the user initiates the request to play the Flash, the first creation module is in the independent process. Create a real Flash plugin, and after the real Flash plugin is created, execute the module by calling true The positive Flash plug-in plays the corresponding Flash content, thereby realizing the point-and-click broadcast of the Flash content corresponding to the Flash plug-in. Compared with the prior art, unnecessary plug-in playback is avoided to waste user resources, saving power, bandwidth and system resources.
- the device provided in this embodiment prevents the creation of the Flash plug-in by default when the page is loaded, and uses limited resources for loading the page, thereby improving the loading speed of the page.
- the real Flash plug-in is separated from the page process, so that the Flash plug-in does not affect the page process when the problem occurs, thereby improving
- the stability of the browser especially when the Flash plugin has a security problem such as a virus, does not affect the page process, and improves the security of the browser; at the same time, the problem of the page process does not affect the normality of the Flash plugin. Run, improve the stability of the plugin.
- Figure 12 is a block diagram showing the structure of a device for creating a browser active object according to a seventh embodiment of the present invention.
- the apparatus includes a blocking module 1210 and an execution module 1220. Further, the blocking module 1210 and the executing module 1220 are sub-modules of the page process module 1200.
- the blocking module 1210 is adapted to prevent the execution of the active object from being implemented after the browser creates the active object by intercepting the timing message in the thread message loop or by modifying the properties of the active object.
- the execution module 1220 is adapted to continue executing the functions implemented by the active object by canceling the interception of the timing message in the thread message loop or by modifying the attributes of the active object based on the user-initiated request to perform the function implemented by the active object.
- the browser's page process obtains the CLSID or ProgID of the Flash plug-in through the CLSIDFromProgID method, and then the page process queries the registry according to the CLSID or ProgID of the Flash plug-in to view the system. Whether the plugin has been installed, and if the plugin is installed, the Flash plugin is further created.
- the page process obtains the I Unknown pointer of the Flash plugin by calling CoGetClas sObject, and calls the standard interface to perform related operations according to the IUnknown pointer, thereby completing the creation of the Flash plugin.
- the blocking module 1210 can find a function for recording the properties of the Flash plug-in according to the IUnkown pointer, and calling the function can modify the properties of the Flash plug-in, such as changing the default property of the Flash plug-in from playing to pause or Stop, it is the purpose of preventing the Flash plugin from playing Flash content.
- Blocking module 1210 can also intercept timing messages in the thread message loop, such as 0x401 messages, to prevent the Flash plugin from playing Flash content.
- the execution module 1220 may modify the attributes of the Flash plug-in, such as changing the properties of the Flash plug-in from being paused or stopped to playing, so that the Flash plug-in can continue to play the corresponding Flash content.
- the execution module 1220 can also enable the Flash plug-in to continue playing the corresponding Flash content by unblocking the timing message.
- the device may further include a drawing module 1230, which is also a sub-module of the page process module 1200.
- the drawing module 1230 is adapted to intercept the drawing function of the active object, call a custom drawing function to draw a custom interface, and display a custom interface at a specified position of the browser.
- the drawing module 1230 can be replaced with a custom interface such as a blank screen, a custom image, or a custom Flash.
- the blocking module prevents the Flash plug-in from playing Flash by intercepting the timing message in the thread message loop or modifying the properties of the Flash plug-in.
- the execution module cancels the timing message in the thread message loop or re-modifies the properties of the Flash plug-in, so that the Flash plug-in continues to play the Flash content, thereby implementing the Flash corresponding to the Flash plug-in.
- the content is click-to-point. Compared with the prior art, unnecessary plug-in playback is avoided to waste user resources, saving power, bandwidth and system resources.
- the device has created a Flash plug-in when the Flash plug-in is prevented from playing Flash content, and the user does not need to create a Flash after the user initiates the request to play the Flash. Plug-in, you can start playback directly, and the response time is shorter.
- Figure 13 is a block diagram showing the structure of a device for creating a browser active object according to an eighth embodiment of the present invention.
- the apparatus includes a page progress module 1310 and an independent process module 1320, and a communication window 1330 created in the page process module 1310 and the independent process module 1320, respectively.
- the page process module 1310 includes sub-modules: a first creation module 1311; the independent process module 1320 includes sub-modules: a second creation module 1321, a blocking module 1322, and an execution module 1323.
- the first creation module 1311 is adapted to intercept the browser process of the browser to load the active object.
- the proxy object is created to replace the active object to be created, and the proxy object runs in the page process.
- the second creation module 1321 is adapted to create an active object in a separate process that is independent of the page process.
- the blocking module 1322 is adapted to block the execution of the active object by intercepting the timing message in the thread message loop or by modifying the properties of the active object after the browser creates the active object.
- the execution module 1323 is adapted to continue performing the functions implemented by the active object by canceling the interception of the timing message in the thread message loop or by modifying the attributes of the active object based on the user-initiated request to perform the function implemented by the active object.
- the execution module 1323 is further adapted to invoke the active object via the proxy window in communication with the independent process via the communication window 1330, and/or the proxy object is invoked by the active object via the communication window 1330 to communicate with the active object, continuing to perform the functions of the active object implementation.
- Flash plug-in proxy object when there is a Flash plug-in in the page, when the first creation module 1311 is ready to create a Flash plug-in, the CoGetClassObject is intercepted, and a Flash plug-in proxy object is created.
- the Flash plug-in proxy object includes a series of interfaces, including an IUnknown pointer. Many standard interfaces that will be called, such as I01e0bject, IVi ewObject, etc. Then, when the CreateClass of IClassFactory is called, the created Flash plugin proxy object is returned to the IUnknown pointer of the page process.
- Flash plugin proxy object When the page process activates the Flash plugin proxy object, information about the properties, URL, size, and the like of the Flash plugin is extracted, and then a separate process is created by the independent process module 1320.
- the CoGetClassObject is called in the independent process, and the second creation module 1321 intercepts the CoGetClassObject to create a Flash plugin activity object.
- the Flash plugin activity object includes a series of interfaces, including many standard interfaces that the IUnknown pointer will call, such as I01e0bject, IVi ewObject, and so on. Then, when the CreateClass of IClassFactory is called, the created Flash plugin activity object is returned to the IUnknown pointer of the independent process.
- the blocking module 1322 prevents the execution of the Flash plugin active object by blocking the timing message (such as 0x401 message) in the thread message loop or by modifying the properties of the Flash plugin active object, that is, preventing the Flash plugin from playing the corresponding Flash content. Further, the blocking module 1322 is configured to find a function for recording the properties of the Flash plugin according to the IUnknown pointer, and the function of the Flash plugin can be modified by calling the function. After the user-initiated request to execute the function implemented by the Flash plug-in, the execution module 1323 continues to execute the function of the Flash plug-in by canceling the interception of the timing message in the thread loop or by modifying the properties of the Flash plug-in, that is, continuing to play the Flash content. .
- the independent process module 1320 may further include a drawing module 1324, configured to intercept a drawing function of the active object in a separate process, and call a custom drawing function to draw a customized interface.
- the page process module 1310 includes a display module 1312 adapted to invoke the active object by communicating with the independent process through the proxy object, and displaying a customized interface at a specified position of the browser.
- the page process module includes a drawing module, configured to intercept the action of the proxy object in the page process to communicate with the independent process to call the active object, call a custom drawing function to draw a custom interface, in the browser The specified location displays a custom interface.
- a Flash plugin proxy object is created in a browser page process, a real Flash plugin is created in a separate process, and after the real Flash plugin is created, the module is blocked by intercepting The timing message in the thread message loop or modify the properties of the Flash plug-in to prevent the Flash plug-in from playing the Flash content; after the user initiates the request to play the Flash, the execution module cancels the timing in the loop of the intercepted thread message.
- the content of the Flash plug-in is modified, so that the Flash plug-in continues to play the Flash content, thereby realizing the point-and-click broadcast of the Flash content corresponding to the Flash plug-in.
- the real Flash plug-in is separated from the page process, so that the Flash plug-in does not affect the page process when the problem occurs.
- the stability of the browser especially when the Flash plugin has a security problem such as a virus, does not affect the page process, and improves the security of the browser; at the same time, the problem of the page process does not affect the normality of the Flash plugin. Run, improve the stability of the plugin.
- the present invention also provides a browser comprising the apparatus for creating any of the browser activity objects described in the fifth to eighth embodiments above.
- the embodiment of the present invention provides a video playing method, which can obtain corresponding playing information when a video playback occurs in a preset state, determine address information of a video that matches the playing information, and feed back the address information. . Therefore, the browser can play the video according to the address information, so that the video can be viewed normally, and the problem of card, slow, and unplayable is avoided as much as possible.
- This embodiment mainly discusses the processing of the server in the video playing method, and specifically includes:
- FIG. 14 is a flow chart showing a video playing method according to Embodiment 1 of the present invention.
- Step 1401 Receive playback information obtained by the browser.
- the play information is acquired in a video in which a preset state occurs during playback.
- the browser continuously detects the playing state of the video during the video playing process.
- the player may obtain the playing information of the video, for example, the name of the video and the video playing. Total time, etc.
- the play information is then sent to the server so that the server can receive the play information.
- Step 1402 Determine a video that matches the play information, and obtain address information of the matched video.
- the server may detect and match according to the play information, thereby determining a video that matches the play information, and obtaining address information of the matched video.
- the address information may include a play address of the matched video.
- the play information includes a name of the video and a play address of the video
- the server can match according to the name, thereby obtaining a video that matches the name, and a play address of each video, and the play address constitutes the address information.
- the play address of each video may be compared with the play address in the play information, and the play address that is the same as the play address in the play information may be removed to form address information.
- Step 1403 The address information is fed back to the browser.
- the address information can then be fed back to the browser such that the browser can play the video based on the address information.
- the corresponding playback information may be acquired when the video playback is in a preset state, and the address information of the video matching the playback information is determined, and the address information is fed back. Therefore, the browser can play the video according to the address information, so that the user can watch the video normally, and try to avoid problems such as the card being slow, unable to play, and the like.
- the method further includes:
- the information of various video resources may be collected in advance in the network, and the collected information constitutes video information, thereby setting a video library in the server, and the video library is used to store video information of the video in the network.
- the video information includes video description information and a play address.
- the video description information may be related information that describes the video, including a name, an introduction, a play time, and the like, so that the corresponding video can be determined by using the video description information.
- the video description information may also include the type of the video.
- different kinds of videos also include respective video description information, such as video description information of a TV series or movie, which may include main actors, profiles, directors, ages, types, and ratings, and the video description information of the variety shows may include broadcast time, etc. .
- the play address is a storage address of a video in the network, such as a Uniform / Universal Resource Locator (URL) address.
- the video represented by the same video description information may store multiple play addresses, such as link addresses corresponding to video websites of Youku, Tudou, Sohu, Thunder, and iQiyi, respectively, and the link addresses may be separately stored.
- Table 1 The link addresses corresponding to video websites of Youku, Tudou, Sohu, Thunder, and iQiyi, respectively, and the link addresses may be separately stored.
- the video information may also include data such as play parameters and rankings, as discussed later.
- FIG. 15 is a flowchart of a first video library preset method according to a first embodiment of the present invention.
- the preset video library in the server includes:
- Step 1501 Search for a video in the network in advance, and obtain video information of the video.
- the video information includes: video description information, and a play address.
- Video information such as video description information and play address
- Step 1502 Organize the video information of each video to determine each video whose video description information is consistent.
- the video information of the video is collated, so that the video description information in the partial video information is consistent, and the consistency can be understood as that part or all of the video description information of the video is the same, such as the same name, and the same as the profile. .
- the video description information of the two videos is consistent, for example, the video description information of the two videos has 10 Kind, 8 of which are the same, then you can recognize The video description information for the two videos is consistent.
- each video whose video description information is consistent can be determined by the above method.
- Step 1503 Acquire a play address of each video whose video description information is consistent, and associate with the video description information to construct a video library.
- a video description information can correspond to multiple play addresses, as shown in Table 1.
- FIG. 16 is a flowchart of a second video library preset method according to Embodiment 1 of the present invention.
- the method for presetting the video library in the server further includes: Step 1601: Perform a play test on the video corresponding to each play address in the video library periodically. , obtaining playing parameters of each play address.
- the play test of each video in the video library may be periodically tested.
- the timing refers to a fixed time, such as every 24 hours, or 0 every day. That is, the corresponding video is obtained by the play address and played, thereby testing the average download speed, playing time, and the like of the video, and further testing whether the video has a card or a slow state during the video playing, thereby forming a play.
- the play parameters may include an average download speed, a play time, a card, a slow occurrence, and the like.
- the playback status of each video can be tested. If the bandwidth of the server providing the video itself is relatively small, the average download speed of the video may be relatively low; if there is a problem with the interaction between the video and the page, the video may have more Cards appear, slow, etc. Therefore, in the pre-test, the playback of each video can be determined.
- Step 1602 Sort the play parameters to obtain a ranking of each play address.
- the play parameters may be sorted, for example, the average download speed is sorted, or the number of occurrences of the card, the slow phenomenon, and the like are sorted, and of course, each video in the play parameter may be combined to obtain each video, that is, each play.
- the ranking of the address may be sorted, for example, the average download speed is sorted, or the number of occurrences of the card, the slow phenomenon, and the like are sorted, and of course, each video in the play parameter may be combined to obtain each video, that is, each play. The ranking of the address.
- the ranking may be a ranking in which the playback quality is changed from high to low.
- the high playback quality may be understood as the occurrence of at least one of the following conditions: The average download speed is higher, and the number of occurrences of cards, slow, and the like is higher. If the playback quality is low, it can be understood that at least one of the following conditions occurs: The average download speed is low, and the number of occurrences of cards, slow, and the like is high.
- Step 1603 Associate the ranking with the play address and add to the video library.
- the ranking can then be associated with a corresponding play address, such that the corresponding play address can be determined by ranking, and the ranking is added to the video library, as shown in Table 1.
- Determining the video that matches the play information, and acquiring the address information of the matched video including:
- the play information in the embodiment of the present invention may include video description information of a part, a profile, and the like of the video, so that the play information may be matched with video description information in the video library, as described in The name in the play information is matched with the name in the video description information to obtain matching video description information.
- each play address associated with the matched video description information is obtained, and each play address is formed into address information.
- one of the play addresses may be obtained to form address information, and multiple play addresses may be acquired to form address information. This embodiment of the present invention does not limit this.
- the play address of the previous predetermined number of bits may constitute the address information.
- the method further includes: adding a ranking associated with the play address of the previous predetermined number of bits to the address information.
- the ranking associated with the play address of the previous predetermined number of bits may be added to the address information, so that the ranking of each play address may be determined by the address information, which is convenient for the user to select.
- the play information further includes a stop time of the video, that is, a time when the video is played when the play information is sent, for example, the video of 90 minutes stops at 45 minutes. Therefore, the stop information can be included in the address information fed back by the server. After the playback address is reselected, the time point of the playback can be configured as the stop time, and then the playback can be started from the stop time.
- a stop time of the video that is, a time when the video is played when the play information is sent, for example, the video of 90 minutes stops at 45 minutes. Therefore, the stop information can be included in the address information fed back by the server. After the playback address is reselected, the time point of the playback can be configured as the stop time, and then the playback can be started from the stop time.
- a video library can be formed by acquiring video description information, a play address, and the like of a video in the network, so that the video can be quickly matched to the video in the video library when the preset state of the video playback occurs. , save time.
- the video corresponding to each play address in the video library can be played and tested periodically, so that the play parameters of the play addresses can be obtained, and the ranking of each play address is determined and added to the video library, so each can be determined in advance. Play the playback status of the address, and then feed back to the user the playback address with better playback status.
- This embodiment mainly discusses the processing of the browser in the video playing method, and specifically includes:
- FIG. 17 is a flowchart of a method for playing a video according to a second embodiment of the present invention.
- the embodiment of the invention further provides a video playing method, including:
- Step 1701 Monitor a video playing process, and when detecting that the played video is in a preset state, acquire a broadcast message of the video.
- the browser can monitor the playing process of the video in real time during the process of playing the video, so as to obtain the playing information of the video when it detects that the played video is in a preset state.
- the preset state includes any one of the following: 1. Failed to acquire video data; 2. The video stops playing for more than the first preset time; 3. The difference between the actual video playback time minus the theoretical playback time exceeds the second Preset time.
- the data of the video is downloaded from the server of the video to play the video.
- the data of the video may be considered that the video is failed to be acquired.
- the failure to obtain the video may occur before the playback.
- the video cannot be played at all, or it may appear during playback. At this time, the video cannot be played.
- the first preset time is the maximum time when the video stops playing, such as 1 minute, 3 minutes, etc., and the video stop playing time exceeds the first preset time, that is, the video stop playing time exceeds the maximum time, and the video play may be considered to appear.
- the user can be recommended to revisit the video by recommending another play address.
- the actual playing time is from the start of playing the video to the current time period, such as 9:00, and currently 9:40, the actual playing time is 40 minutes.
- the theoretical playing time is the time corresponding to the data currently being played by the video, for example, the video is 100M, and the total time is 100 minutes. Currently playing 30M, the theoretical playback time is 30 minutes.
- the second preset time is a time for measuring the progress of the video playing, for example, the video may not stop for a long time, but may stop, play, the playing effect is very bad, affecting the user to watch, therefore, the first
- the second preset time is measured, that is, when the difference between the actual playing time of the video minus the theoretical playing time exceeds the second preset time, for example, the actual playing time of the video from the start of playing to the current video is 40 minutes, but the theory of the video
- the embodiment of the present invention can play a video in an independent process in a browser, and the monitoring video playing process includes: Monitor the playback process of video in an independent process.
- the video can also be played by an independent process, so that the video playing process in the independent process can be monitored.
- an independent process taking flash as an example to briefly explain the calling and communication process of the independent process can be as follows:
- the browser when the browser creates the ActiveX plugin (in this case, the flash plugin), it will query the registry according to the plugin CLSID or ProgID (acquire CLSID through CLSIDFromProgID) to check whether the corresponding plugin is installed in the system. The installation will continue with the creation process.
- the browser gets the IUnknown pointer of the corresponding plugin by calling CoGetClassObject and then interoperating through the standard interface.
- the execution process of CoGetClassObject is to query the ActiveX path through the CLSID.
- Hook CoGetClassObject creates an ActiveX control object that includes a series of interfaces, such as many standard interfaces that the IUnknown pointer will call, such as I01e0bject, IViewObject, and so on. Then, when the CreateClass of IClassFactory is called, the created ActiveX control object is returned to the IUnknown pointer of the ActiveX plugin.
- the page When the page activates the ActiveX control, it extracts information about the control's properties, URL, size, and so on, and then creates a separate process. Specifically, create a document, insert an object object, the independent process calls CoGetClassObject, Hook the CoGetClassObject, and then create another ActiveX control object, the ActiveX control object includes a series of interfaces, such as the IUnknown pointer will call a lot Standard interfaces, such as I01e0bject, IViewObject, and so on. Then, when the CreateClass of IClassFactory is called, the other ActiveX control object created is returned to the IUnknown pointer of the ActiveX plugin of the independent process.
- two control objects can interact with size, focus, refresh, script, and other information.
- all requests in the above two processes may be intercepted, and information interaction between the two processes is implemented by two ActiveX control objects created in advance.
- the specific process of the flash is performed in an independent process, and thus does not affect the progress of the original web page.
- Step 1702 Send the play information to the server.
- the play information may include a name, a play time, etc., and the play information may then be sent to the server to cause the server to match the play information to the corresponding video.
- Step 1703 Receive address information fed back by the server, for playing the video corresponding to the address information.
- the address information fed back by the server is received, and a corresponding play address is selected from the address information, so that the video corresponding to the play address is played.
- the user can select a play address, that is, send a play instruction, where the play instruction includes the selected play address, so that the play address can be The corresponding video is played.
- the video after playing the video in an independent process, the video can be better controlled to determine the playback of the video. Status.
- the stop time of the video when the video information is sent may also be recorded, and then, when the playback instruction is used to play the video, the stop time may be included as the time for starting the play, so that the newly played video can be stopped before. The time begins to play, making it easy for users to watch.
- the above describes the processing of the browser and the server in the video playing method.
- the following describes the video playing method from a whole perspective, which specifically includes:
- FIG. 18 is a schematic diagram showing a method for playing a video according to a third embodiment of the present invention.
- the video information in the network is pre-searched, and the video information of the video is obtained, where the video information includes: video description information, a play address;
- the device obtains a play address of each video whose video description information is consistent, and associates with the video description information to construct a video library.
- the rank is associated with the play address and added to the video library.
- the browser monitors the video playing process, and when detecting that the played video is in a preset state, acquiring a broadcast message of the video
- the preset state includes any one of the following: failing to acquire video data, stopping the playing time of the video exceeding the first preset time, and comparing the difference between the actual playing time of the video and the theoretical playing time by more than the second preset time.
- playing a video in a separate process in the browser monitoring the playback process of the video in the independent process.
- the browser sends the playback information to the server.
- the server determines a video that matches the playback information, and obtains address information of the matched video.
- the match information is matched with the video description information in the video library to determine matching video description information. 18. acquiring each play address associated with the matched video description information, and forming each address address into an address letter
- the play address of the previous predetermined number of bits is obtained from the ranking, and the play address of the previous predetermined number of bits constitutes the address information.
- the server feeds back the address information to the browser
- the address information fed back by the server is used to play the video corresponding to the address information.
- the corresponding playback information may be acquired when the video playback is in a preset state, and the address information of the video matching the playback information is determined, and the address information is fed back. Therefore, the browser can play the video according to the address information, so that the video can be viewed normally, and the problem of the card being slow, unable to play, and the like can be avoided as much as possible.
- Figure 19 is a diagram showing the structure of a server in accordance with Embodiment 4 of the present invention.
- the embodiment of the invention further provides a server, including:
- the receiving module 191 is configured to receive the play information acquired by the browser, where the play information is obtained in a video in which a preset state occurs during playback;
- the matching and obtaining module 192 is configured to determine a video that matches the playing information, and obtain address information of the matched video.
- the feedback module 193 is configured to feed back the address information to the browser.
- the server further includes:
- the preset module 190 is configured to preset a video library in the server, where the video library is used to store video information of the video in the network.
- the preset module 190 is specifically configured to search for a video in the network in advance, and obtain video information of the video, where the video information includes: video description information, a play address; The video information is collated, and each video whose video description information is consistent is determined. The play address of each video whose video description information is consistent is obtained, and is associated with the video description information to construct a video library.
- the preset module 190 is further configured to perform a play test on the video corresponding to each play address in the video library, and obtain a play parameter of each play address; sort the play parameters. , obtaining a ranking of each play address; associating the ranking with the play address, and adding to the video library.
- the matching and acquiring module 192 includes:
- a matching sub-module 1921 configured to match the play information with video description information in the video library to determine matching video description information
- the obtaining sub-module 1922 is configured to acquire each play address associated with the matched video description information, and configure the play address to form address information.
- the acquiring sub-module 1922 is specifically configured to acquire each play address associated with the matched video description information, and obtain a ranking associated with each play address;
- the play address of the previous predetermined number of bits constitutes the address information of the play address of the previous predetermined number of bits.
- the obtaining sub-module 1922 is specifically configured to add a ranking associated with the play address of the previous predetermined number of bits to the address information.
- the preset state includes any one of the following: failing to acquire video data, stopping the playing time of the video exceeding the first preset time, and comparing the difference between the actual playing time of the video and the theoretical playing time exceeds the second preset Set the time.
- Figure 20 is a diagram showing the structure of a browser in accordance with a fourth embodiment of the present invention.
- a browser is further provided in the embodiment of the present invention, including:
- the monitoring and acquiring module 201 is configured to monitor a video playing process, and when detecting that the played video is in a preset state, acquiring the playing information of the video;
- the sending module 202 is configured to send the play information to a server.
- the receiving and playing module 203 is configured to receive address information fed back by the server, for playing the video corresponding to the address information.
- the receiving and playing module 203 includes:
- the receiving submodule 2031 is configured to receive address information fed back by the server, and display a play address in the address information.
- the playing sub-module 2032 is configured to receive a play instruction, and play the corresponding video according to the play instruction. In the embodiment of the present invention, a video is played in an independent process in a browser;
- the monitoring and acquiring module 2031 is specifically configured to monitor a video playing process in an independent process.
- the preset state includes any one of the following: failing to acquire video data, stopping the playing time of the video exceeding the first preset time, and comparing the difference between the actual playing time of the video and the theoretical playing time exceeds the second preset Set the time.
- Figure 21 is a block diagram showing the structure of a video playback system according to a fifth embodiment of the present invention.
- the embodiment of the invention further provides a video playing system, comprising: a server 213 and a browser 214.
- the server 213 includes:
- the receiving module 2131 is configured to receive the play information acquired by the browser, where the play information is acquired in a video in a preset state during playback;
- the matching and obtaining module 2132 is configured to determine a video that matches the play information, and obtain address information of the matched video,
- the feedback module 2133 is configured to feed back the address information to the browser.
- the server further includes:
- the preset module 2130 is configured to preset a video library in the server, where the video library is used to store video information of the video in the network.
- the preset module 2130 is specifically configured to search for a video in the network in advance, and obtain video information of the video, where the video information includes: video description information, a play address; The video information is collated, and each video whose video description information is consistent is determined. The play address of each video whose video description information is consistent is obtained, and is associated with the video description information to construct a video library.
- the preset module 2130 is further configured to periodically play a play test on a video corresponding to each play address in the video library, and obtain a play parameter of each play address; sort the play parameters. , obtaining a ranking of each play address; associating the ranking with the play address, and adding to the video library.
- the matching and acquiring module 2132 includes:
- a matching submodule configured to match the play information with video description information in the video library to determine matching video description information
- acquiring a sub-module configured to acquire each play address associated with the matched video description information, and form each play address into address information.
- the acquiring sub-module is specifically configured to acquire each play address associated with the matched video description information, and obtain a ranking associated with each play address; a play address of a predetermined number of bits, and the play address of the previous predetermined number of bits constitutes the address information.
- the acquiring sub-module is specifically configured to add a ranking associated with the play address of the previous predetermined number of bits to the address information.
- the preset state includes any one of the following: failing to acquire video data, stopping the playing time of the video exceeding the first preset time, and comparing the difference between the actual playing time of the video and the theoretical playing time exceeds the second preset Set the time.
- the browser 214 includes:
- the monitoring and acquiring module 2141 is configured to monitor a video playing process, and when detecting that the played video is in a preset state, acquire playing information of the video;
- a sending module 2142 configured to send the play information to a server
- the receiving and playing module 2143 is configured to receive address information fed back by the server, to be used for the video corresponding to the address information. Line play.
- the receiving and playing module 2143 includes:
- a receiving submodule configured to receive address information fed back by the server, and display a play address in the address information
- the playing submodule is configured to receive a play instruction, and play the corresponding video according to the play instruction.
- a video is played in an independent process in a browser
- the monitoring and acquiring module is specifically configured to monitor a video playing process in an independent process.
- the preset state includes any one of the following: failing to acquire video data, stopping the playing time of the video exceeding the first preset time, and comparing the difference between the actual playing time of the video and the theoretical playing time exceeds the second preset Set the time.
- the corresponding playback information may be acquired when the video playback is in a preset state, the address information of the video matching the playback information is determined, and the address information is fed back. Therefore, the browser can play the video according to the address information, so that the video can be viewed normally, and the problem of the card being slow, unable to play, and the like can be avoided as much as possible.
- a video library can be formed by acquiring video description information, a play address, and the like of the video in the network, so that the video can be quickly matched to the video in the video library when the preset video status of the browser occurs, thereby saving time.
- the video corresponding to each play address in the video library can be played and tested periodically, so that the play parameters of the play addresses can be obtained, and the ranking of each play address is determined and added to the video library, so each can be determined in advance. Play the playback status of the address, and then feed back to the user the playback address with better playback status.
- the various component embodiments of the present invention may be implemented in hardware, or in a software module running on one or more processors, or in a combination thereof.
- a microprocessor or digital signal processor (DSP) may be used in practice to implement some or all of the functionality of some or all of the components in accordance with embodiments of the present invention.
- the invention can also be implemented as a device or device program (e.g., a computer program and a computer program product) for performing some or all of the methods described herein.
- a program implementing the invention may be stored on a computer readable medium or may be in the form of one or more signals.
- signals may be downloaded from an Internet website, provided on a carrier signal, or provided in any other form.
- Figure 22 illustrates a client or server in which the present invention may be implemented.
- the client or server conventionally includes a processor 2210 and a computer program product or computer readable medium in the form of a memory 2220.
- the memory 2220 may be an electronic memory such as a flash memory, an EEPROM (Electrically Erasable Programmable Read Only Memory), an EPR0M, a hard disk, or a ROM.
- Memory 2220 has a memory space 2230 for program code 2231 for performing any of the method steps described above.
- storage space 2230 for program code may include various program code 2231 for implementing various steps in the above methods, respectively.
- the program code can be read from or written to one or more computer program products.
- Such computer program products include program code carriers such as hard disks, compact disks (CDs), memory cards or floppy disks.
- Such a computer program product is typically a portable or fixed storage unit as described with reference to Figure 23.
- the storage unit may have a storage section, a storage space, and the like arranged similarly to the storage 2220 in the client or server of Fig. 22.
- the program code can be compressed, for example, in an appropriate form.
- the storage unit includes computer readable code 223, i.e., code that can be read by, for example, a processor such as 2210, which when executed by the server causes the server to perform various steps in the methods described above.
- an embodiment or “one or more embodiments” as used herein means that a particular feature, structure, or characteristic described in connection with the embodiments is included in at least one embodiment of the invention.
- the phrase “in one embodiment” herein does not necessarily refer to the same embodiment.
- the word "a” or "an” preceding a component does not exclude the presence of a plurality of such elements.
- the invention can be implemented by means of hardware comprising several distinct elements and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means can be embodied by the same hardware item.
- the use of the words first, second, and third does not indicate any order. These words can be interpreted as names.
- a method for creating a browser active object including: preventing creation of the active object before the browser creates the active object; and performing a function implemented by the active object according to the user-initiated The request continues to create the active object and then performs the functions implemented by the active object.
- the step of preventing the creation of the active object before the browser creates the active object comprises: preventing the creation of the active object in a page process of the browser.
- the step of continuing to create the active object according to a request initiated by a user to perform a function implemented by the active object, and then performing the function implemented by the active object comprises: intercepting a browser
- the page process creates an action of the active object, creating a proxy object in the browser's page process to replace the active object actually to be created, the proxy object running in the page process; in a separate process of the page process independent of the browser,
- the active object is created; the active object is invoked by the proxy object in communication with the independent process, and/or the proxy object communicates with the independent process by the active object, performing the functions implemented by the active object.
- step of preventing the creation of the active object comprises: acquiring a class identifier of the active object, and stopping performing an operation of querying a registry according to a class identifier of the active object .
- step of continuing to create the active object comprises: continuing to perform an operation of querying a registry according to a class identifier of the active object.
- a method for creating a browser active object including: after the browser creates the active object, by intercepting a timing message in the thread message loop or by performing attributes on the active object Modifying, preventing execution of the function implemented by the active object; according to a request initiated by the user to perform the function implemented by the active object, by canceling the interception of the timing message in the thread message loop or by modifying the attribute of the active object, Continue to perform the functions implemented by the active object.
- the method before the browser creates the active object, the method further includes: intercepting a browser process of the browser to load the active object, and creating a proxy object in the browser process of the browser to replace the active object to be created, The proxy object is run in a page process; the process of creating an active object by the browser is specifically: creating the active object in an independent process independent of a page process of the browser; and continuing to execute the active object
- the steps of the implemented functions are specifically: calling the active object by communicating with the independent process by the proxy object, and/or, the proxy object is in communication with the independent process, and is called by the active object to perform the function implemented by the active object.
- B8. The method according to B6 or B7, wherein the timing message is a 0x401 message.
- the method according to B6 or B7, wherein the modifying the attribute of the active object comprises: acquiring an interface pointer of the active object; and calling a function that searches for an attribute of the active object according to the interface pointer, and calling the function Modify the properties of the active object.
- B10 The method according to B6, before the step of continuing to perform the function implemented by the active object, comprising: intercepting a drawing function of the active object, calling a custom drawing function to draw a custom interface, in the browsing The custom interface is displayed at the specified location of the device.
- Bl according to the method described in B7, before the step of continuing to perform the function implemented by the active object, comprising: intercepting a drawing function of the active object in the independent process, calling a custom drawing function to draw a custom interface , calling the active object by communicating with the independent process through the proxy object, The specified location of the browser displays the customized interface; or, in the page process, intercepting the action of the proxy object communicating with the independent process to invoke the active object, calling a custom drawing function to draw a custom interface, in the browsing The custom interface is displayed at the specified location of the device.
- a device for creating a browser active object comprising: a blocking module, configured to block creation of the active object before the browser creates the active object; the first creating module is adapted to be The user-initiated request to execute the function implemented by the active object continues to create the active object; and the execution module is adapted to perform the function implemented by the active object after the first creating module creates the active object.
- the device comprises a page process module, the blocking module, the first creating module and the executing module are all sub-modules of the page process module; the blocking module is specifically adapted to be in a page process Prevent the creation of active objects.
- the device comprises a page process module and an independent process module; the blocking module is a submodule of the page process module, and the first creation module and the execution module are the independent process module
- the sub-module module further includes: a second creation module, configured to: according to a request initiated by the user to perform the function implemented by the active object, intercepting a browser process of the browser to load the active object, in the browser
- the page process creation proxy object replaces the active object to be created, the proxy object running in the page process;
- the first creation module is specifically adapted to create the in the independent process of the page process independent of the browser
- the active object; the device further includes a communication window respectively created in the page process module and the independent process module, the execution module is specifically adapted to invoke the active object by communicating with the independent process via the communication window through the proxy object, And/or, the proxy object communicates with the independent process via the communication window
- the active object is called to perform the functions implemented by the active object.
- the first creating module is specifically adapted to continue to perform an operation of querying a registry according to the class identifier of the active object.
- a browser for creating a browser active object according to any one of C12 to C16 is disclosed in accordance with an embodiment of the present invention.
- An embodiment of the present invention discloses an E18, a browser active object creation apparatus, comprising: a blocking module adapted to intercept a timing message in a thread message loop or by the activity after the browser creates the active object The attribute of the object is modified to prevent execution of the function implemented by the active object; the execution module is adapted to cancel the interception of the timing message in the thread message loop or by means of the request according to the user-initiated request to perform the function implemented by the active object The attributes of the active object are modified and the functions implemented by the active object are continued. 19.
- the apparatus comprising a page process module; the blocking module and the execution module being sub-modules of the page process module.
- the device includes a page process module and an independent process module; the blocking module and the execution module are sub-modules of the independent process module; the page process module includes: a module, adapted to intercept an operation of the browser process of the browser to load the active object, create a proxy object in the browser process of the browser to replace the active object to be created, the proxy object runs in the page process; the independent process module further includes a second creation module, adapted to create the activity object in a separate process independent of the page process; the apparatus further comprising a communication window respectively created in the page process module and the independent process module, The execution module is further adapted to invoke the active object by the proxy object communicating with the independent process via the communication window, and/or the proxy object is invoked by the active object via the communication window to be executed by the active object, and the execution of the active object is continued.
- the page process module includes: a module, adapted to intercept an operation of the browser process of the browser to load the active object, create a proxy object in the browser process of the browser to replace the active object to
- E21 The device according to any one of E18 to E20, wherein the timing message is a 0x401 message.
- the blocking module is specifically adapted to acquire an interface pointer of the active object; and searching for a function for recording an attribute of the active object according to the interface pointer, calling the function to The properties of the active object are modified to prevent the functions implemented by the active object from being executed.
- E23 The device according to E19, further comprising: a drawing module, adapted to intercept a drawing function of the active object, calling a custom drawing function to draw a custom interface, and displaying the customization at a specified position of the browser interface.
- the independent process module further includes: a drawing module, configured to intercept a drawing function of the active object in the independent process, and call a custom drawing function to draw a custom interface;
- the page process module further includes: a display module adapted to invoke the active object by communicating with the independent process through the proxy object, and displaying the customized interface at a specified location of the browser.
- the page process module further includes: a drawing module, configured to intercept, in the page process, a proxy object communicates with an independent process to invoke an active object, and invokes a custom drawing function to draw a custom An interface that displays the customized interface at a specified location of the browser.
- F26 a browser including a device for creating a browser active object according to any one of E18 to E25, is disclosed.
- a video playing method including: receiving playback information acquired by a browser, where the playback information is acquired in a video in a preset state during playback; determining and playing the information Matching the video, and obtaining address information of the matched video; feeding the address information to the browser.
- the method of G1 further comprising: presetting a video library in the server, where the video library is used to store video information of the video in the network.
- the method of G2 the presetting a video library in the server, comprising: pre-searching for a video in the network, and acquiring video information of the video, where the video information includes: video description information, and playing The video information of each video is collated, and each video whose video description information is consistent is determined. The play address of each video whose video description information is consistent is obtained, and is associated with the video description information to construct a video library.
- the method of any one of G3 or G4, the determining a video that matches the play information, and acquiring the address information of the matched video comprising: playing the play information with the video library The video description information is matched, and the matched video description information is determined; each play address associated with the matched video description information is obtained, and the play addresses are formed into address information.
- G6 The method of G5, acquiring each play address associated with the matched video description information, and configuring the play address to form address information, including: acquiring each play associated with the matched video description information Addressing, and obtaining a ranking associated with each of the play addresses; obtaining a play address of the previous predetermined number of bits from the ranking, and forming the play address of the previous predetermined number of bits to form the address information.
- G7 The method of G6, further comprising: adding a ranking associated with the play address of the previous predetermined number of bits to the address information.
- G8 The method according to G1, wherein the preset state includes any one of the following: failing to acquire video data, stopping the playing time of the video exceeding the first preset time, and exceeding a difference between the actual playing time of the video and the theoretical playing time. The second preset time.
- a playback method of a video including: monitoring a video playing process, and when detecting that a played video is in a preset state, acquiring play information of the video; sending the play information Sending to the server; receiving address information fed back by the server, for playing the video corresponding to the address information.
- the method of H9, the receiving the address information fed back by the server, for playing the video corresponding to the address information comprising: receiving address information fed back by the server, and displaying a play address in the address information. ; Receive the playback command and play the corresponding video according to the playback command. Hll.
- a video is played by an independent process in a browser
- the monitoring video playing process includes: monitoring a video playing process in an independent process.
- the preset state includes any one of the following: failing to acquire video data, stopping the playing time of the video exceeding the first preset time, and exceeding a difference between the actual playing time of the video and the theoretical playing time. The second preset time.
- a server comprising: a receiving module, configured to receive playback information acquired by a browser, where the playback information is acquired in a video in a preset state during playback; matching and acquiring a module, configured to determine a video that matches the play information, and obtain address information of the matched video; and a feedback module, configured to feed back the address information to the browser.
- the server of claim 113 further comprising: a preset module, configured to preset a video library in the server, where the video library is used to store video information of the video in the network.
- the server of claim 114 wherein the preset module is configured to pre-search for video in the network, and obtain video information of the video, where the video information includes: video description information, a play address; The video information of each video is collated, and each video whose video description information is consistent is determined; and each video whose video description information is consistent is obtained.
- the play address is associated with the video description information to construct a video library.
- the preset module is further configured to perform a play test on the video corresponding to each play address in the video library, and obtain a play parameter of each play address; Sorting, obtaining a ranking of each play address; associating the ranking with the play address, and adding to the video library.
- the matching and acquiring module comprises: a matching submodule, configured to match the play information with video description information in the video library to determine a matching video. Decoding information; an obtaining submodule, configured to acquire each play address associated with the matched video description information, and form the play address to form address information.
- the preset state comprises any one of the following: failing to acquire video data, stopping the playing time of the video exceeding the first preset time, and exceeding a difference between the actual playing time of the video and the theoretical playing time. The second preset time.
- a browser including: a monitoring and acquiring module, configured to monitor a video playing process, and when detecting that a played video is in a preset state, acquiring playback information of the video; And the receiving and playing module is configured to receive the address information fed back by the server, for playing the video corresponding to the address information.
- the receiving and playing module comprising: a receiving submodule, configured to receive address information fed back by the server, and display a play address in the address information; and a playing submodule, configured to receive and play The instruction plays the corresponding video according to the play instruction.
- the browser according to J21 wherein a video is played by an independent process in a browser; and the monitoring and acquiring module is specifically configured to monitor a video playing process in an independent process.
- J24. The browser according to J21, wherein the preset state comprises any one of the following: failing to acquire video data, stopping the playing time of the video exceeding the first preset time, and subtracting the difference between the actual playing time of the video and the theoretical playing time More than the second preset time.
- the K25 a video playing system, includes: a server and a browser; the server, comprising: a receiving module, configured to receive playing information acquired by a browser, where the playing information is during playing a matching and acquiring module, configured to determine a video that matches the playback information, and obtain address information of the matched video; and a feedback module, configured to feed back the address information to
- the browser includes: a monitoring and acquiring module, configured to monitor a video playing process, and when detecting that the played video is in a preset state, acquiring playback information of the video; and sending a module, The broadcast information is sent to the server, and the receiving and playing module is configured to receive address information fed back by the server, for playing the video corresponding to the address information.
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Databases & Information Systems (AREA)
- Data Mining & Analysis (AREA)
- Human Computer Interaction (AREA)
- Stored Programmes (AREA)
- Information Transfer Between Computers (AREA)
Abstract
本发明公开了一种浏览器中插件的播放方法,还公开了相应的装置。本发明公开了一种浏览器活动对象的创建方法、装置及浏览器。本发明涉及网络计算,具体涉及一种视频的播放方法,一种浏览器,一种服务器以及一种视频的播放***。其中,服务器的方法包括:接收浏览器获取的播放信息,所述播放信息是在播放时出现预置状态的视频中获取的;确定与所述播放信息匹配的视频,并获取所述匹配的视频的地址信息;将所述地址信息反馈给所述浏览器。
Description
浏览器中插件的播放方法及装置 技术领域
本发明涉及网络应用领域, 具体涉及一种浏览器中插件的播放方法及装置。 背景技术
在打开浏览器时浏览器的页面进程会创建活动对象, 而后进行页面的各项操作, 活动对象 通常指浏览器的插件, 例如 Act iveX插件。
因为 Act iveX插件需要嵌入到网页中, 所以插件和页面会在同一个进程下运行。 如果该插 件出现卡死或者崩溃后, 会导致整个网页退出, 影响了页面操作的稳定性。 当页面进程出现卡 死或者崩溃后, 会导致页面中的 Act i veX插件退出, 影响了 Act iveX插件的稳定性。
并且, 由于 Act iveX插件在网页的位置相对比较固定, 用户无法动态调整 Act iveX插件的 大小和显示位置。
如果 Act iveX插件被嵌入到网页中, 在用户打开网页时, 会自动触发 Act iveX插件的加载 和播放。 目前, 很多网页上都嵌入有各种音视频插件, 例如 Flash插件, 其内容可能是一些广 告或用户并不关心的内容。 只要用户打开网页就会在第一时间自动加载播放这些 Flash 内容。 对于用户来说, 这种不必要的插件播放造成了用户资源的浪费, 例如浪费电力、 带宽和***资 源, 而且还延长了页面打开时间。
用户在网络中通过网页查询各种视频, 然后点击相应的视频, 进而通过浏览器直接进行播 放。 但是, 在对视频进行播放时, 由于提供视频的服务器本身带宽比较小, 或者视频和页面的 交互存在问题, 常常会出现视频播放时比较卡、 慢的问题, 即视频播放时常常会停顿一段时间 才能继续播放, 甚至出现已经播放了一段时间的视频无法缓冲, 不能继续播放的问题。 更有甚 者可能出现打开网页后, 由于视频无效而完全无法进行播放的问题。 发明内容
鉴于上述问题, 提出了本发明以便提供一种克服上述问题或者至少部分地解决或者减缓上 述问题的浏览器中插件的播放装置和相应的浏览器中插件的播放方法。
依据本发明的一个方面, 提供了一种浏览器中插件的播放方法, 包括: 在浏览器的页面进 程加载并激活第一插件时, 创建与页面进程不同的独立进程, 在独立进程中加载并激活第二插 件, 其中, 所述第二插件复制所述第一插件的信息; 在独立进程中, 对所述第二插件的信息进 行计算, 获取计算结果; 根据所述计算结果在播放窗口中对所述第二插件进行绘制播放。
依据本发明的另一个方面, 提供了一种浏览器中插件的播放装置, 包括: 创建模块, 配置 为在浏览器的页面进程加载并激活第一插件时, 创建与页面进程不同的独立进程, 在独立进程 中加载并激活第二插件, 其中, 所述第二插件复制所述第一插件的信息; 计算模块, 配置为在 独立进程中, 对所述第二插件的信息进行计算, 获取计算结果; 播放模块, 配置为根据所述计 算结果在播放窗口中对所述第二插件进行绘制播放。
根据本发明的又一个方面, 提供了一种计算机程序, 其包括计算机可读代码, 当所述计算 机可读代码在服务器上运行时, 导致所述服务器执行根据权利要求 1-10中的任一个所述的浏览 器中插件的播放方法。
根据本发明的再一个方面, 提供了一种计算机可读介质, 其中存储了如权利要求 21所述的 计算机程序。
在本发明实施例中, 在浏览器的页面进程中加载并激活第一插件, 但是并不对第一插件进 行绘制播放, 而是创建一个与页面进程不同的独立进程, 并在独立进程中加载并激活第二插件, 利用第二插件实现对第一插件信息的复制。 由于第一插件和第二插件的信息是一致的, 因此, 对第二插件的信息进行计算与对第一插件的信息进行计算所取得的计算结果是一致的, 则根据 计算结果在播放窗口中对第二插件进行绘制播放所播放的内容也应该是一致的。 但是, 由于第 二插件设置在独立进程中, 与独立进程共用一个进程, 与页面进程分别适用两个不同的进程, 因此, 第二插件的运行和页面进程的运行是独立的, 一方发生问题并不能够影响另一方的稳定 性。 如果第二插件出现卡死或者崩溃后, 不会导致整个网页退出, 能够提高页面操作的稳定性, 同理, 当页面进程出现卡死或者崩溃后, 也不会导致页面中的第二插件退出, 提高插件运行的 稳定性。 由此可见, 本发明实施例提供的浏览器中插件的播放方法能够在不影响播放效果的前 提下, 提高浏览器运行的稳定性。
进一步, 由于第一插件并未被真正执行, 而第二插件是真实的执行主体, 因此, 可以称第 一插件为代理对象, 而第二插件为活动对象。 本发明实施例通过在页面进程中运行代理对象, 而在独立进程中运行活动对象, 使得真实的浏览器插件, 例如真实的 Act iveX插件与页面进程 分离, 从而使浏览器插件出现问题时不会影响嵌入浏览器插件的浏览器进程, 即浏览器插件出 现问题时不会影响页面进程, 从而提高了浏览器的稳定性。 同时, 当浏览器插件出现病毒等安 全性的问题时, 由于浏览器插件与页面进程分离, 不会影响页面进程的运行, 从而也提高了浏 览器的安全性。
另外, 当浏览器插件出现问题时, 可以对运行浏览器插件的对象线程执行挂起、 降低权限 或终止等操作, 从而使得独立进程可以对浏览器插件的内存占用和 CPU 占用等***资源做定向 的分配, 实现更好的资源分配回收方式, 更合理的调度计算机资源, 终止进程使得进程退出也 可以让资源回收更彻底。
上述说明仅是本发明技术方案的概述, 为了能够更清楚了解本发明的技术手段, 而可依照 说明书的内容予以实施, 并且为了让本发明的上述和其它目的、 特征和优点能够更明显易懂, 以下特举本发明的具体实施方式。 附图说明
通过阅读下文优选实施方式的详细描述, 各种其他的优点和益处对于本领域普通技术人员 将变得清楚明了。 附图仅用于示出优选实施方式的目的, 而并不认为是对本发明的限制。 而且 在整个附图中, 用相同的参考符号表示相同的部件。 在附图中:
图 1示出了根据本发明第一部分一个实施例的浏览器中插件的播放方法的处理流程图; 图 2示出了根据本发明第一部分一个实施例的页面进程和独立进程间进行通信的示意图; 图 3 示出了根据本发明第一部分一个实施例的页面进程中的 flash 插件无播放窗口时的 flash插件播放的示意图;
图 4 示出了根据本发明第一部分一个实施例的页面进程中的 flash 插件有播放窗口时的 flash插件播放的示意图; 以及
图 5示出了根据本发明第一部分一个实施例的浏览器中插件的播放装置的结构示意图。 图 6示出了根据本发明第二部分第一个实施例的浏览器活动对象的创建方法的流程图;
图 7示出了根据本发明第二部分第二个实施例的浏览器活动对象的创建方法的流程图; 图 8示出了根据本发明第二部分第三个实施例的浏览器活动对象的创建方法的流程图; 图 9示出了根据本发明第二部分第四个实施例的浏览器活动对象的创建方法的流程图; 图 10示出了根据本发明第二部分第五个实施例的浏览器活动对象的创建装置的结构框图; 图 11示出了根据本发明第二部分第六个实施例的浏览器活动对象的创建装置的结构框图; 图 12示出了根据本发明第二部分第七个实施例的浏览器活动对象的创建装置的结构框图; 图 13示出了根据本发明第二部分第八个实施例的浏览器活动对象的创建装置的结构框图。 图 14示出了根据本发明第三部分实施例一的视频播放方法的流程图;
图 15示出了根据本发明第三部分实施例一的第一种视频库预置方法流程图;
图 16示出了根据本发明第三部分实施例一的第二种视频库预置方法流程图;
图 17示出了根据本发明第三部分实施例二的视频的播放方法流程图;
图 18示出了根据本发明第三部分实施例三的视频的播放方法示意图;
图 19示出了根据本发明第三部分实施例四的服务器结构图;
图 20示出了根据本发明第三部分实施例四的浏览器结构图;
图 21示出了根据本发明第三部分实施例五的视频的播放***结构图。
图 22示意性地示出了用于执行根据本发明的方法的服务器的框图; 以及
图 23示意性地示出了用于保持或者携带实现根据本发明的方法的程序代码的存储单元。 具体实施例
下面结合附图和具体的实施方式对本发明作进一步的描述。
第一部分
为解决上述至少一个技术问题, 本发明实施例提供了一种浏览器中插件的播放方法, 用于 实现插件与页面进程的独立操作, 保证在其中任意之一发生问题时不会影响另外一个的稳定 性。 图 1 示出了根据本发明一个实施例的浏览器中插件的播放方法的处理流程图。 参见图 1, 浏览器中插件的播放方法包括步骤 S 102至步骤 S 106。 各步骤的具体说明如下。
步骤 S 102、 在浏览器的页面进程加载并激活第一插件时, 创建与页面进程不同的独立进 程, 在独立进程中加载并激活第二插件, 其中, 第二插件复制第一插件的信息。
步骤 S 104、 在独立进程中, 对第二插件的信息进行计算, 获取计算结果。
步骤 S 106、 根据计算结果在播放窗口中对第二插件进行绘制播放。
在本发明实施例中, 在浏览器的页面进程中加载并激活第一插件, 但是并不对第一插件进 行绘制播放, 而是创建一个与页面进程不同的独立进程, 并在独立进程中加载并激活第二插 件, 利用第二插件实现对第一插件信息的复制。 由于第一插件和第二插件的信息是一致的, 因 此, 对第二插件的信息进行计算与对第一插件的信息进行计算所取得的计算结果是一致的, 则 根据计算结果在播放窗口中对第二插件进行绘制播放所播放的内容也应该是一致的。 但是, 由 于第二插件设置在独立进程中, 与独立进程共用一个进程, 与页面进程分别适用两个不同的进 程, 因此, 第二插件的运行和页面进程的运行是独立的, 一方发生问题并不能够影响另一方的 稳定性。 如果第二插件出现卡死或者崩溃后, 不会导致整个网页退出, 能够提高页面操作的稳 定性, 同理, 当页面进程出现卡死或者崩溃后, 也不会导致页面中的第二插件退出, 提高插件 运行的稳定性。 由此可见, 本发明实施例提供的浏览器中插件的播放方法能够在不影响播放效 果的前提下, 提高浏览器运行的稳定性。
进一步, 由于第一插件并未被真正执行, 而第二插件是真实的执行主体, 因此, 可以称第 一插件为代理对象, 而第二插件为活动对象。 本发明实施例通过在页面进程中运行代理对象, 而在独立进程中运行活动对象, 使得真实的浏览器插件, 例如真实的 Act iveX插件与页面进程 分离, 从而使浏览器插件出现问题时不会影响嵌入浏览器插件的浏览器进程, 即浏览器插件出 现问题时不会影响页面进程, 从而提高了浏览器的稳定性。 同时, 当浏览器插件出现病毒等安 全性的问题时, 由于浏览器插件与页面进程分离, 不会影响页面进程的运行, 从而也提高了浏 览器的安全性。
另外, 当浏览器插件出现问题时, 可以对运行浏览器插件的对象线程执行挂起、 降低权限 或终止等操作, 从而使得独立进程可以对浏览器插件的内存占用和 CPU 占用等***资源做定向 的分配, 实现更好的资源分配回收方式, 更合理的调度计算机资源, 终止进程使得进程退出也 可以让资源回收更彻底。
需要说明的是, 在本发明实施例中, 称第一插件为代理对象, 而第二插件为活动对象, 体 现了第一插件和第二插件的主动性不同。 在实施时, 本发明实施例提供的浏览器中插件的播放 方法可以实现双向的通信, 页面进程与独立进程并不是固定的, 后续执行过程有可能会出现将 独立进程中的插件分离到页面进程中进行执行的情况, 此时, 代理对象和活动对象角色互换, 其具体的处理过程是相类似的。
在步骤 S 102中提及第二插件需要复制第一插件的信息, 为保证播放效果的一致。 具体的, 本例提供一种优选的复制方式。 首先, 在页面进程中为第一插件生成第一控件对象。 其次, 在 独立进程中为第二插件生成第二控件对象。 然后, 利用第二控件对象和第一控件对象进行交互 通信, 获取第一插件的信息, 再利用第二控件对象将获取的第一插件的信息发送至第二插件。
由于插件和自身所对应的控件对象之间需要进行操作, 因此, 两者间需要有信息交互的接 口。 本发明实施例中, 设置插件和控件对象间通过指针进行相互操作, 其中, 该指针能够调用 多个标准接口。 具体的, 第一插件和第一控件对象间通过指针进行相互操作, 第二插件和第二 控件对象间通过同类型的指针进行相互操作。 优选的, 该指针可以为 IUnknown指针, IUnknown 指针将会调用很多标准接口, 例如 I01e0bject、 IVi ewOb ject等。
利用第二控件对象和第一控件对象进行交互通信时, 为方便通信, 可以在页面进程中创建 与第一控件对象关联的第一窗口, 然后在独立进程中创建与第二控件对象关联的第二窗口。 随 后, 利用建立的第一窗口和第二窗口进行交互通信。
实施过程中, 交互通信的信息可以是插件播放所涉及的任意信息, 例如, 插件的大小, 页 面进程中的线程的焦点, 页面进程的线程的刷新操作, 脚本的执行等等。 此处的具体信息仅仅 是作为例举, 对于信息本身不造成限定, 通信还可以涉及到插件播放的其他信息。
步骤 S 106提及, 根据计算结果在播放窗口中对第二插件进行绘制播放。 SP, 在对第二插件 进行播放时, 可以分为两种情况, 一种是页面进程中并不存在第一插件的播放窗口, 另一种是 页面进程存在第一插件的播放窗口。 现分别对两者进行具体说明。
第一种情况, 当页面进程不存在第一插件的播放窗口时, 利用独立进程新建一个播放窗 口。 此时, 由于播放窗口是独立进程新建的, 因此与原始的页面进程并无联系。 在独立进程中 设置一个或多个定时器, 定时获取对第二插件的计算结果, 进而根据计算结果在新建播放窗口 中对第二插件进行绘制播放即可。
第二种情况, 当页面进程中存在第一插件的原播放窗口时, 这时, 和第一种情况相同, 同 样利用独立进程新建播放窗口。 但是, 由于存在原播放窗口, 因此, 需要在新建的播放窗口与
原播放窗口间建立联系。 具体的, 将新建的播放窗口设置为原播放窗口的父窗口, 然后, 根据 计算结果在新建的播放窗口中对第二插件进行绘制播放。
新建的播放窗口能够在浏览器上进行移动或缩放, 从而实现播放窗口的可移动性、 可扩展 性等等。 若希望播放窗口呈现在原页面进程的播放窗口处, 则只需要将新建的播放窗口设置在 原页面进程的窗口位置即可。
进一步, 在实施过程中, 若页面进程发起获取播放窗口的请求, 独立进程告知页面进程无 播放窗口。 页面进程不能获知播放窗口的存在, 则不能对播放窗口进行控制, 从而实现了插件 与页面进程的分离, 提高浏览器的稳定性。
在上述任意一个优选的实施例中, 第一插件和 /或第二插件为 Act iveX插件。
flash插件是一种常用的 Act iveX插件, 现以 flash插件在页面进程中运行为例, 对本发明 实施例提供的浏览器中插件的播放方法进行具体说明。
图 2示出了根据本发明一个实施例的页面进程和独立进程间进行通信的示意图。
在页面进程一侧,
在网页中有 flash的情况下, 在浏览器创建 Act iveX插件 (即前文提及的第一插件) 时, 会根据插件 CLSID或者 ProgID (通过 CLSIDFromProgID获取 CLSID ) 查询注册表, 查看***是 否已安装相应插件, 若安装则会继续创建过程。
浏览器通过调用 CoGetClassObject得到相应插件的 I Unknown指针, 然后通过标准接口进 行相互操作。 CoGetClassObject 执行过程为, 通过 CLSID 去注册表查询 Act iveX 路径, 获得 Act iveX路径后, 调用 LoadLibrary加载 Act iveX插件, 调用其导出函数 Dl lGetClassObject 获得类厂指针(IClassFactory ) , 然后调用 IClassFactory的 Createlnstance方法得到 Act iveX 插件对应的 IUnknown指针。
此处需要说明的是, 在加载 Act iveX插件时, Hook (拦截) CoGetClassObject , 创建一个 Act iveX控件对象(即与第一插件相对应的第一控件对象), 该 Act iveX控件对象包括一系列接 口, 例如 IUnknown指针将会调用的很多标准接口, 例如 I01e0bject、 IVi ewOb ject等。 然后在 调用 IClassFactory的 Createlnstance时, 将所创建的 Act iveX控件对象返回给 Act iveX插件 的 IUnknown指针。
在独立进程一侧,
在页面进程激活该 Act iveX插件时, 提取出该控件的属性、 URL、 大小等相关信息, 然后创 建一个独立进程, 并在独立进程中加载 Act iveX插件 (即第二插件) 。
具体来说, 创建一个 document , 在其中***一个 object 对象, 该独立进程调用
CoGetClassObject , Hook 该 CoGetClassObj ect , 再创建另一个 Act iveX控件对象(即与第二插 件相对应的第二控件对象) , 该 Act iveX控件对象包括一系列接口, 例如 IUnknown指针将会调 用的很多标准接口, 例如 I01e0bject、 IVi ewObject 等。 然后在调用 IClassFactory 的 Createlnstance时, 将所创建的该另一个 Act iveX控件对象返回给独立进程的 Act iveX插件的 IUnknown指针。
在页面进程和独立进程之间,
在所创建的两个 Act i veX控件对象中分别创建一个与各控件对象关联的窗口以用来进行通 信。 具体来说两个控件对象可以针对大小、 焦点、 刷新、 脚本以及其他信息进行交互。
根据本实施例提供的方法可以拦截页面进程和独立进程直接交互的所有请求。 若页面进程 和独立进程需要进行通信, 则通过预先创建的两个 Act iveX控件对象来实现这两个进程之间的
信息交互。 由于独立进程和页面进程的独立性, 因此, flash 插件的具体计算过程在独立进程 中进行, 因而不会影响原页面进程。
进一步地, 在 flash 的显示过程中, 可以新建一个播放窗口, 然后将独立进程中计算出来 的结果在新建的播放窗口中进行绘制, 现分以下两种情况具体说明如下。
第一种, 页面进程中的 flash插件是无播放窗口的 flash插件的情况。
图 3示出了根据本发明一个实施例的页面进程中的 flash插件无播放窗口时的 flash插件 播放的示意图。 在图 3 中, 将独立进程中计算出来的结果在新建的播放窗口中进行绘制时, 在 独立进程中有一个定时器, 按照预定的时间间隔调用 IVi ewObject 接口 Draw方法获取绘图数 据, 以将计算的数据绘制到新创建的 flash播放窗口中。
当用户希望在原页面的 flash 窗口中进行显示时, 可以将新建播放窗口设置在原页面的 flash播放窗口位置处, 但是该窗口可移动、 缩放等, 以满足用户的需求。
第二种, 页面进程中的 flash插件是有播放窗口的 flash插件的情况。
图 4示出了根据本发明一个实施例的页面进程中的 flash插件有播放窗口时的 flash插件 播放的示意图。 将独立进程中计算出来的结果在新建的播放窗口中进行绘制, 并将新建的播放 窗口设置为原页面中 flash播放窗口的父窗口。
具体地, 通过调用 flash对象的 IOl eWindow接口 GetWindow方法, 获取其对应的窗口, 然 后通过 SetParent设置 flash播放窗口的父窗口。
当用户希望在原页面的 flash 窗口中进行显示时, 可以将新建播放窗口设置在原页面的 flash播放窗口位置处, 但是该窗口可移动、 缩放等, 以满足用户的需求。
进一步, 在原页面进程中, 在获取窗口的时机, 独立进程返回空。 具体来说, 当页面进程 滚动页面时, 会调用 flash对象的 IOleWindow接口 GetWindow方法判断 flash对象是否有窗 口, 若有窗口则通过发送醫— MOVE消息移动窗口, 通过 GetWindow返回 NULL禁止页面进程移动 flash窗口。
综上可知, 本实施例提供了一种在浏览器中播放插件的方法, 实现了网页与插件的真正剥 离, 进而就解决嵌入的插件功能不全以及插件与页面相互影响的问题。
基于同一发明构思, 本发明实施例还提供了一种浏览器中插件的播放装置, 能够实现上述 任意一个优选实施例的浏览器中插件的播放方法。 图 5 示出了根据本发明一个实施例的浏览器 中插件的播放装置的结构示意图。 参见图 5, 浏览器中插件的播放装置至少包括:
创建模块 501, 配置为在浏览器的页面进程加载并激活第一插件时, 创建与页面进程不同 的独立进程, 在独立进程中加载并激活第二插件, 其中, 第二插件复制第一插件的信息; 计算模块 502, 配置为在独立进程中, 对第二插件的信息进行计算, 获取计算结果; 播放模块 503, 配置为根据计算结果在播放窗口中对第二插件进行绘制播放。
在一个优选的实施例中, 创建模块 501还可以配置为:
在页面进程中为第一插件生成第一控件对象;
在独立进程中为第二插件生成第二控件对象;
利用第二控件对象和第一控件对象进行交互通信, 获取第一插件的信息;
利用第二控件对象将获取的第一插件的信息发送至第二插件。
在一个优选的实施例中, 第一插件和第一控件对象间通过指针进行相互操作, 其中, 该指 针能够调用多个标准接口; 以及
第二插件和第二控件对象间通过同类型的指针进行相互操作。
在一个优选的实施例中, 创建模块 501还可以配置为:
在页面进程中, 创建与第一控件对象关联的第一窗口;
在独立进程中, 创建与第二控件对象关联的第二窗口;
利用第一窗口和第二窗口进行交互通信。
在一个优选的实施例中, 交互通信的信息包括下列至少之一:
插件的大小、 页面进程中的线程的焦点、 页面进程的线程的刷新操作、 脚本的执行。 在一个优选的实施例中, 播放模块 503还可以配置为:
当页面进程不存在第一插件的播放窗口时, 利用独立进程新建播放窗口;
根据独立进程的定时器, 定时获取计算结果;
根据计算结果在新建播放窗口中对第二插件进行绘制播放。
在一个优选的实施例中, 播放模块 503还可以配置为:
当页面进程中存在第一插件的原播放窗口时, 利用独立进程新建播放窗口, 并将新建的播 放窗口设置为原播放窗口的父窗口;
根据计算结果在新建的播放窗口中对第二插件进行绘制播放。
新建的播放窗口能够在浏览器上进行移动或缩放处理。
在一个优选的实施例中, 参见图 5, 浏览器中插件的播放装置还可以包括告知模块 504。 接 收到页面进程发起获取播放窗口的请求时, 告知模块 504 能够利用独立进程告知页面进程无播 放窗口。
在一个优选的实施例中, 第一插件和 /或第二插件为 Act iveX插件。
采用本发明实施例提供的浏览器中插件的播放方法及装置能够达到如下有益效果: 在本发明实施例中, 在浏览器的页面进程中加载并激活第一插件, 但是并不对第一插件进 行绘制播放, 而是创建一个与页面进程不同的独立进程, 并在独立进程中加载并激活第二插 件, 利用第二插件实现对第一插件信息的复制。 由于第一插件和第二插件的信息是一致的, 因 此, 对第二插件的信息进行计算与对第一插件的信息进行计算所取得的计算结果是一致的, 则 根据计算结果在播放窗口中对第二插件进行绘制播放所播放的内容也应该是一致的。 但是, 由 于第二插件设置在独立进程中, 与独立进程共用一个进程, 与页面进程分别适用两个不同的进 程, 因此, 第二插件的运行和页面进程的运行是独立的, 一方发生问题并不能够影响另一方的 稳定性。 如果第二插件出现卡死或者崩溃后, 不会导致整个网页退出, 能够提高页面操作的稳 定性, 同理, 当页面进程出现卡死或者崩溃后, 也不会导致页面中的第二插件退出, 提高插件 运行的稳定性。 由此可见, 本发明实施例提供的浏览器中插件的播放方法能够在不影响播放效 果的前提下, 提高浏览器运行的稳定性。
进一步, 由于第一插件并未被真正执行, 而第二插件是真实的执行主体, 因此, 可以称第 一插件为代理对象, 而第二插件为活动对象。 本发明实施例通过在页面进程中运行代理对象, 而在独立进程中运行活动对象, 使得真实的浏览器插件, 例如真实的 Act iveX插件与页面进程 分离, 从而使浏览器插件出现问题时不会影响嵌入浏览器插件的浏览器进程, 即浏览器插件出 现问题时不会影响页面进程, 从而提高了浏览器的稳定性。 同时, 当浏览器插件出现病毒等安 全性的问题时, 由于浏览器插件与页面进程分离, 不会影响页面进程的运行, 从而也提高了浏 览器的安全性。
另外, 当浏览器插件出现问题时, 可以对运行浏览器插件的对象线程执行挂起、 降低权限 或终止等操作, 从而使得独立进程可以对浏览器插件的内存占用和 CPU 占用等***资源做定向
的分配, 实现更好的资源分配回收方式, 更合理的调度计算机资源, 终止进程使得进程退出也 可以让资源回收更彻底。
第二部分
在以下几个实施例中, 以创建 Flash插件为例进行说明, 但本发明不仅限于是 Flash插件, 还可以是其它 Act iveX插件, 如百度影音、 QV0D (快播) 等插件。
图 6示出了根据本发明第一个实施例的浏览器活动对象的创建方法 600 的流程图。 如图 6 所示,方法 600始于步骤 S601,其中在浏览器的页面进程创建 Flash插件之前,阻止创建该 Flash 插件。 具体来说, 在页面中有 Flash插件的情况下, 浏览器的页面进程通过 CLS IDFromProgID 方法获取 Flash插件的类标识 (CLSID ) 或者组件的字符串标识符 (ProgID ) , 按照现有流程, 随后页面进程根据 Flash插件的 CLS ID或 ProgID查询注册表,用以查看***是否已安装该插件, 若查看已安装该插件则进一步创建该 Flash插件。但本方法与现有流程不同的是, 在获取 CLSID 或 ProgID后,判断其是否为 Flash插件的 CLSID或 ProgID,若是则停止执行查询注册表的动作, 这样该 Flash插件就不会被创建。 需要说明的是, 停止执行查询注册表的动作是阻止创建 Flash 插件的一种可选的实施方式, 本方法也可在查询注册表确认已安装 Flash插件之后, 阻止进一 步创建该 Flash插件。 通过本步骤, 虽然页面中有 Flash插件, 但在页面打开后由于阻止创建 该 Flash插件, 页面中并不会播放对应的 Flash内容。
随后, 方法 600进入步骤 S602 , 其中根据用户发起的执行 Flash插件功能的请求, 继续创 建 Flash插件, 在创建完成后执行 Flash插件的功能, 即播放对应的 Flash内容。 在页面打开 后, 如果用户想要观看 Flash 内容, 可以点击播放 Flash, 页面进程收到用户点击播放 Flash 的请求, 不再阻止 Flash插件的创建, 继续创建 Flash插件。 以之前停止执行查询注册表的动 作为例, 页面进程根据 Flash插件的 CLSID或 ProgID继续执行查询注册表的操作, 用以查看系 统是否已安装该插件, 若查看已安装该插件则进一步创建该 Flash插件。 在 Flash插件创建完 成后, 按照默认的属性就会播放对应的 Flash内容, 由此实现了 Flash插件对应的 Flash内容 的即点即播。
根据本实施例提供的浏览器活动对象的创建方法, 在浏览器的页面进程创建 Flash插件之 前, 默认阻止创建该 Flash插件; 在用户发起播放 Flash的请求后, 继续创建 Flash插件, 并 在 Flash插件创建完成后, 播放对应的 Flash内容, 由此实现了 Flash插件对应的 Flash内容 的即点即播。 与现有技术相比, 避免了不必要的插件播放造成用户资源的浪费, 节省了电力、 带宽和***资源。同时,在用户有需要重新要求播放 Flash内容时,无需刷新页面,实现了 Flash 内容的即点即播。 而且, 本实施例提供的方法在加载页面时, 默认阻止创建 Flash插件, 将有 限的资源用于加载页面, 提升了页面的加载速度。
图 7示出了根据本发明第二个实施例的浏览器活动对象的创建方法 700的流程图。 与上述 第一个实施例不同的是, 在用户发起执行活动对象实现的功能的请求之后, 通过在页面进程中 创建代理对象, 而在独立进程中继续创建活动对象, 使得真实的 Flash插件与页面进程分离。 如图 2所示, 方法 700始于步骤 S701 , 在浏览器的页面进程创建 Flash插件之前, 阻止创建该 Flash插件。在页面中有 Flash插件的情况下, 浏览器的页面进程通过 CLSIDFromProgID方法获 取 Flash插件的 CLS ID或者 ProgID , 在获取 CLSID或 ProgID后, 判断其是否为 Flash插件的 CLSID或 ProgID , 若是则停止执行查询注册表的动作, 这样该 Flash插件就不会被创建。 停止 执行查询注册表的动作是阻止创建 Flash插件的一种可选的实施方式, 本方法也可在查询注册 表确认已安装 Flash插件之后,阻止进一步创建该 Flash插件。通过本步骤,虽然页面中有 Flash
插件, 但在页面打开后由于阻止创建该 Flash插件, 页面中并不会播放对应的 Flash内容。 随后, 方法 700进入步骤 S702 , 其中根据用户发起的执行 Flash插件功能的请求, 截获浏 览器的页面进程创建 Flash插件活动对象的操作, 在浏览器的页面进程创建 Flash插件代理对 象替换实际要创建的 Flash插件活动对象, 该 Flash插件代理对象在页面进程中运行。 具体来 说, 在页面打开后, 如果用户想要观看 Flash内容, 可以点击播放 Flash, 页面进程收到用户点 击播放 Flash的请求, 不再阻止 Flash插件的创建, 继续创建 Flash插件。 以之前停止执行查 询注册表的动作为例,页面进程根据 Flash插件的 CLSID或 ProgID继续执行查询注册表的操作, 用以查看***是否已安装该插件, 若查看已安装该插件则进一步创建该 Flash插件。 这里, 在 页面进程准备进一步创建 Flash插件时, 拦截 CoGetClassObject , 创建 Flash插件代理对象, 该 Flash插件代理对象包括一系列接口, 包括 IUnknown指针 (本文也称为接口指针) 将会调用 的很多标准接口, 例如 I01e0bject、 IVi ewObject 等。 然后在调用 IClas sFactory 的 Createlnstance时, 将所创建的 Flash插件代理对象返回给页面进程的 IUnknown指针。
随后, 方法 700进入步骤 S703 , 其中创建独立于页面进程的独立进程, 在该独立进程中, 创建 Flash插件活动对象, 这里的 Flash插件活动对象才是真正的 Flash插件。 具体地, 在页 面进程激活 Flash插件代理对象时, 提取出该 Flash插件的属性、 URL、 大小等相关信息, 然后 创建一个独立进程。 具体来说, 创建一个文件 (document ) , 在其中***一个对象 (object ) , 该独立进程调用 CoGetClassObject ,拦截该 CoGetClassObject ,创建一个 Flash插件活动对象。 该 Flash插件活动对象包括一系列的接口, 包括 IUnknown指针将会调用的很多标准接口, 例如 I01e0bject、 IVi ewObj ect等。 然后在调用 IClassFactory的 Createlnstance时, 将所创建的 Flash插件活动对象返回给独立进程的 IUnknown指针。 接着, 在 Flash插件代理对象和 Flash 插件活动对象中分别创建与插件对象关联的窗口, 用于使 Flash插件代理对象和 Flash插件活 动对象进行通信。 通过这两个窗口, 两个对象可以针对 Flash 的大小、 焦点、 刷新、 脚本以及 其它信息进行交互。
随后, 方法 700进入步骤 S704, 通过 Flash插件代理对象与独立进程通信调用 Flash插件 活动对象, 和 /或, Flash插件代理对象与独立进程通信被 Flash插件活动对象调用, 执行 Flash 插件活动对象实现的功能。 在 Flash插件活动对象创建完成后, 根据用户点击播放 Flash的请 求, 通过 Flash插件代理对象与独立进程通信调用 Flash插件活动对象, 使 Flash插件活动对 象播放对应的 Flash内容, 由此实现了 Flash插件对应的 Flash内容的即点即播。
根据本实施例提供的浏览器活动对象的创建方法, 在浏览器的页面进程创建 Flash插件之 前, 默认阻止创建该 Flash插件; 在用户发起播放 Flash的请求后, 在独立进程中创建真正的 Flash插件, 并在真正的 Flash插件创建完成后, 通过调用真正的 Flash插件播放对应的 Flash 内容, 由此实现了 Flash插件对应的 Flash内容的即点即播。 与现有技术相比, 避免了不必要 的插件播放造成用户资源的浪费, 节省了电力、 带宽和***资源。 同时, 在用户有需要重新要 求播放 Flash内容时, 无需刷新页面, 实现了 Flash内容的即点即播。 而且, 本实施例提供的 方法在加载页面时, 默认阻止创建 Flash插件, 将有限的资源用于加载页面, 提升了页面的加 载速度。 进一步的, 在本方法中, 通过在页面进程中运行代理对象, 而在独立进程中运行活动 对象, 使得真正的 Flash插件与页面进程分离, 从而使 Flash插件出现问题时不会影响页面进 程, 提高了浏览器的稳定性, 尤其是当 Flash插件出现病毒等安全性问题时, 也不会对页面进 程产生影响, 提高了浏览器的安全性; 同时, 页面进程出现问题不会影响 Flash插件的正常运 行, 提高了插件的稳定性。
图 8示出了根据本发明第三个实施例的浏览器活动对象的创建方法 300 的流程图。 如图 8 所示, 方法 800始于步骤 S801 , 其中在浏览器的页面进程创建 Flash插件之后, 通过拦截线程 消息循环中的定时消息或通过对 Flash插件的属性进行修改, 阻止执行 Flash插件实现的功能, 即阻止 Flash插件播放对应的 Flash内容。 在页面中有 Flash插件的情况下, 浏览器的页面进 程通过 CLSIDFromProgID方法获取 Flash插件的 CLSID或者 ProgID, 随后页面进程根据 Flash 插件的 CLSID或 ProgID查询注册表, 用以查看***是否已安装该插件, 若查看已安装该插件则 进一步创建该 Flash插件。 页面进程通过调用 CoGetClassObject得到 Flash插件的 IUnknown 指针, 根据 IUnknown 指针调用标准接口进行相关操作, 由此完成 Flash 插件的创建。 其中 CoGetClassObject执行过程为: 通过 CLSID去注册表查询 Act iveX路径, 获得 Act iveX路径后, 调用 LoadLibrary 加载 Flash 插件, 调用导出函数 Dl lGetClassOb ject 获得类厂指针 ( IClassFactory ) , 然后调用 IClassFactory 的 Creatlnstance方法得到 Flash插件对应的 IUnknown指针。在得到 IUnknown指针的情况下, 通过调用相关接口可以获取 Flash插件的默认 属性, 并对其进行修改。 通常情况下, Flash插件的默认属性为播放, 此时将 Flash插件的默认 属性由播放修改为暂停或停止, 就达到了阻止 Flash插件播放 Flash 内容的目的。 具体来说, 根据 Flash插件的 IUnknown指针, 可以查找到记录 Flash插件属性的函数, 调用该函数就可对 Flash插件的属性进行修改。对 Flash插件的属性进行修改是阻止 Flash插件播放 Flash内容的 一种可选的实现方式, 这种实现方式适用于播放动画的 Flash插件。 本方法还提供了另一种阻 止 Flash插件播放 Flash内容的实现方式, 即拦截线程消息循环中的定时消息, 这种实现方式 的适用范围更广, 播放动画和视频的 Flash插件都适用。 具体来说, 线程消息循环中的定时消 息 (如 0x401消息) 是 Flash插件的驱动消息, Flash插件只有定时接收到该定时消息, 才会执 行其相应的功能, 本方法通过拦截该定时消息, 使 Flash插件接收不到这个消息, 那么 Flash 插件就不会播放对应的 Flash内容。
可选地, 在步骤 S801之后, 方法 800进入步骤 S802 , 其中拦截 Flash插件的绘制函数, 调 用自定义的绘制函数绘制自定义界面,在浏览器的指定位置显示该自定义界面。在经过步骤 S801 阻止播放 Flash 内容后, 在浏览器的原本该显示 Flash内容的指定位置就会出现停止播放的界 面, 本方法可以将该停止播放的界面替换为自定义界面, 例如空屏、 自定义图片或自定义 Flash 等。 具体采用的方法就是拦截 Flash插件的绘制函数, 该绘制函数用于绘制停止播放的界面, 调用自定义的绘制函数绘制自定义界面并显示。
随后, 方法 800进入步骤 S803 , 其中根据用户发起的执行 Flash插件实现的功能的请求, 通过取消拦截线程循环中的定时消息或者通过对 Flash插件的属性进行再修改,继续执行 Flash 插件实现的功能, 即继续播放 Flash内容。 若在步骤 S801中通过对 Flash插件的属性进行修改 来阻止 Flash插件播放 Flash内容, 本步骤则对 Flash插件的属性进行再修改, 即将 Flash插 件的属性由暂停或停止修改为播放, 这样 Flash插件就可以继续播放对应的 Flash 内容。 若在 步骤 S801中通过拦截定时消息阻止 Flash插件播放 Flash内容,本步骤则取消拦截该定时消息, 使 Flash插件继续播放对应的 Flash内容。
根据本实施例提供的浏览器活动对象的创建方法, 在浏览器的页面进程创建 Flash插件之 后, 通过拦截线程消息循环中的定时消息或对 Flash插件的属性进行修改, 阻止 Flash插件播 放 Flash内容; 在用户发起播放 Flash的请求后, 通过取消拦截线程消息循环中的定时消息或 对 Flash插件的属性进行再修改, 使 Flash插件继续播放 Flash内容, 由此实现了 Flash插件 对应的 Flash 内容的即点即播。 与现有技术相比, 避免了不必要的插件播放造成用户资源的浪
费, 节省了电力、 带宽和***资源。 同时, 在用户有需要重新要求播放 Flash 内容时, 无需刷 新页面, 实现了 Flash内容的即点即播。 而且, 本方法在阻止 Flash插件播放 Flash内容时, 已经创建了 Flash插件, 在用户再发起播放 Flash的请求后, 不需要再创建 Flash插件, 可以 直接启动播放, 响应时间较短。
图 9示出了根据本发明第四个实施例的浏览器活动对象的创建方法 400的流程图。 与上述 第三个实施例不同的是, 本实施例是在页面进程中创建代理对象, 而在独立进程中继续创建活 动对象, 使得真实的 Flash插件与页面进程分离。 如图 9所示, 方法 900始于步骤 S901 , 截获 浏览器的页面进程创建 Flash插件活动对象的操作, 在浏览器的页面进程创建 Flash插件代理 对象替换实际要创建的 Flash插件活动对象, 该 Flash插件代理对象在页面进程中运行。 具体 来说, 在页面中有 Flash 插件的情况下, 在页面进程准备创建 Flash 插件时, 拦截 CoGetClassObject , 创建 Flash插件代理对象, 该 Flash插件代理对象包括一系列接口, 包括 IUnknown 指针将会调用的很多标准接口, 例如 I01e0bject、 IVi ewObject 等。 然后在调用 IClassFactory 的 Createlnstance 时, 将所创建的 Flash 插件代理对象返回给页面进程的 IUnknown指针。
随后, 方法 900进入步骤 S902 , 其中创建独立于页面进程的独立进程, 在该独立进程中, 创建 Flash插件活动对象, 这里的 Flash插件活动对象才是真正的 Flash插件。 具体地, 在页 面进程激活 Flash插件代理对象时, 提取出该 Flash插件的属性、 URL、 大小等相关信息, 然后 创建一个独立进程。 具体来说, 创建一个文件 (document ) , 在其中***一个对象 (object ) , 该独立进程调用 CoGetClassObject ,拦截该 CoGetClassObject ,创建一个 Flash插件活动对象。 该 Flash插件活动对象包括一系列的接口, 包括 IUnknown指针将会调用的很多标准接口, 例如 I01e0bject、 IVi ewObj ect等。 然后在调用 IClassFactory的 Createlnstance时, 将所创建的 Flash插件活动对象返回给独立进程的 IUnknown指针。 接着, 在 Flash插件代理对象和 Flash 插件活动对象中分别创建与插件对象关联的窗口, 用于使 Flash插件代理对象和 Flash插件活 动对象进行通信。 通过这两个窗口, 两个对象可以针对 Flash 的大小、 焦点、 刷新、 脚本以及 其它信息进行交互。
随后, 方法 900进入步骤 S903 , 其中通过拦截线程消息循环中的定时消息或通过对 Flash 插件活动对象的属性进行修改, 阻止执行 Flash插件活动对象实现的功能, 即阻止 Flash插件 播放对应的 Flash 内容。 本步骤的相关内容与实施例三类似, 不同之处在于本步骤是在独立进 程中执行的, 而实施例三的相应步骤是在页面进程中执行的。
可选地, 在步骤 S903之后, 方法 900进入步骤 S904, 其中调用自定义的绘制函数绘制自定 义界面, 在浏览器的指定位置显示该自定义界面。 在经过步骤 S903阻止播放 Flash内容后, 在 浏览器的原本该显示 Flash 内容的指定位置就会出现停止播放的界面, 本方法可以将该停止播 放的界面替换为自定义界面, 如空屏、 自定义图片或自定义 Flash等。 具体可以采用以下两种 方法:
1 ) 在独立进程中拦截 Flash插件活动对象的绘制函数, 调用自定义的绘制函数绘制自定义 界面, 通过 Flash插件代理对象与独立进程通信调用 Flash插件活动对象, 在浏览器的指定位 置显示自定义界面。 具体来说, 在独立进程中拦截 Flash插件活动对象的绘制函数, 该绘制函 数用于绘制停止播放的界面, 调用自定义的绘制函数绘制自定义界面, 通过 Flash插件代理对 象与独立进程通信调用 Flash插件活动对象, 将该自定义界面通过创建的窗口发送给 Flash插 件代理对象, 在指定位置显示该自定义界面。
2 )在页面进程中拦截 Flash插件代理对象与独立进程通信调用 Flash插件活动对象的动作, 调用自定义的绘制函数绘制自定义界面, 在浏览器的指定位置显示自定义界面。 具体来说, 在 独立进程中通过调用 Flash插件活动对象的绘制函数绘制停止播放的界面, 通过 Flash插件代 理对象与独立进程通信调用 Flash插件活动对象, 可将该停止播放的界面通过创建的窗口发送 给 Flash插件代理对象, 此时在页面进程中拦截该动作, 调用自定义的绘制函数绘制自定义界 面, 在指定位置显示该自定义界面。
随后, 方法 900进入步骤 S905 , 其中根据用户发起的执行 Flash插件实现的功能的请求, 通过取消拦截线程循环中的定时消息或者通过对 Flash插件的属性进行再修改,继续执行 Flash 插件实现的功能, 即继续播放 Flash 内容。 其中继续执行 Flash插件实现的功能是通过 Flash 插件代理对象与独立进程通信调用 Flash插件活动对象, 和 /或, Flash插件代理对象与独立进 程通信被 Flash 插件活动对象调用而实现的。 而取消拦截线程循环中的定时消息或者通过对 Flash插件的属性进行再修改是在独立进程中进行的。
根据本实施例提供的浏览器活动对象的创建方法, 在浏览器的页面进程创建 Flash插件代 理对象, 在独立进程中创建真正的 Flash插件, 并在真正的 Flash插件创建完成后, 通过拦截 线程消息循环中的定时消息或对 Flash插件的属性进行修改, 阻止 Flash插件播放 Flash内容; 在用户发起播放 Flash的请求后, 通过取消拦截线程消息循环中的定时消息或对 Flash插件的 属性进行再修改, 使 Flash插件继续播放 Flash内容, 由此实现了 Flash插件对应的 Flash内 容的即点即播。 与现有技术相比, 避免了不必要的插件播放造成用户资源的浪费, 节省了电力、 带宽和***资源。同时,在用户有需要重新要求播放 Flash内容时,无需刷新页面,实现了 Flash 内容的即点即播。 而且, 本方法在阻止 Flash插件播放 Flash内容时, 已经创建了 Flash插件, 在用户再发起播放 Flash的请求后, 不需要再创建 Flash插件, 可以直接启动播放, 响应时间 较短。 进一步的, 在本方法中, 通过在页面进程中运行代理对象, 而在独立进程中运行活动对 象, 使得真正的 Flash插件与页面进程分离, 从而使 Flash插件出现问题时不会影响页面进程, 提高了浏览器的稳定性, 尤其是当 Flash插件出现病毒等安全性问题时, 也不会对页面进程产 生影响, 提高了浏览器的安全性; 同时, 页面进程出现问题不会影响 Flash插件的正常运行, 提高了插件的稳定性。
图 10 示出了根据本发明第五个实施例的浏览器活动对象的创建装置的结构框图。 如图 10 所示, 该装置包括阻止模块 1010、 第一创建模块 1020和执行模块 1030。 进一步的, 阻止模块 1010、 第一创建模块 1020和执行模块 1030都是页面进程模块 1000的子模块。
其中, 阻止模块 1010适于在浏览器创建活动对象之前, 在页面进程中阻止创建活动对象。 第一创建模块 1020根据用户发起的执行活动对象实现的功能的请求, 继续在页面进程中创建活 动对象。 执行模块 1030适于在第一创建模块 1020创建活动对象之后, 执行活动对象实现的功 能。
以 Flash插件为例, 在页面创建 Flash插件之前, 页面进程通过 CLSIDFromProgID方法获 取 Flash插件的 CLSID或者 ProgID , 判断其是否为 Flash插件的 CLSID或 ProgID, 若是阻止模 块 1010阻止第一创建模块 1020的动作, 使其停止执行查询注册表, 从而阻止创建 Flash插件。 在页面进程收到用户点击播放 Flash 的请求后, 阻止模块 1010解除阻止, 第一创建模块 1020 根据 Flash插件的 CLSID或 ProgID继续执行查询注册表的操作, 用以查看***是否已安装该插 件,若查看已安装该插件则进一步创建该 Flash插件。在 Flash插件创建完成后,执行模块 1030 按照默认的属性就会播放对应的 Flash内容, 由此实现了 Flash插件对应的 Flash内容的即点
即播。
根据本实施例提供的浏览器活动对象的创建装置, 在浏览器的页面进程创建 Flash插件之 前, 阻止模块默认阻止创建该 Flash插件; 在用户发起播放 Flash的请求后, 第一创建模块继 续创建 Flash插件, 并在 Flash插件创建完成后, 执行模块播放对应的 Flash内容, 由此实现 了 Flash插件对应的 Flash内容的即点即播。 与现有技术相比, 避免了不必要的插件播放造成 用户资源的浪费, 节省了电力、 带宽和***资源。 同时, 在用户有需要重新要求播放 Flash 内 容时, 无需刷新页面, 实现了 Flash 内容的即点即播。 而且, 本实施例提供的装置在加载页面 时, 默认阻止创建 Flash插件, 将有限的资源用于加载页面, 提升了页面的加载速度。
图 11 示出了根据本发明第六个实施例的浏览器活动对象的创建装置的结构框图。 如图 11 所示, 该装置包括页面进程模块 1110和独立进程模块 1120, 以及分别在页面进程模块 1110和 独立进程模块 1120中创建的通信窗口 1130。其中页面进程模块 1110包括子模块:阻止模块 1111 和第二创建模块 1112 ; 独立进程模块 1120包括子模块: 第一创建模块 1121和执行模块 1122。
阻止模块 1111适于在浏览器创建活动对象之前, 在页面进程中阻止创建活动对象。 第二创 建模块 1112适于根据用户发起的执行活动对象实现的功能的请求, 截获浏览器的页面进程加载 活动对象的操作, 在浏览器的页面进程创建代理对象替换实际要创建的活动对象, 代理对象在 页面进程中运行。
第一创建模块 1121适于在独立于浏览器的页面进程的独立进程中, 创建活动对象。 执行模 块 1122通过代理对象经由通信窗口 1130与独立进程通信调用活动对象, 和 /或, 代理对象经由 通信窗口 1130与独立进程通信被活动对象调用, 执行活动对象实现的功能。
以 Flash插件为例, 在页面创建 Flash插件之前, 页面进程通过 CLSIDFromProgID方法获 取 Flash插件的 CLSID或者 ProgID , 判断其是否为 Flash插件的 CLSID或 ProgID, 若是阻止模 块 1111阻止第二创建模块 1112的动作, 使其停止执行查询注册表, 从而阻止创建 Flash插件。 在页面进程收到用户点击播放 Flash 的请求后, 阻止模块 1111解除阻止, 第二创建模块 1112 根据 Flash插件的 CLSID或 ProgID继续执行查询注册表的操作, 用以查看***是否已安装该插 件, 若查看已安装该插件则进一步创建该 Flash插件。 这里, 在页面进程准备进一步创建 Flash 插件时, 第二创建模块 1112拦截 CoGetClassObject , 创建 Flash插件代理对象, 该 Flash插件 代理对象包括一系列接口, 包括 IUnknown指针将会调用的很多标准接口, 例如 I01e0bject、 IVi ewObject等。 然后在调用 IClas sFactory的 Createlnstance时, 将所创建的 Flash插件代 理对象返回给页面进程的 IUnknown 指针。 在页面进程激活 Flash 插件代理对象时, 提取出该 Flash插件的属性、 URL、 大小等相关信息, 然后由独立进程模块 1120创建一个独立进程。 在该 独立进程调用 CoGetClassObject时, 第一创建模块 1121拦截该 CoGetClassObject , 创建一个 Flash插件活动对象。 该 Flash插件活动对象包括一系列的接口, 包括 IUnknown指针将会调用 的很多标准接口, 例如 I01e0bject、 IVi ewObject 等。 然后在调用 IClas sFactory 的 Createlnstance时,将所创建的 Flash插件活动对象返回给独立进程的 IUnknown指针。在 Flash 插件活动对象创建完成后, 根据用户点击播放 Flash的请求, 执行模块 1122通过 Flash插件代 理对象与独立进程通信调用 Flash插件活动对象, 使 Flash插件活动对象播放对应的 Flash内 容, 由此实现了 Flash插件对应的 Flash内容的即点即播。
根据本实施例提供的浏览器活动对象的创建装置, 在浏览器的页面进程创建 Flash插件之 前, 阻止模块默认阻止创建该 Flash插件; 在用户发起播放 Flash的请求后, 第一创建模块在 独立进程中创建真正的 Flash插件, 并在真正的 Flash插件创建完成后, 执行模块通过调用真
正的 Flash插件播放对应的 Flash内容, 由此实现了 Flash插件对应的 Flash内容的即点即播。 与现有技术相比, 避免了不必要的插件播放造成用户资源的浪费, 节省了电力、 带宽和***资 源。 同时, 在用户有需要重新要求播放 Flash 内容时, 无需刷新页面, 实现了 Flash内容的即 点即播。 而且, 本实施例提供的装置在加载页面时, 默认阻止创建 Flash插件, 将有限的资源 用于加载页面, 提升了页面的加载速度。 进一步的, 在本装置中, 通过在页面进程中运行代理 对象, 而在独立进程中运行活动对象, 使得真正的 Flash插件与页面进程分离, 从而使 Flash 插件出现问题时不会影响页面进程, 提高了浏览器的稳定性, 尤其是当 Flash插件出现病毒等 安全性问题时, 也不会对页面进程产生影响, 提高了浏览器的安全性; 同时, 页面进程出现问 题不会影响 Flash插件的正常运行, 提高了插件的稳定性。
图 12 示出了根据本发明第七个实施例的浏览器活动对象的创建装置的结构框图。 如图 12 所示, 该装置包括阻止模块 1210和执行模块 1220。 进一步的, 阻止模块 1210和执行模块 1220 是页面进程模块 1200的子模块。
其中, 阻止模块 1210适于在浏览器创建活动对象之后, 通过拦截线程消息循环中的定时消 息或者通过对活动对象的属性进行修改, 阻止执行活动对象实现的功能。 执行模块 1220适于根 据用户发起的执行活动对象实现的功能的请求, 通过取消拦截线程消息循环中的定时消息或者 通过对活动对象的属性进行再修改, 继续执行活动对象实现的功能。
以 Flash 插件为例, 在页面中有 Flash 插件的情况下, 浏览器的页面进程通过 CLSIDFromProgID方法获取 Flash插件的 CLSID或者 ProgID, 随后页面进程根据 Flash插件的 CLSID或 ProgID查询注册表, 用以查看***是否已安装该插件, 若查看已安装该插件则进一步 创建该 Flash插件。 页面进程通过调用 CoGetClas sObject得到 Flash插件的 I Unknown指针, 根据 IUnknown指针调用标准接口进行相关操作, 由此完成 Flash插件的创建。在得到 IUnknown 指针的情况下, 阻止模块 1210可以根据 IUnkown指针查找到记录 Flash插件属性的函数, 调用 该函数就可对 Flash插件的属性进行修改, 如将 Flash插件的默认属性由播放修改为暂停或停 止, 就达到了阻止 Flash插件播放 Flash内容的目的。 阻止模块 1210也可以拦截线程消息循环 中的定时消息, 如 0x401消息, 阻止 Flash插件播放 Flash内容。 在用户发起的执行 Flash插 件实现的功能的请求后, 执行模块 1220可以通过对 Flash插件的属性进行再修改, 如将 Flash 插件的属性由暂停或停止修改为播放, 这样 Flash插件就可以继续播放对应的 Flash 内容。 执 行模块 1220也可以通过取消拦截该定时消息, 使 Flash插件继续播放对应的 Flash内容。
可选的, 该装置还可以包括绘制模块 1230, 绘制模块 1230也是页面进程模块 1200的子模 块。 绘制模块 1230适于拦截活动对象的绘制函数, 调用自定义的绘制函数绘制自定义界面, 在 浏览器的指定位置显示自定义界面。 通过绘制模块 1230可以将该停止播放的界面替换为自定义 界面, 如空屏、 自定义图片或自定义 Flash等。
根据本实施例提供的浏览器活动对象的创建装置, 在浏览器的页面进程创建 Flash插件之 后, 阻止模块通过拦截线程消息循环中的定时消息或对 Flash插件的属性进行修改, 阻止 Flash 插件播放 Flash 内容; 在用户发起播放 Flash的请求后, 执行模块通过取消拦截线程消息循环 中的定时消息或对 Flash插件的属性进行再修改, 使 Flash插件继续播放 Flash内容, 由此实 现了 Flash插件对应的 Flash 内容的即点即播。 与现有技术相比, 避免了不必要的插件播放造 成用户资源的浪费, 节省了电力、 带宽和***资源。 同时, 在用户有需要重新要求播放 Flash 内容时, 无需刷新页面, 实现了 Flash内容的即点即播。 而且, 本装置在阻止 Flash插件播放 Flash内容时,已经创建了 Flash插件,在用户再发起播放 Flash的请求后,不需要再创建 Flash
插件, 可以直接启动播放, 响应时间较短。
图 13 示出了根据本发明第八个实施例的浏览器活动对象的创建装置的结构框图。 如图 13 所示, 该装置包括页面进程模块 1310和独立进程模块 1320, 以及分别在页面进程模块 1310和 独立进程模块 1320中创建的通信窗口 1330。 其中页面进程模块 1310包括子模块: 第一创建模 块 1311 ;独立进程模块 1320包括子模块:第二创建模块 1321、阻止模块 1322和执行模块 1323。
第一创建模块 1311适于截获浏览器的页面进程加载活动对象的操作, 在浏览器的页面进程 创建代理对象替换实际要创建的活动对象, 代理对象在页面进程中运行。
第二创建模块 1321适于在独立于页面进程的独立进程中创建活动对象。 阻止模块 1322适 于在浏览器创建活动对象之后, 通过拦截线程消息循环中的定时消息或者通过对活动对象的属 性进行修改, 阻止执行活动对象实现的功能。 执行模块 1323适于根据用户发起的执行活动对象 实现的功能的请求, 通过取消拦截线程消息循环中的定时消息或者通过对活动对象的属性进行 再修改, 继续执行活动对象实现的功能。 执行模块 1323进一步适于通过代理对象经由通信窗口 1330与独立进程通信调用活动对象, 和 /或, 代理对象经由通信窗口 1330与独立进程通信被活 动对象调用, 继续执行活动对象实现的功能。
以 Flash插件为例,在页面中有 Flash插件的情况下,在第一创建模块 1311准备创建 Flash 插件时, 拦截 CoGetClassObject , 创建 Flash插件代理对象, 该 Flash插件代理对象包括一系 列接口, 包括 IUnknown指针将会调用的很多标准接口, 例如 I01e0bject、 IVi ewObject等。 然 后在调用 IClassFactory的 Createlnstance时, 将所创建的 Flash插件代理对象返回给页面进 程的 IUnknown指针。在页面进程激活 Flash插件代理对象时,提取出该 Flash插件的属性、 URL、 大小等相关信息, 然后由独立进程模块 1320 创建一个独立进程。 在独立进程调用 CoGetClassObject , 第二创建模块 1321拦截该 CoGetClassObject , 创建一个 Flash插件活动对 象。 该 Flash插件活动对象包括一系列的接口, 包括 IUnknown指针将会调用的很多标准接口, 例如 I01e0bject、 IVi ewObject等。 然后在调用 IClassFactory的 Createlnstance时, 将所创 建的 Flash插件活动对象返回给独立进程的 IUnknown指针。 阻止模块 1322通过拦截线程消息 循环中的定时消息 (如 0x401消息) 或通过对 Flash插件活动对象的属性进行修改, 阻止执行 Flash插件活动对象实现的功能, 即阻止 Flash插件播放对应的 Flash内容。 进一步的, 阻止模 块 1322是根据 IUnknown指针查找到记录 Flash插件属性的函数, 调用该函数就可对 Flash插 件的属性进行修改。 在用户发起的执行 Flash插件实现的功能的请求之后, 执行模块 1323通过 取消拦截线程循环中的定时消息或者通过对 Flash插件的属性进行再修改, 继续执行 Flash插 件实现的功能, 即继续播放 Flash内容。
可选的, 独立进程模块 1320还可以包括绘制模块 1324, 适于在独立进程中拦截活动对象的 绘制函数, 调用自定义的绘制函数绘制自定义界面。 页面进程模块 1310包括显示模块 1312, 适 于通过代理对象与独立进程通信调用活动对象, 在浏览器的指定位置显示自定义界面。 作为另 一种可替换的实现方式, 页面进程模块包括绘制模块, 适于在页面进程中拦截代理对象与独立 进程通信调用活动对象的动作, 调用自定义的绘制函数绘制自定义界面, 在浏览器的指定位置 显示自定义界面。
根据本实施例提供的浏览器活动对象的创建装置, 在浏览器的页面进程创建 Flash插件代 理对象, 在独立进程中创建真正的 Flash插件, 并在真正的 Flash插件创建完成后, 阻止模块 通过拦截线程消息循环中的定时消息或对 Flash 插件的属性进行修改, 阻止 Flash 插件播放 Flash内容; 在用户发起播放 Flash的请求后, 执行模块通过取消拦截线程消息循环中的定时消
息或对 Flash插件的属性进行再修改, 使 Flash插件继续播放 Flash内容, 由此实现了 Flash 插件对应的 Flash 内容的即点即播。 与现有技术相比, 避免了不必要的插件播放造成用户资源 的浪费, 节省了电力、 带宽和***资源。 同时, 在用户有需要重新要求播放 Flash 内容时, 无 需刷新页面, 实现了 Flash内容的即点即播。 而且, 本装置在阻止 Flash插件播放 Flash内容 时, 已经创建了 Flash插件, 在用户再发起播放 Flash的请求后, 不需要再创建 Flash插件, 可以直接启动播放, 响应时间较短。 进一步的, 在本装置中, 通过在页面进程中运行代理对象, 而在独立进程中运行活动对象, 使得真正的 Flash插件与页面进程分离, 从而使 Flash插件出 现问题时不会影响页面进程, 提高了浏览器的稳定性, 尤其是当 Flash插件出现病毒等安全性 问题时, 也不会对页面进程产生影响, 提高了浏览器的安全性; 同时, 页面进程出现问题不会 影响 Flash插件的正常运行, 提高了插件的稳定性。
本发明还提供了一种浏览器, 包括上述实施例五至实施例八中所描述的任一浏览器活动对 象的创建装置。
第三部分
用户可以在网络中通过网页查询各种视频,然后点击相应的视频,进而通过浏览器直接进行播放。 但是, 在对视频进行播放时, 由于提供视频的服务器本身带宽比较小, 或者视频和页面的交互存在问 题, 常常会出现视频播放时比较卡、 慢的问题, 即视频播放时常常会停顿一段时间才能继续播放, 甚 至出现已经播放了一段时间的视频无法缓冲, 不能继续播放的问题。 更有甚者可能出现打开网页后, 由于视频无效而完全无法播放的问题。
本发明实施例针对上述问题提出了一种视频播放方法,可以在视频播放出现预置状态时获取对应 的播放信息, 再确定与所述播放信息匹配的视频的地址信息, 并反馈所述地址信息。 从而使得浏览器 可以依据所述地址信息进行视频的播放, 从而可以正常的观看视频, 尽量避免出现卡、 慢和无法播放 等问题。
实施例一
本实施例主要对视频播放方法中服务器的处理进行论述, 具体包括:
图 14示出了根据本发明实施例一的视频播放方法的流程图。
步骤 1401, 接收浏览器获取的播放信息。
其中, 所述播放信息是在播放时出现预置状态的视频中获取的。
浏览器在视频播放的过程中会不断地检测视频的播放状态, 当检测到所述视频在播放中出现预置 状态时, 会获取所述视频的播放信息, 例如, 视频的名称、 视频播放的总时间等。 然后会将所述播放 信息发送给服务器, 从而使服务器可以接收到所述播放信息。
步骤 1402, 确定与所述播放信息匹配的视频, 并获取所述匹配的视频的地址信息。
然后服务器可以依据所述播放信息进行检测、 匹配, 从而确定与所述播放信息匹配的视频, 并获 取所述匹配的视频的地址信息。 其中, 所述地址信息可以包括所述匹配的视频的播放地址。
例如, 所述播放信息包含视频的名称和视频的播放地址, 服务器可以按照名称进行匹配, 从而获 取与所述名称匹配的视频, 以及各视频的播放地址, 将所述播放地址构成地址信息。 进一步, 还可以 将所述各视频的播放地址, 与所述播放信息中的播放地址进行比较, 剔除与所述播放信息中播放地址 相同的播放地址, 构成地址信息。
步骤 1403, 将所述地址信息反馈给所述浏览器。
然后可以将所述地址信息反馈给所述浏览器,从而使得浏览器可以根据所述地址信息进行视频的 播放。
综上所述, 本发明实施例中, 可以在视频播放出现预置状态时获取对应的播放信息, 再确定与所 述播放信息匹配的视频的地址信息, 并反馈所述地址信息。 从而使得浏览器可以依据所述地址信息进 行视频的播放, 使用户可以正常的观看视频, 尽量避免出现卡、 慢和无法播放等问题。
本发明实施例中, 还包括:
在服务器中预置视频库。
可以预先在网络中收集各种视频资源的信息, 将收集到的信息构成视频信息, 从而在服务器中设 置视频库, 则所述视频库用于存储网络中视频的视频信息。
则所述视频信息的一种形式如表 1所示:
表 1
所述视频信息包括视频描述信息和播放地址。
其中, 所述视频描述信息可以是对视频进行描述的相关信息, 包括名称、 简介、 播放时间等, 从 而通过所述视频描述信息可以确定对应的视频。
由于视频分为不同的种类, 如电视剧、 电影、 综艺节目、 自拍视频等, 因此所述视频描述信息中 也可以包括视频的种类。 此外, 不同种类的视频还包括各自的视频描述信息, 如电视剧或电影的视频 描述信息可以包括主要演员、 简介、 导演、 年代、 类型和评分等, 综艺节目的视频描述信息可以包括 播出时间等。
所述播放地址是网络中视频的存储地址, 如可以是统一资源定位符 (Uniform / Universal Resource Locator , URL ) 地址等。 其中, 同一视频描述信息所表示的视频可以存有多个播放地址, 如分别对应于优酷、 土豆、 搜狐、 迅雷、 爱奇艺等等各视频网站的链接地址, 可以将所述链接地址分 别存储于表 1中。
当然, 视频信息中还可以包括播放参数和排名等数据, 参见后文论述。
图 15示出了根据本发明实施例一的第一种视频库预置方法流程图。
本发明实施例中, 所述在服务器中预置视频库, 包括:
步骤 1501, 预先搜索网络中的视频, 并获取所述视频的视频信息。
其中, 所述视频信息包括: 视频描述信息、 播放地址。
预先在网络中搜索各类的视频, 获取所述各视频的资源, 从中提取视频信息, 如视频描述信息和 播放地址等。
步骤 1502, 对各视频的视频信息进行整理, 确定视频描述信息一致的各视频。
对视频的视频信息进行整理, 从而可以获取到部分视频信息中的视频描述信息是一致的, 所述一 致可以理解为是视频的部分或全部视频描述信息相同, 如名称相同, 又如简介相同等。
本发明实施例中, 当任意两个视频的视频描述信息中, 相同的信息达到预置范围时就可以认为这 两个视频的视频描述信息是一致的, 如两个视频的视频描述信息有 10种, 其中 8种相同, 则可以认
为这两个视频的视频描述信息一致。
从而通过上述方法可以确定视频描述信息一致的各视频。
步骤 1503, 获取所述视频描述信息一致的各视频的播放地址, 与所述视频描述信息关联, 构建 视频库。
然后将所述视频描述信息一致的各视频的播放地址, 与对应的视频描述信息关联, 构建视频库。 即视频库中, 一个视频描述信息可以对应多个播放地址, 如表 1所示。
图 16示出了根据本发明实施例一的第二种视频库预置方法流程图。
本发明实施例中, 在上述视频库预置方法的基础上, 所述在服务器中预置视频库的方法还包括: 步骤 1601, 定时对所述视频库中的各播放地址对应视频进行播放测试, 获取所述各播放地址的 播放参数。
本发明实施例中, 还可以定时对视频库中各视频的播放地址进行播放测试, 其中, 定时指的是固 定时间, 如每隔 24小时, 或每天 0时等。 即通过所述播放地址获取对应的视频并进行播放, 从而测 试出所述视频的平均下载速度、 播放时间等, 还可以进一步测试出所述视频播放中是否有卡、 慢等现 象, 从而构成播放参数。 则播放参数可以包括平均下载速度、 播放时间, 卡、 慢等现象出现次数等。
此时可以测试出各视频的播放状况, 如提供视频的服务器本身带宽比较小, 则该视频的平均下载 速度可能就比较低; 又如视频和页面的交互存在问题, 则该视频可能比较多的出现卡、 慢等现象。 从 而在预先测试中就可以确定各视频的播放情况。
步骤 1602, 对所述播放参数进行排序, 获取各播放地址的排名。
然后可以对所述播放参数进行排序, 例如, 对平均下载速度进行排序, 或对卡、 慢等现象的出现 次数进行排序等, 当然可以结合播放参数中的各数据, 获取到各视频即各播放地址的排名。
其中, 所述排名可以是各播放地址由播放质量从高到低的排序, 所述播放质量高可以理解为出现 以下至少一项状况: 平均下载速度较高, 卡、 慢等现象的出现次数较少, 则所述播放质量低可以理解 为出现以下至少一项状况: 平均下载速度较低, 卡、 慢等现象的出现次数较多。
步骤 1603, 将所述排名与所述播放地址关联, 并添加到视频库中。
然后可以将所述排名与对应的播放地址进行关联, 从而通过排名可以确定对应的播放地址, 将所 述排名添加到所述视频库中, 如表 1所示。
所述确定与所述播放信息匹配的视频, 并获取所述匹配的视频的地址信息, 包括:
将所述播放信息与所述视频库中的视频描述信息进行匹配, 确定匹配的视频描述信息; 获取与所 述匹配的视频描述信息关联的各播放地址, 并将所述各播放地址构成地址信息。
本发明实施例中所述播放信息中可以包括所述视频的名称、 简介等部分的视频描述信息, 因此可 以将所述播放信息与所述视频库中的视频描述信息进行匹配,如将所述播放信息中的名称与视频描述 信息中的名称进行匹配, 从而得到匹配的视频描述信息。
然后获取与所述匹配的视频描述信息关联的各播放地址, 并将所述各播放地址构成地址信息, 此 时可以获取其中一个播放地址构成地址信息, 也可以获取多个播放地址构成地址信息, 本发明实施例 对此不做限定。
所述获取与所述匹配的视频描述信息关联的各播放地址, 并将所述各播放地址构成地址信息, 包 括:
获取与所述匹配的视频描述信息关联的各播放地址, 并获取所述各播放地址关联的排名; 从所述 排名中获取排在前预定位数的播放地址, 将所述前预定位数的播放地址构成所述地址信息。
获取与所述匹配的视频描述信息关联的各播放地址, 然后可以获取与各播放地址关联的排名。然
后从所述排名中获取排在前预定位数的播放地址, 其中, 所述前预定位数是预先设定的数值, 如 5、 10等, 从而通过所述前预定位数可以确定反馈的播放地址的数量。
确定前预定位数的播放地址后, 可以将所述前预定位数的播放地址构成所述地址信息。
本发明实施例中, 所述将所述前预定位数的播放地址构成所述地址信息之后, 还包括: 将所述前预定位数的播放地址关联的排名添加到所述地址信息中。
本发明实施例中还可以将所述前预定位数的播放地址关联的排名添加到所述地址信息中,从而通 过所述地址信息可以确定各播放地址的排名, 方便用户进行选择。
此外, 所述播放信息还包括视频的停止时间, 即发送播放信息时视频播放到的时间, 如 90分钟 的视频停止在 45分钟。 从而服务器反馈的地址信息中也可以包括所述停止时间, 在重新选择播放地 址后, 可以将播放的时间点配置为所述停止时间, 进而可以从所述停止时间开始进行播放。
综上所述, 本发明实施例中可以通过获取网络中视频的视频描述信息、 播放地址等构成视频库, 从而在浏览器的视频播放出现预置状况时可以在视频库中快速的匹配到视频, 节省时间。
其次, 还可以定时对视频库中各播放地址对应的视频进行播放测试, 从而可以获取所述各播放地 址的播放参数, 并确定各播放地址的排名, 添加到视频库中, 因此能够预先确定各播放地址的播放状 况, 从而反馈给用户播放状况较佳的播放地址。
实施例二
本实施例主要对视频播放方法中浏览器的处理进行论述, 具体包括:
图 17示出了根据本发明实施例二的视频的播放方法流程图。
本发明实施例还提供了一种视频的播放方法, 包括:
步骤 1701, 监控视频播放过程, 当检测到播放的视频出现预置状态时, 获取所述视频的播放信
<窗、
本发明实施例中浏览器在播放视频的过程中, 可以实时监控视频的播放过程, 从而当检测到播放 的视频出现预置状态时获取所述视频的播放信息。
其中, 所述预置状态包括以下任一项: 1、 获取视频数据失败; 2、 视频停止播放时间超过第一预 设时间; 3、 视频实际播放时间减去理论播放时间的差值超过第二预设时间。
在浏览器中选择播放视频时, 会从所述视频的服务器中下载所述视频的数据来进行视频的播放, 此时, 若无法下载所述视频的数据, 就可以认为是获取视频失败。 其中, 获取视频失败可以是在播放 前出现的, 此时该视频完全无法播放, 也可以是在播放中出现的, 此时该视频无法继续播放。
所述第一预设时间是视频停止播放的最大时间, 如 1分钟, 3分钟等, 视频停止播放时间超过第 一预设时间, 即视频停止播放时间超过了最大时间, 就可以认为视频播放出现了预置状况, 可以为该 用户推荐另一个播放地址重新观看该视频。
所述实际播放时间是从开始播放视频到当前的时间段, 如 9 : 00开始, 当前是 9 : 40, 则实际播放 时间是 40分钟。所述理论播放时间是视频当前播放的数据对应的时间,如视频是 100M,总时间是 100 分钟。 当前播放了 30M, 则理论播放时间是 30分钟。
所述第二预设时间是衡量视频播放进度的时间, 如视频可能没有长时间出现停止的情况, 但是可 能会停一下, 播放一下, 播放效果很不好, 影响用户观看, 因此, 可以采用第二预设时间进行衡量, 即当视频实际播放时间减去理论播放时间的差值超过第二预设时间,如视频从开始播放到当前的视频 实际播放时间是 40 分钟, 但是该段视频的理论播放时间是 30 分钟, 第二预设时间是 5 分钟, 则 40-10=10)5, 超过了第二预设时间。
本发明实施例可以在浏览器中采用独立进程播放视频, 则所述监控视频播放过程, 包括:
监控独立进程中视频的播放过程。
本发明实施例中还可以采用独立进程播放视频, 从而可以监控独立进程中视频的播放过程。 其中, 以 flash为例简要说明所述独立进程的调用和通信过程可以如下:
在网页中有 flash的情况下, 在浏览器创建 ActiveX插件(本例中为 flash插件) 时, 会根据插 件 CLSID或者 ProgID (通过 CLSIDFromProgID获取 CLSID )查询注册表, 查看***是否已安装相应插 件, 若安装则会继续创建过程。 浏览器通过调用 CoGetClassObject得到相应插件的 IUnknown指针, 然后通过标准接口进行相互操作。 CoGetClassObject执行过程为, 通过 CLSID去注册表查询 ActiveX 路径,获得 ActiveX路径后,调用 LoadLibrary加载 ActiveX插件,调用其导出函数 DllGetClassObject 获得类厂指针 (IClassFactory), 然后调用 IClassFactory的 Createlnstance方法得到 ActiveX插 件对应的 IUnknown指针。
具体过程如下:
在网页中加载 ActiveX插件时, Hook CoGetClassObject,创建一个 ActiveX控件对象,该 ActiveX 控件对象包括一系列接口, 例如 IUnknown 指针将会调用的很多标准接口, 例如 I01e0bject、 IViewObject等。 然后在调用 IClassFactory的 Createlnstance时, 将所创建的 ActiveX控件对象 返回给 ActiveX插件的 IUnknown指针。
在页面激活该 ActiveX控件时, 提取出该控件的属性、 URL、 大小等相关信息, 然后创建一个独 立进程。 具体来说, 创建一个 document , 在其中***一个 object 对象, 该独立进程调用 CoGetClassObject, Hook 该 CoGetClassObject, 再创建另一个 ActiveX控件对象, 该 ActiveX控件 对象包括一系列接口, 例如 IUnknown指针将会调用的很多标准接口, 例如 I01e0bject、 IViewObject 等。 然后在调用 IClassFactory的 Createlnstance时, 将所创建的该另一个 ActiveX控件对象返回 给独立进程的 ActiveX插件的 IUnknown指针。
在所创建的两个 ActiveX控件对象中分别创建一个与该控件对象关联的窗口以用来进行通信。具 体来说两个控件对象可以针对大小、 焦点、 刷新、 脚本以及其他信息进行交互。
则本发明实施例中, 可以拦截以上两个进程中的所有请求, 通过预先创建的两个 ActiveX控件对 象来实现这两个进程之间的信息交互。 由此 flash的具体过程在独立进程中进行, 因而不会影响原网 页的进程。
通过使用独立进程对视频进行播放, 可以对视频的有更好地控制, 从而确定视频的播放状况。 步骤 1702, 将所述播放信息发送给服务器。
所述播放信息可以包括名称、 播放时间等, 然后可以将所述播放信息发送给所述服务器, 使服务 器由所述播放信息匹配到相应的视频。
步骤 1703, 接收服务器反馈的地址信息, 以用于对所述地址信息对应的视频进行播放。
接收服务器反馈的地址信息, 从所述地址信息中选取相应的播放地址, 从而对所述播放地址对应 的视频进行播放。
具体包括:
接收服务器反馈的地址信息, 显示所述地址信息中的播放地址; 接收播放指令, 根据播放指令对 对应的视频进行播放。
接收服务器反馈的地址信息, 并显示所述地址信息中的播放地址, 用户可以从中选择一个播放地 址, 即发送播放指令, 其中所述播放指令中包含选择的播放地址, 从而可以对所述播放地址对应的视 频进行播放。
其中, 采用独立进程进行视频的播放后, 可以对视频的有一个更好地控制, 从而确定视频的播放
状况。
本实施例中, 还可以记录发送视频信息时视频的停止时间, 而后在接收到播放指令播放视频时, 还可以包括将该停止时间作为开始播放的时间,从而使得新播放的视频可以从之前停止的时间开始播 放, 便于用户观看。
实施例三
上述对视频播放方法中浏览器和服务器的处理进行了论述,下面从整体的角度论述该视频播放方 法, 具体包括:
图 18示出了根据本发明实施例三的视频的播放方法示意图。
18. 1在服务器中预置视频库。
具体包括以下步骤:
18. 11预先搜索网络中的视频, 并获取所述视频的视频信息, 其中, 所述视频信息包括: 视 频描述信息、 播放地址;
18. 12对各视频的视频信息进行整理, 确定视频描述信息一致的各视频;
18. 13获取所述视频描述信息一致的各视频的播放地址, 与所述视频描述信息关联, 构建视 频库。
还包括:
18. 14定时对所述视频库中的各播放地址对应视频进行播放测试, 获取所述各播放地址的播 放参数;
18. 15对所述播放参数进行排序, 获取各播放地址的排名;
18. 16将所述排名与所述播放地址关联, 并添加到视频库中。
18. 2 浏览器监控视频播放过程, 当检测到播放的视频出现预置状态时, 获取所述视频的播放信
<窗、
其中,所述预置状态包括以下任一项:获取视频数据失败,视频停止播放时间超过第一预设时间, 和视频实际播放时间减去理论播放时间的差值超过第二预设时间。
可选的, 在浏览器中采用独立进程播放视频, 则监控独立进程中视频的播放过程
18. 3浏览器将所述播放信息发送给服务器。
18. 4服务器确定与所述播放信息匹配的视频, 并获取所述匹配的视频的地址信息。
具体包括以下步骤:
18. 41将所述播放信息与所述视频库中的视频描述信息进行匹配,确定匹配的视频描述信息。 18. 42获取与所述匹配的视频描述信息关联的各播放地址, 并将所述各播放地址构成地址信
<窗、
18. 421 获取与所述匹配的视频描述信息关联的各播放地址, 并获取所述各播放地址关联的 排名。
18. 422 从所述排名中获取排在前预定位数的播放地址, 将所述前预定位数的播放地址构成 所述地址信息。
18. 423将所述前预定位数的播放地址关联的排名添加到所述地址信息中。
18. 5服务器将所述地址信息反馈给所述浏览器;
18. 6接收服务器反馈的地址信息, 以用于对所述地址信息对应的视频进行播放。
18. 61接收服务器反馈的地址信息, 显示所述地址信息中的播放地址;
18. 62接收播放指令, 根据播放指令对对应的视频进行播放。
综上所述, 本发明实施例中, 可以在视频播放出现预置状态时获取对应的播放信息, 再确定与所 述播放信息匹配的视频的地址信息, 并反馈所述地址信息。 从而使得浏览器可以依据所述地址信息进 行视频的播放, 从而可以正常的观看视频, 尽量避免出现卡、 慢和无法播放等问题。
实施例四
图 19示出了根据本发明实施例四的服务器结构图。
本发明实施例还提供了一种服务器, 包括:
接收模块 191, 用于接收浏览器获取的播放信息, 所述播放信息是在播放时出现预置状态的视频 中获取的;
匹配并获取模块 192,用于确定与所述播放信息匹配的视频,并获取所述匹配的视频的地址信息; 反馈模块 193, 用于将所述地址信息反馈给所述浏览器。
本发明实施例中, 所述服务器还包括:
预置模块 190, 用于在服务器中预置视频库, 所述视频库用于存储网络中视频的视频信息。 本发明实施例中, 所述预置模块 190, 具体用于预先搜索网络中的视频, 并获取所述视频的视频 信息, 其中, 所述视频信息包括: 视频描述信息、 播放地址; 对各视频的视频信息进行整理, 确定视 频描述信息一致的各视频; 获取所述视频描述信息一致的各视频的播放地址, 与所述视频描述信息关 联, 构建视频库。
本发明实施例中, 所述预置模块 190, 还用于定时对所述视频库中的各播放地址对应视频进行播 放测试, 获取所述各播放地址的播放参数; 对所述播放参数进行排序, 获取各播放地址的排名; 将所 述排名与所述播放地址关联, 并添加到视频库中。
本发明实施例中, 所述匹配并获取模块 192, 包括:
匹配子模块 1921, 用于将所述播放信息与所述视频库中的视频描述信息进行匹配, 确定匹配的 视频描述信息;
获取子模块 1922, 用于获取与所述匹配的视频描述信息关联的各播放地址, 并将所述各播放地 址构成地址信息。
本发明实施例中, 所述获取子模块 1922, 具体用于获取与所述匹配的视频描述信息关联的各播 放地址, 并获取所述各播放地址关联的排名; 从所述排名中获取排在前预定位数的播放地址, 将所述 前预定位数的播放地址构成所述地址信息。
本发明实施例中, 所述获取子模块 1922, 具体用于将所述前预定位数的播放地址关联的排名添 加到所述地址信息中。
本发明实施例中, 所述预置状态包括以下任一项: 获取视频数据失败, 视频停止播放时间超过第 一预设时间, 和视频实际播放时间减去理论播放时间的差值超过第二预设时间。
图 20示出了根据本发明实施例四的浏览器结构图。
本发明实施例中还提供了一种浏览器, 包括:
监控并获取模块 201, 用于监控视频播放过程, 当检测到播放的视频出现预置状态时, 获取所述 视频的播放信息;
发送模块 202, 用于将所述播放信息发送给服务器;
接收并播放模块 203, 用于接收服务器反馈的地址信息, 以用于对所述地址信息对应的视频进行 播放。
本发明实施例中, 所述接收并播放模块 203, 包括:
接收子模块 2031, 用于接收服务器反馈的地址信息, 显示所述地址信息中的播放地址;
播放子模块 2032, 用于接收播放指令, 根据所述播放指令对对应的视频进行播放。 本发明实施例中, 在浏览器中采用独立进程播放视频;
所述监控并获取模块 2031, 具体用于监控独立进程中视频的播放过程。
本发明实施例中, 所述预置状态包括以下任一项: 获取视频数据失败, 视频停止播放时间超过第 一预设时间, 和视频实际播放时间减去理论播放时间的差值超过第二预设时间。
实施例五
图 21示出了根据本发明实施例五的视频的播放***结构图。
本发明实施例还提供了一种视频的播放***, 包括: 服务器 213和浏览器 214。
所述服务器 213, 包括:
接收模块 2131, 用于接收浏览器获取的播放信息, 所述播放信息是在播放时出现预置状态的视 频中获取的;
匹配并获取模块 2132, 用于确定与所述播放信息匹配的视频, 并获取所述匹配的视频的地址信 息、 ΐ
反馈模块 2133, 用于将所述地址信息反馈给所述浏览器。
本发明实施例中, 所述服务器还包括:
预置模块 2130, 用于在服务器中预置视频库, 所述视频库用于存储网络中视频的视频信息。 本发明实施例中, 所述预置模块 2130, 具体用于预先搜索网络中的视频, 并获取所述视频的视 频信息, 其中, 所述视频信息包括: 视频描述信息、 播放地址; 对各视频的视频信息进行整理, 确定 视频描述信息一致的各视频; 获取所述视频描述信息一致的各视频的播放地址, 与所述视频描述信息 关联, 构建视频库。
本发明实施例中, 所述预置模块 2130, 还用于定时对所述视频库中的各播放地址对应视频进行 播放测试, 获取所述各播放地址的播放参数; 对所述播放参数进行排序, 获取各播放地址的排名; 将 所述排名与所述播放地址关联, 并添加到视频库中。
本发明实施例中, 所述匹配并获取模块 2132, 包括:
匹配子模块, 用于将所述播放信息与所述视频库中的视频描述信息进行匹配, 确定匹配的视频描 述信息;
获取子模块, 用于获取与所述匹配的视频描述信息关联的各播放地址, 并将所述各播放地址构成 地址信息。
本发明实施例中,所述获取子模块,具体用于获取与所述匹配的视频描述信息关联的各播放地址, 并获取所述各播放地址关联的排名; 从所述排名中获取排在前预定位数的播放地址, 将所述前预定位 数的播放地址构成所述地址信息。
本发明实施例中, 所述获取子模块, 具体用于将所述前预定位数的播放地址关联的排名添加到所 述地址信息中。
本发明实施例中, 所述预置状态包括以下任一项: 获取视频数据失败, 视频停止播放时间超过第 一预设时间, 和视频实际播放时间减去理论播放时间的差值超过第二预设时间。
所述浏览器 214, 包括:
监控并获取模块 2141, 用于监控视频播放过程, 当检测到播放的视频出现预置状态时, 获取所 述视频的播放信息;
发送模块 2142, 用于将所述播放信息发送给服务器;
接收并播放模块 2143, 用于接收服务器反馈的地址信息, 以用于对所述地址信息对应的视频进
行播放。
本发明实施例中, 所述接收并播放模块 2143, 包括:
接收子模块, 用于接收服务器反馈的地址信息, 显示所述地址信息中的播放地址;
播放子模块, 用于接收播放指令, 根据所述播放指令对对应的视频进行播放。
本发明实施例中, 在浏览器中采用独立进程播放视频;
所述监控并获取模块, 具体用于监控独立进程中视频的播放过程。
本发明实施例中, 所述预置状态包括以下任一项: 获取视频数据失败, 视频停止播放时间超过第 一预设时间, 和视频实际播放时间减去理论播放时间的差值超过第二预设时间。
综上所述, 本发明实施例中, 可以在视频播放出现预置状态时获取对应的播放信息, 再确定与所 述播放信息匹配的视频的地址信息, 并反馈所述地址信息。 从而使得浏览器可以依据所述地址信息进 行视频的播放, 从而可以正常的观看视频, 尽量避免出现卡、 慢和无法播放等问题。
本发明实施例中可以通过获取网络中视频的视频描述信息、播放地址等构成视频库, 从而在浏览 器的视频播放出现预置状况时可以在视频库中快速的匹配到视频, 节省时间。
其次, 还可以定时对视频库中各播放地址对应的视频进行播放测试, 从而可以获取所述各播放地 址的播放参数, 并确定各播放地址的排名, 添加到视频库中, 因此能够预先确定各播放地址的播放状 况, 从而反馈给用户播放状况较佳的播放地址。本发明的各个部件实施例可以以硬件实现, 或者以 在一个或者多个处理器上运行的软件模块实现, 或者以它们的组合实现。 本领域的技术人员应 当理解, 可以在实践中使用微处理器或者数字信号处理器 (DSP ) 来实现根据本发明实施例的设 备中的一些或者全部部件的一些或者全部功能。 本发明还可以实现为用于执行这里所描述的方 法的一部分或者全部的设备或者装置程序 (例如, 计算机程序和计算机程序产品) 。 这样的实 现本发明的程序可以存储在计算机可读介质上, 或者可以具有一个或者多个信号的形式。 这样 的信号可以从因特网网站上下载得到, 或者在载体信号上提供, 或者以任何其他形式提供。
例如, 图 22示出了可以实现根据本发明的的客户端或服务器。 该客户端或服务器传统上包 括处理器 2210和以存储器 2220形式的计算机程序产品或者计算机可读介质。 存储器 2220可以 是诸如闪存、 EEPR0M (电可擦除可编程只读存储器) 、 EPR0M、 硬盘或者 ROM之类的电子存储器。 存储器 2220具有用于执行上述方法中的任何方法步骤的程序代码 2231的存储空间 2230。例如, 用于程序代码的存储空间 2230可以包括分别用于实现上面的方法中的各种步骤的各个程序代码 2231。 这些程序代码可以从一个或者多个计算机程序产品中读出或者写入到这一个或者多个计 算机程序产品中。 这些计算机程序产品包括诸如硬盘, 紧致盘 (CD ) 、 存储卡或者软盘之类的 程序代码载体。 这样的计算机程序产品通常为如参考图 23所述的便携式或者固定存储单元。 该 存储单元可以具有与图 22的客户端或服务器中的存储器 2220类似布置的存储段、 存储空间等。 程序代码可以例如以适当形式进行压缩。 通常, 存储单元包括计算机可读代码 223 , 即可以 由例如诸如 2210之类的处理器读取的代码, 这些代码当由服务器运行时, 导致该服务器执行上 面所描述的方法中的各个步骤。
本文中所称的 "一个实施例" 、 "实施例" 或者 "一个或者多个实施例" 意味着, 结合实 施例描述的特定特征、 结构或者特性包括在本发明的至少一个实施例中。 此外, 请注意, 这里 "在一个实施例中" 的词语例子不一定全指同一个实施例。
在此处所提供的说明书中, 说明了大量具体细节。 然而, 能够理解, 本发明的实施例可以 在没有这些具体细节的情况下被实践。 在一些实例中, 并未详细示出公知的方法、 结构和技术, 以便不模糊对本说明书的理解。
应该注意的是上述实施例对本发明进行说明而不是对本发明进行限制, 并且本领域技术人 员在不脱离所附权利要求的范围的情况下可设计出替换实施例。 在权利要求中, 不应将位于括 号之间的任何参考符号构造成对权利要求的限制。 单词 "包含"不排除存在未列在权利要求中 的元件或步骤。 位于元件之前的单词 "一" 或 "一个" 不排除存在多个这样的元件。 本发明可 以借助于包括有若干不同元件的硬件以及借助于适当编程的计算机来实现。 在列举了若干装置 的单元权利要求中, 这些装置中的若干个可以是通过同一个硬件项来具体体现。 单词第一、 第 二、 以及第三等的使用不表示任何顺序。 可将这些单词解释为名称。
此外, 还应当注意, 本说明书中使用的语言主要是为了可读性和教导的目的而选择的, 而 不是为了解释或者限定本发明的主题而选择的。 因此, 在不偏离所附权利要求书的范围和精神 的情况下, 对于本技术领域的普通技术人员来说许多修改和变更都是显而易见的。 对于本发明 的范围, 对本发明所做的公开是说明性的, 而非限制性的, 本发明的范围由所附权利要求书限 定。
根据本发明的实施例公开了 Al、 一种浏览器活动对象的创建方法, 包括: 在浏览器创建活动对 象之前, 阻止创建所述活动对象; 根据用户发起的执行所述活动对象实现的功能的请求, 继续创建所 述活动对象, 而后执行所述活动对象实现的功能。 A2、 根据 A1所述的方法, 所述在浏览器创建活动 对象之前, 阻止创建所述活动对象的步骤包括: 在浏览器的页面进程中阻止创建活动对象。 A3、 根据 A2所述的方法, 所述根据用户发起的执行所述活动对象实现的功能的请求, 继续创建所述活动对象, 而后执行所述活动对象实现的功能的步骤包括: 截获浏览器的页面进程创建活动对象的操作, 在浏览 器的页面进程创建代理对象替换实际要创建的活动对象, 所述代理对象在页面进程中运行; 在独立于 所述浏览器的页面进程的独立进程中, 创建所述活动对象; 通过代理对象与独立进程通信调用活动对 象, 和 /或, 代理对象与独立进程通信被活动对象调用, 执行所述活动对象实现的功能。 A4、 根据 A1 至 A3任一项所述的方法, 所述阻止创建所述活动对象的步骤包括: 获取所述活动对象的类标识, 停 止执行根据所述活动对象的类标识查询注册表的操作。 A5、 根据 A4所述的方法, 所述继续创建所述 活动对象的步骤包括: 根据所述活动对象的类标识, 继续执行查询注册表的操作。
根据本发明的实施例还公开了 B6、 一种浏览器活动对象的创建方法, 包括: 在浏览器创建活动 对象之后, 通过拦截线程消息循环中的定时消息或者通过对所述活动对象的属性进行修改, 阻止执行 所述活动对象实现的功能; 根据用户发起的执行所述活动对象实现的功能的请求, 通过取消拦截线程 消息循环中的定时消息或者通过对所述活动对象的属性进行再修改,继续执行所述活动对象实现的功 能。 B7、 根据 B6所述的方法, 在所述浏览器创建活动对象之前还包括: 截获浏览器的页面进程加载 活动对象的操作, 在浏览器的页面进程创建代理对象替换实际要创建的活动对象, 所述代理对象在页 面进程中运行; 所述浏览器创建活动对象的过程具体为: 在独立于所述浏览器的页面进程的独立进程 中创建所述活动对象; 所述继续执行所述活动对象实现的功能的步骤具体为: 通过代理对象与独立进 程通信调用活动对象, 和 /或, 代理对象与独立进程通信被活动对象调用, 执行所述活动对象实现的 功能。 B8、 根据 B6或 B7所述的方法, 所述定时消息为 0x401消息。 B9、 根据 B6或 B7所述的方法, 所述对活动对象的属性进行修改的步骤包括: 获取所述活动对象的接口指针; 根据接口指针查找记录 所述活动对象的属性的函数,调用该函数对所述活动对象的属性进行修改。 B10、根据 B6所述的方法, 在所述继续执行所述活动对象实现的功能的步骤之前包括: 拦截所述活动对象的绘制函数, 调用自定 义的绘制函数绘制自定义界面, 在所述浏览器的指定位置显示所述自定义界面。 Bl l、 根据 B7所述的 方法, 在所述继续执行所述活动对象实现的功能的步骤之前包括: 在所述独立进程中拦截活动对象的 绘制函数, 调用自定义的绘制函数绘制自定义界面, 通过代理对象与独立进程通信调用活动对象, 在
所述浏览器的指定位置显示所述自定义界面; 或者, 在所述页面进程中拦截代理对象与独立进程通信 调用活动对象的动作, 调用自定义的绘制函数绘制自定义界面, 在所述浏览器的指定位置显示所述自 定义界面。
根据本发明的实施例公开了 C12、 一种浏览器活动对象的创建装置, 包括: 阻止模块, 适于在浏 览器创建活动对象之前, 阻止创建所述活动对象; 第一创建模块, 适于根据用户发起的执行所述活动 对象实现的功能的请求, 继续创建所述活动对象; 执行模块, 适于在所述第一创建模块创建所述活动 对象之后, 执行所述活动对象实现的功能。 C13、 根据 C12所述的装置, 所述装置包括页面进程模块, 所述阻止模块、第一创建模块和执行模块都是所述页面进程模块的子模块; 所述阻止模块具体适于在 页面进程中阻止创建活动对象。 C14、 根据 C12所述的装置, 所述装置包括页面进程模块和独立进程 模块; 所述阻止模块是所述页面进程模块的子模块, 所述第一创建模块和执行模块是所述独立进程模 块的子模块; 所述页面进程模块还包括: 第二创建模块, 适于根据用户发起的执行所述活动对象实现 的功能的请求, 截获浏览器的页面进程加载活动对象的操作, 在浏览器的页面进程创建代理对象替换 实际要创建的活动对象, 所述代理对象在页面进程中运行; 所述第一创建模块具体适于在独立于所述 浏览器的页面进程的独立进程中, 创建所述活动对象; 所述装置还包括分别在所述页面进程模块和所 述独立进程模块中创建的通信窗口,所述执行模块具体适于通过代理对象经由所述通信窗口与独立进 程通信调用活动对象, 和 /或, 代理对象经由所述通信窗口与独立进程通信被活动对象调用, 执行所 述活动对象实现的功能。 C15、 根据 C12至 C14任一项所述的装置, 所述阻止模块具体适于获取所述 活动对象的类标识, 停止执行根据所述活动对象的类标识查询注册表的操作。 C16、 根据 C13所述的 装置, 所述第一创建模块具体适于根据所述活动对象的类标识, 继续执行查询注册表的操作。
根据本发明实施例公开了 D17、 一种包括 C12至 C16任一项所述的浏览器活动对象的创建装置的 浏览器。
根据本发明的实施例公开了 E18、 一种浏览器活动对象的创建装置, 包括: 阻止模块, 适于在浏 览器创建活动对象之后,通过拦截线程消息循环中的定时消息或者通过对所述活动对象的属性进行修 改, 阻止执行所述活动对象实现的功能; 执行模块, 适于根据用户发起的执行所述活动对象实现的功 能的请求, 通过取消拦截线程消息循环中的定时消息或者通过对所述活动对象的属性进行再修改, 继 续执行所述活动对象实现的功能。 19、 根据权利要求 18所述的装置, 所述装置包括页面进程模块; 所述阻止模块和执行模块是所述页面进程模块的子模块。 20、 根据权利要求 18所述的装置, 所述装 置包括页面进程模块和独立进程模块; 所述阻止模块和执行模块是所述独立进程模块的子模块; 所述 页面进程模块包括: 第一创建模块, 适于截获浏览器的页面进程加载活动对象的操作, 在浏览器的页 面进程创建代理对象替换实际要创建的活动对象, 所述代理对象在页面进程中运行; 所述独立进程模 块还包括: 第二创建模块, 适于在独立于所述页面进程的独立进程中创建所述活动对象; 所述装置还 包括分别在所述页面进程模块和所述独立进程模块中创建的通信窗口,所述执行模块进一步适于通过 代理对象经由所述通信窗口与独立进程通信调用活动对象, 和 /或, 代理对象经由所述通信窗口与独 立进程通信被活动对象调用, 继续执行所述活动对象实现的功能。 E21、 根据 E18至 E20任一项所述 的装置, 所述定时消息为 0x401消息。 E22、 根据 E18至 E20任一项所述的装置, 所述阻止模块具体 适于获取所述活动对象的接口指针; 根据接口指针查找记录所述活动对象的属性的函数, 调用该函数 对所述活动对象的属性进行修改, 阻止执行所述活动对象实现的功能。 E23、 根据 E19所述的装置, 还包括: 绘制模块, 适于拦截所述活动对象的绘制函数, 调用自定义的绘制函数绘制自定义界面, 在 所述浏览器的指定位置显示所述自定义界面。 E24、 根据 E20所述的装置, 所述独立进程模块还包括: 绘制模块,适于在所述独立进程中拦截活动对象的绘制函数,调用自定义的绘制函数绘制自定义界面;
所述页面进程模块还包括: 显示模块, 适于通过代理对象与独立进程通信调用活动对象, 在所述浏览 器的指定位置显示所述自定义界面。 E25、 根据 E20所述的装置, 所述页面进程模块还包括: 绘制模 块, 适于在所述页面进程中拦截代理对象与独立进程通信调用活动对象的动作, 调用自定义的绘制函 数绘制自定义界面, 在所述浏览器的指定位置显示所述自定义界面。
根据本发明的实施例公开了 F26、 一种包括 E18至 E25任一项所述的浏览器活动对象的创建装置 的浏览器。
根据本发明的实施例公开了 Gl、 一种视频播放方法, 包括: 接收浏览器获取的播放信息, 所述 播放信息是在播放时出现预置状态的视频中获取的; 确定与所述播放信息匹配的视频, 并获取所述匹 配的视频的地址信息; 将所述地址信息反馈给所述浏览器。 G2、 如 G1所述的方法, 还包括: 在服务 器中预置视频库, 所述视频库用于存储网络中视频的视频信息。 G3、 如 G2所述的方法, 所述在服务 器中预置视频库, 包括: 预先搜索网络中的视频, 并获取所述视频的视频信息, 其中, 所述视频信息 包括: 视频描述信息、 播放地址; 对各视频的视频信息进行整理, 确定视频描述信息一致的各视频; 获取所述视频描述信息一致的各视频的播放地址, 与所述视频描述信息关联, 构建视频库。 G4、 如 G3 所述的方法, 还包括: 定时对所述视频库中的各播放地址对应视频进行播放测试, 获取所述各播 放地址的播放参数; 对所述播放参数进行排序, 获取各播放地址的排名; 将所述排名与所述播放地址 关联, 并添加到视频库中。 G5、 如 G3或 G4任一所述的方法, 所述确定与所述播放信息匹配的视频, 并获取所述匹配的视频的地址信息,包括:将所述播放信息与所述视频库中的视频描述信息进行匹配, 确定匹配的视频描述信息; 获取与所述匹配的视频描述信息关联的各播放地址, 并将所述各播放地址 构成地址信息。 G6、 如 G5所述的方法, 获取与所述匹配的视频描述信息关联的各播放地址, 并将所 述各播放地址构成地址信息, 包括: 获取与所述匹配的视频描述信息关联的各播放地址, 并获取所述 各播放地址关联的排名; 从所述排名中获取排在前预定位数的播放地址, 将所述前预定位数的播放地 址构成所述地址信息。 G7、 如 G6所述的方法, 还包括: 将所述前预定位数的播放地址关联的排名添 加到所述地址信息中。 G8、 根据 G1所述的方法, 所述预置状态包括以下任一项: 获取视频数据失败, 视频停止播放时间超过第一预设时间,和视频实际播放时间减去理论播放时间的差值超过第二预设时 间。
根据本发明的实施例公开了 H9、 一种视频的播放方法, 包括: 监控视频播放过程, 当检测到播 放的视频出现预置状态时, 获取所述视频的播放信息; 将所述播放信息发送给服务器; 接收服务器反 馈的地址信息, 以用于对所述地址信息对应的视频进行播放。 H10、 如 H9所述的方法, 所述接收服务 器反馈的地址信息, 以用于对所述地址信息对应的视频进行播放,包括:接收服务器反馈的地址信息, 显示所述地址信息中的播放地址; 接收播放指令, 根据播放指令对对应的视频进行播放。 Hll、 如 H9 所述的方法, 在浏览器中采用独立进程播放视频, 所述监控视频播放过程, 包括: 监控独立进程中视 频的播放过程。 H12、 如 H9所述的方法, 所述预置状态包括以下任一项: 获取视频数据失败, 视频停 止播放时间超过第一预设时间, 和视频实际播放时间减去理论播放时间的差值超过第二预设时间。
根据本发明的实施例公开了 113、 一种服务器, 包括: 接收模块, 用于接收浏览器获取的播放 信息, 所述播放信息是在播放时出现预置状态的视频中获取的; 匹配并获取模块, 用于确定与所述播 放信息匹配的视频, 并获取所述匹配的视频的地址信息; 反馈模块, 用于将所述地址信息反馈给所述 浏览器。 114、 如 113所述的服务器, 还包括: 预置模块, 用于在服务器中预置视频库, 所述视频库 用于存储网络中视频的视频信息。 115、 如 114所述的服务器; 所述预置模块, 具体用于预先搜索网 络中的视频, 并获取所述视频的视频信息, 其中, 所述视频信息包括: 视频描述信息、 播放地址; 对 各视频的视频信息进行整理, 确定视频描述信息一致的各视频; 获取所述视频描述信息一致的各视频
的播放地址, 与所述视频描述信息关联, 构建视频库。 116、 如 115所述的服务器; 所述预置模块, 还用于定时对所述视频库中的各播放地址对应视频进行播放测试, 获取所述各播放地址的播放参数; 对所述播放参数进行排序, 获取各播放地址的排名; 将所述排名与所述播放地址关联, 并添加到视频 库中。 117、 如 115或 116任一所述的服务器, 所述匹配并获取模块, 包括: 匹配子模块, 用于将所 述播放信息与所述视频库中的视频描述信息进行匹配, 确定匹配的视频描述信息; 获取子模块, 用于 获取与所述匹配的视频描述信息关联的各播放地址, 并将所述各播放地址构成地址信息。 118、如 117 所述的服务器; 所述获取子模块, 具体用于获取与所述匹配的视频描述信息关联的各播放地址, 并获 取所述各播放地址关联的排名; 从所述排名中获取排在前预定位数的播放地址, 将所述前预定位数的 播放地址构成所述地址信息。 119、 如 118所述的服务器; 所述获取子模块, 具体用于将所述前预定 位数的播放地址关联的排名添加到所述地址信息中。 120、 根据 113所述的服务器, 所述预置状态包 括以下任一项: 获取视频数据失败, 视频停止播放时间超过第一预设时间, 和视频实际播放时间减去 理论播放时间的差值超过第二预设时间。
根据本发明实施例公开了 J21、 一种浏览器, 包括: 监控并获取模块, 用于监控视频播放过程, 当检测到播放的视频出现预置状态时, 获取所述视频的播放信息; 发送模块, 用于将所述播放信息发 送给服务器; 接收并播放模块, 用于接收服务器反馈的地址信息, 以用于对所述地址信息对应的视频 进行播放。 J22、 如 J21所述的浏览器, 所述接收并播放模块, 包括: 接收子模块, 用于接收服务器 反馈的地址信息, 显示所述地址信息中的播放地址; 播放子模块, 用于接收播放指令, 根据所述播放 指令对对应的视频进行播放。 J23、 如 J21所述的浏览器, 在浏览器中采用独立进程播放视频; 所述 监控并获取模块, 具体用于监控独立进程中视频的播放过程。 J24、 如 J21所述的浏览器, 所述预置 状态包括以下任一项: 获取视频数据失败, 视频停止播放时间超过第一预设时间, 和视频实际播放时 间减去理论播放时间的差值超过第二预设时间。
根据本发明实施例公开了 K25、 一种视频的播放***, 包括: 服务器和浏览器; 所述服务器, 包括: 接收模块, 用于接收浏览器获取的播放信息, 所述播放信息是在播放时出现预置状态的视频中 获取的;匹配并获取模块,用于确定与所述播放信息匹配的视频,并获取所述匹配的视频的地址信息; 反馈模块, 用于将所述地址信息反馈给所述浏览器; 所述浏览器, 包括: 监控并获取模块, 用于监控 视频播放过程, 当检测到播放的视频出现预置状态时, 获取所述视频的播放信息; 发送模块, 用于将 所述播放信息发送给服务器; 接收并播放模块, 用于接收服务器反馈的地址信息, 以用于对所述地址 信息对应的视频进行播放。
Claims
1、 一种浏览器中插件的播放方法, 包括:
在浏览器的页面进程加载并激活第一插件时, 创建与页面进程不同的独立进程, 在独立进 程中加载并激活第二插件, 其中, 所述第二插件复制所述第一插件的信息;
在独立进程中, 对所述第二插件的信息进行计算, 获取计算结果;
根据所述计算结果在播放窗口中对所述第二插件进行绘制播放。
2、 根据权利要求 1所述的方法, 所述第二插件复制所述第一插件的信息, 包括: 在页面进程中为所述第一插件生成第一控件对象;
在独立进程中为所述第二插件生成第二控件对象;
利用所述第二控件对象和所述第一控件对象进行交互通信, 获取所述第一插件的信息; 利用所述第二控件对象将获取的所述第一插件的信息发送至所述第二插件。
3、 根据权利要求 2所述的方法,
所述第一插件和所述第一控件对象间通过指针进行相互操作, 其中, 该指针能够调用多个 标准接口; 以及
所述第二插件和所述第二控件对象间通过同类型的指针进行相互操作。
4、根据权利要求 2所述的方法,利用所述第二控件对象和所述第一控件对象进行交互通信, 包括:
在页面进程中, 创建与所述第一控件对象关联的第一窗口;
在独立进程中, 创建与所述第二控件对象关联的第二窗口;
利用所述第一窗口和所述第二窗口进行交互通信。
5、 根据权利要求 2至 4任一项所述的方法, 交互通信的信息包括下列至少之一: 插件的大小、 页面进程中的线程的焦点、 页面进程的线程的刷新操作、 脚本的执行。
6、 根据权利要求 1至 5任一项所述的方法, 根据所述计算结果在播放窗口中对所述第二插 件进行绘制播放, 包括:
当页面进程不存在所述第一插件的播放窗口时, 利用所述独立进程新建播放窗口; 根据所述独立进程的定时器, 定时获取所述计算结果;
根据所述计算结果在新建播放窗口中对所述第二插件进行绘制播放。
7、 根据权利要求 1至 6任一项所述的方法, 根据所述计算结果在播放窗口中对所述第二插 件进行绘制播放, 包括:
当页面进程中存在所述第一插件的原播放窗口时, 利用所述独立进程新建播放窗口, 并将 新建的播放窗口设置为原播放窗口的父窗口;
根据所述计算结果在新建的播放窗口中对所述第二插件进行绘制播放。
8、根据权利要求 6或 7所述的方法,所述新建的播放窗口能够在浏览器上进行移动或缩放。
9、 根据权利要求 7所述的方法, 还包括:
页面进程发起获取播放窗口的请求时, 独立进程告知页面进程无播放窗口。
10、 根据权利要求 1至 9任一项所述的方法, 所述第一插件和 /或所述第二插件为 Act i veX 插件。
11、 一种浏览器中插件的播放装置, 包括:
创建模块, 配置为在浏览器的页面进程加载并激活第一插件时, 创建与页面进程不同的独 立进程, 在独立进程中加载并激活第二插件, 其中, 所述第二插件复制所述第一插件的信息; 计算模块, 配置为在独立进程中, 对所述第二插件的信息进行计算, 获取计算结果; 播放模块, 配置为根据所述计算结果在播放窗口中对所述第二插件进行绘制播放。
12、 根据权利要求 11所述的装置, 所述创建模块还配置为:
在页面进程中为所述第一插件生成第一控件对象;
在独立进程中为所述第二插件生成第二控件对象;
利用所述第二控件对象和所述第一控件对象进行交互通信, 获取所述第一插件的信息; 利用所述第二控件对象将获取的所述第一插件的信息发送至所述第二插件。
13、 根据权利要求 12所述的装置, 其中
所述第一插件和所述第一控件对象间通过指针进行相互操作, 其中, 该指针能够调用多个 标准接口; 以及
所述第二插件和所述第二控件对象间通过同类型的指针进行相互操作。
14、 根据权利要求 12所述的装置, 所述创建模块还配置为:
在页面进程中, 创建与所述第一控件对象关联的第一窗口;
在独立进程中, 创建与所述第二控件对象关联的第二窗口;
利用所述第一窗口和所述第二窗口进行交互通信。
15、 根据权利要求 12至 14任一项所述的装置, 交互通信的信息包括下列至少之一: 插件的大小、 页面进程中的线程的焦点、 页面进程的线程的刷新操作、 脚本的执行。
16、 根据权利要求 11至 15任一项所述的装置, 所述播放模块还配置为:
当页面进程不存在所述第一插件的播放窗口时, 利用所述独立进程新建播放窗口; 根据所述独立进程的定时器, 定时获取所述计算结果;
根据所述计算结果在新建播放窗口中对所述第二插件进行绘制播放。
17、 根据权利要求 11至 16任一项所述的装置, 所述播放模块还配置为:
当页面进程中存在所述第一插件的原播放窗口时, 利用所述独立进程新建播放窗口, 并将 新建的播放窗口设置为原播放窗口的父窗口;
根据所述计算结果在新建的播放窗口中对所述第二插件进行绘制播放。
18、 根据权利要求 16或 17所述的装置, 所述新建的播放窗口能够在浏览器上进行移动或 缩放处理。
19、 根据权利要求 17所述的装置, 还包括告知模块, 配置为接收到页面进程发起获取播放 窗口的请求时, 利用独立进程告知页面进程无播放窗口。
20、根据权利要求 11至 19任一项所述的装置,所述第一插件和 /或所述第二插件为 Act iveX 插件。
21、 一种计算机程序, 包括计算机可读代码, 当所述计算机可读代码在服务器上运行时, 导致所述服务器执行根据权利要求 1- 10中的任一个所述的浏览器中插件的播放方法。
22、 一种计算机可读介质, 其中存储了如权利要求 21所述的计算机程序。
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
US14/655,138 US20150347164A1 (en) | 2012-12-25 | 2013-09-18 | Method and Device for Playing Plug-in in Browser |
Applications Claiming Priority (6)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210572420.8A CN103077194B (zh) | 2012-12-25 | 2012-12-25 | 浏览器活动对象的创建方法、装置及浏览器 |
CN201210573012.4 | 2012-12-25 | ||
CN201210572420.8 | 2012-12-25 | ||
CN2012105730124A CN103024535A (zh) | 2012-12-25 | 2012-12-25 | 一种视频的播放方法、服务器及视频的播放*** |
CN201210573078.3 | 2012-12-25 | ||
CN201210573078.3A CN103064680B (zh) | 2012-12-25 | 2012-12-25 | 浏览器中插件的播放方法及装置 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2014101486A1 true WO2014101486A1 (zh) | 2014-07-03 |
Family
ID=51019856
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2013/083729 WO2014101486A1 (zh) | 2012-12-25 | 2013-09-18 | 浏览器中插件的播放方法及装置 |
Country Status (2)
Country | Link |
---|---|
US (1) | US20150347164A1 (zh) |
WO (1) | WO2014101486A1 (zh) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2021051991A1 (zh) * | 2019-09-18 | 2021-03-25 | 深圳Tcl新技术有限公司 | 一种智能调整音量的方法、***及存储介质 |
CN113271500A (zh) * | 2021-04-06 | 2021-08-17 | 北京硬核聚视科技有限公司 | 一种模拟人工的视频播放测试***及方法 |
Families Citing this family (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP5980037B2 (ja) * | 2012-08-06 | 2016-08-31 | キヤノン株式会社 | 管理システム、サーバー、クライアント、及びその方法 |
CN105208442B (zh) * | 2014-06-27 | 2018-06-26 | 贝壳网际(北京)安全技术有限公司 | 一种视频播放应用程序的视频播放方法及装置 |
US10902152B2 (en) * | 2017-06-30 | 2021-01-26 | Oracle International Corporation | Restricting plug-in application recipes |
US11023300B2 (en) | 2017-06-30 | 2021-06-01 | Oracle International Corporation | Governing access to third-party application programming interfaces |
CN110769310B (zh) * | 2018-07-26 | 2022-06-17 | 视联动力信息技术股份有限公司 | 一种基于视联网的视频处理方法和装置 |
CN111083569B (zh) * | 2018-10-18 | 2021-11-05 | 杭州海康威视数字技术股份有限公司 | 一种视频播放方法及装置 |
CN112118487B (zh) * | 2019-06-21 | 2022-01-28 | 腾讯科技(深圳)有限公司 | 一种视频播放控制方法、装置、设备、及介质 |
CN113542875B (zh) * | 2021-06-24 | 2024-05-14 | 深圳华远云联数据科技有限公司 | 视频处理方法、装置、电子设备以及存储介质 |
CN114554291B (zh) * | 2022-02-17 | 2024-05-28 | 上海幻维数码创意科技股份有限公司 | 一种基于unity插件的多视频播放控制方法 |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102314510A (zh) * | 2011-09-15 | 2012-01-11 | 奇智软件(北京)有限公司 | 一种浏览器控件执行方法及*** |
CN102681850A (zh) * | 2012-05-07 | 2012-09-19 | 奇智软件(北京)有限公司 | 一种基于Webkit 内核提供网页浏览的方法及装置 |
CN103024535A (zh) * | 2012-12-25 | 2013-04-03 | 北京奇虎科技有限公司 | 一种视频的播放方法、服务器及视频的播放*** |
CN103064680A (zh) * | 2012-12-25 | 2013-04-24 | 北京奇虎科技有限公司 | 浏览器中插件的播放方法及装置 |
CN103077194A (zh) * | 2012-12-25 | 2013-05-01 | 北京奇虎科技有限公司 | 浏览器活动对象的创建方法、装置及浏览器 |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP1145157A4 (en) * | 1998-10-28 | 2007-10-17 | Yahoo Inc | METHOD FOR CONTROLLING INTERFACE OF INTERNET BROWSER AND CONTROLLABLE BROWSER INTERFACE |
JP4098455B2 (ja) * | 2000-03-10 | 2008-06-11 | 株式会社日立製作所 | マーク画像中の電子透かし情報の参照方法及び計算機 |
US6993074B2 (en) * | 2000-03-24 | 2006-01-31 | Microsoft Corporation | Methods and arrangements for handling concentric mosaic image data |
US8732794B2 (en) * | 2007-08-13 | 2014-05-20 | Trusteer Ltd. | Browser plug-in firewall |
US20100257451A1 (en) * | 2009-04-05 | 2010-10-07 | Hbr Labs Inc. | System and method for synchronizing collaborative web applications |
-
2013
- 2013-09-18 WO PCT/CN2013/083729 patent/WO2014101486A1/zh active Application Filing
- 2013-09-18 US US14/655,138 patent/US20150347164A1/en not_active Abandoned
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102314510A (zh) * | 2011-09-15 | 2012-01-11 | 奇智软件(北京)有限公司 | 一种浏览器控件执行方法及*** |
CN102681850A (zh) * | 2012-05-07 | 2012-09-19 | 奇智软件(北京)有限公司 | 一种基于Webkit 内核提供网页浏览的方法及装置 |
CN103024535A (zh) * | 2012-12-25 | 2013-04-03 | 北京奇虎科技有限公司 | 一种视频的播放方法、服务器及视频的播放*** |
CN103064680A (zh) * | 2012-12-25 | 2013-04-24 | 北京奇虎科技有限公司 | 浏览器中插件的播放方法及装置 |
CN103077194A (zh) * | 2012-12-25 | 2013-05-01 | 北京奇虎科技有限公司 | 浏览器活动对象的创建方法、装置及浏览器 |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2021051991A1 (zh) * | 2019-09-18 | 2021-03-25 | 深圳Tcl新技术有限公司 | 一种智能调整音量的方法、***及存储介质 |
US12047047B2 (en) | 2019-09-18 | 2024-07-23 | Shenzhen Tcl New Technology Co., Ltd. | Method and system for intelligently adjusting volume, and storage medium |
CN113271500A (zh) * | 2021-04-06 | 2021-08-17 | 北京硬核聚视科技有限公司 | 一种模拟人工的视频播放测试***及方法 |
CN113271500B (zh) * | 2021-04-06 | 2022-06-21 | 北京硬核聚视科技有限公司 | 一种模拟人工的视频播放测试***及方法 |
Also Published As
Publication number | Publication date |
---|---|
US20150347164A1 (en) | 2015-12-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2014101486A1 (zh) | 浏览器中插件的播放方法及装置 | |
WO2020119434A1 (zh) | 接口数据处理方法、自动化测试方法、装置、设备和介质 | |
CN106503134B (zh) | 浏览器跳转至应用程序的数据同步方法及装置 | |
US8793347B2 (en) | System and method for providing virtual web access | |
US10198410B2 (en) | Method, device and mobile terminal for restoring page | |
JP6129402B2 (ja) | ページスナップショットの作成 | |
CN106528659B (zh) | 浏览器跳转至应用程序的控制方法及装置 | |
CN109766725B (zh) | 一种数据处理方法、设备、智能终端及计算机可读介质 | |
US20180131779A1 (en) | Recording And Triggering Web And Native Mobile Application Events With Mapped Data Fields | |
US10866884B2 (en) | Stateless injected script debugging | |
WO2010121530A1 (zh) | 在浏览器中加载网页的方法及浏览器 | |
US11831617B2 (en) | File upload control for client-side applications in proxy solutions | |
CN105095280A (zh) | 一种浏览器缓存方法和装置 | |
CN107807934B (zh) | 页面显示方法和装置以及计算设备 | |
WO2013097592A1 (zh) | 脚本加载技术 | |
CN106649497B (zh) | 一种网页展示方法及装置 | |
WO2014090082A1 (zh) | 图片处理方法、装置及终端 | |
US20140067835A1 (en) | Search extensibility application framework in a hosted search | |
US9727394B2 (en) | Establishing causality order of computer trace records | |
CN110413476A (zh) | 网页崩溃监听方法、装置、计算机设备和存储介质 | |
WO2017148349A1 (zh) | 一种浏览网页中缩略图的方法及装置 | |
EP3125541A1 (en) | Data acquisition and interaction method, set top box, server and multimedia system | |
JP2019511060A (ja) | ページ表示のための方法及び装置 | |
US20110295966A1 (en) | Methods, systems, and computer program products for processing a combined command response based on a markup element | |
US20130304807A1 (en) | Methods, systems, and computer program products for processing a non-returnable command response based on a markup element |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 13868603 Country of ref document: EP Kind code of ref document: A1 |
|
WWE | Wipo information: entry into national phase |
Ref document number: 14655138 Country of ref document: US |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 13868603 Country of ref document: EP Kind code of ref document: A1 |