Summary of the invention
The purpose of this invention is to provide a kind of multimedia display method and system, under the prerequisite of not changing the browser kernel, allow the stereo display of browser support multimedia object based on browser.
For achieving the above object, it is as follows to the invention provides technical scheme:
A kind of multimedia display method based on browser comprises:
The multimedia object that selection need be carried out stereo display from browser window;
Obtain first display region information of described multimedia object with respect to player window;
Obtain second display region information of described multimedia object according to described first display region information with respect to described browser window;
Obtain three display region information of described multimedia object according to described second display region information with respect to display screen;
The stereo display instruction of carrying described the 3rd display region information is sent to the stereo display chip, so that the described display screen of described stereo display chip controls carries out stereo display in described the 3rd viewing area to described multimedia object.
Above-mentioned multimedia display method also comprises:
Obtain the operation behavior of user to described player window and described browser window;
According to described operation behavior described first display region information, described second display region information and described the 3rd display region information are upgraded.
Above-mentioned multimedia display method wherein, also comprises:
When described operation behavior causes described multimedia object to be not suitable for stereo display, send two-dimentional idsplay order to described stereo display chip, so that carrying out two dimension to described multimedia object, the described display screen of described stereo display chip controls shows.
Above-mentioned multimedia display method also comprises:
Obtain the status information relevant with stereo display;
When determining not support that described multimedia object carried out stereo display according to described status information, send two-dimentional idsplay order to described stereo display chip, show so that the described display screen of described stereo display chip controls carries out two dimension to described multimedia object.
Above-mentioned multimedia display method, wherein, described status information comprises:
Lens pillar state, face tracking state, browser status and/or stereo display state.
A kind of multi-media display system based on browser comprises:
The webpage multi-media module is used for obtaining first display region information of browser window multimedia object with respect to player window;
Page end module, be used for selecting the multimedia object to carry out stereo display from browser window, according to described first display region information of described multimedia object correspondence, obtain second display region information of described multimedia object with respect to described browser window;
Browser bridge control, be used for obtaining three display region information of described multimedia object with respect to display screen according to described second display region information, and the stereo display instruction that will carry described the 3rd display region information is sent to the stereo display chip, so that the described display screen of described stereo display chip controls carries out stereo display in described the 3rd viewing area to described multimedia object.
Above-mentioned multi-media display system, wherein:
Described browser bridge control also is used for, and obtains the operation behavior of user to described player window and described browser window, and according to described operation behavior the 3rd display region information is upgraded;
Described webpage multi-media module also is used for, and according to described operation behavior described first display region information is upgraded;
Described page end module also is used for, and according to described operation behavior described second display region information is upgraded.
Above-mentioned multi-media display system, wherein:
Described browser bridge control also is used for, when described operation behavior causes described multimedia object to be not suitable for stereo display, send two-dimentional idsplay order to described stereo display chip, show so that the described display screen of described stereo display chip controls carries out two dimension to described multimedia object.
Above-mentioned multi-media display system, wherein:
Described browser bridge control also is used for, obtain the status information relevant with stereo display, when determining not support that described multimedia object carried out stereo display according to described status information, send two-dimentional idsplay order to described stereo display chip, show so that the described display screen of described stereo display chip controls carries out two dimension to described multimedia object.
Above-mentioned multi-media display system, wherein, described status information comprises: lens pillar state, face tracking state, browser status and/or stereo display state.
Compared with prior art, the invention has the beneficial effects as follows:
The present invention is by obtaining the display region information of multimedia object from browser, and send to stereo display hardware after this display region information is converted to display region information with respect to display screen, finish stereo display by stereo display hardware to described multimedia object, thereby realized under the prerequisite of not changing the browser kernel, allow the browser support to the stereo display of multimedia object, strengthened user experience greatly.
Embodiment
For making the purpose, technical solutions and advantages of the present invention clearer, describe the present invention below in conjunction with the accompanying drawings and the specific embodiments.
With reference to Fig. 1, the multimedia display method based on browser of the embodiment of the invention comprises the steps:
Step 101: the multimedia object that selection need be carried out stereo display from browser window;
Multimedia is meant the general designation of the various medium such as figure, image, animation and video that act on people's sense organ.Often embedding in the webpage has various multimedia objects, and after the user opened a webpage by browser, the multimedia object in the webpage needed to play through the player related with it, and broadcast mode is to play automatically or play according to user's selection.Some multimedia object is not suitable for stereo display, and for example the play area area is too small, stereoeffect is not obvious, play area shifts out multimedia objects such as browser clients zone.Can detect automatically by broadcast, obtain the area size of coordinate, size and the play area of multimedia object play area, and weed out the multimedia object that is not suitable for carrying out stereo display according to these information to multimedia object.
Also can determine that needs carry out the multimedia object of stereo display according to user's selection.For example, obtain user's mouse event, the multimedia object in the player window that the selection mouse stops or the player window of mouse-click carries out stereo display as needs multimedia object.
Certainly, under the prerequisite of not considering display effect, can also select all multimedia objects in the browser window are carried out stereo display.
Step 102: obtain first display region information of described multimedia object with respect to player window;
Select need carry out the multimedia object of stereo display after, just in the time of can obtaining it and play with respect to first display region information of player window, the i.e. position of the play area of this multimedia object in player window, comprise information such as the coordinate of this play area in player window, size, the coordinate here is for player window.
Step 103: obtain second display region information of described multimedia object with respect to described browser window according to described first display region information;
At first obtain the position of player window in browser window, then, according to the position of player window in browser window, is coordinate with respect to browser window with the play area of multimedia object with respect to the coordinate conversion of player window, according to play area with respect to the coordinate of browser window and the size of play area, just can obtain the position of play area in browser window, be described second viewing area.
Step 104: obtain three display region information of described multimedia object with respect to display screen according to described second display region information;
At first obtain the position of browser window in display screen, then, according to the position of browser window in display screen, is coordinate with respect to display screen with the play area of multimedia object with respect to the coordinate conversion of browser window, according to play area with respect to the coordinate of display screen and the size of play area, just can obtain the position of play area in display screen, be described the 3rd viewing area.
Step 105: the stereo display instruction that will carry described the 3rd display region information is sent to the stereo display chip, so that the described display screen of described stereo display chip controls carries out stereo display in described the 3rd viewing area to described multimedia object.
Prior art has realized carrying out in any zone of display screen the technology of stereo display, and can also adjust the zone of stereo display.Therefore, by described the 3rd display region information is sent to the stereo display chip, just can carry out stereo display in described the 3rd viewing area to described multimedia object by the described display screen of described stereo display chip controls.
The said method of the embodiment of the invention is by obtaining the display region information of multimedia object from browser, and send to stereo display hardware after this display region information is converted to display region information with respect to display screen, finish stereo display by stereo display hardware to described multimedia object, thereby realized under the prerequisite of not changing the browser kernel, allow the browser support to the stereo display of multimedia object, strengthened user experience greatly.
In the process of play multimedia object, the user also often carries out certain operations to player window or browser window, these operations can cause multimedia object play area size with and position in display screen change, need upgrade the stereo display zone of display screen according to these variations.Therefore, the multimedia display method based on browser of the embodiment of the invention also can comprise:
Obtain the operation behavior of user to described player window and described browser window;
According to described operation behavior described first display region information, described second display region information and described the 3rd display region information are upgraded.
Wherein, the user comprises the operation behavior of player window: player window is amplified (comprising full screen mode), player window is dwindled (comprise and minimize player window), towing player window etc.When these operation behaviors take place, can obtain the position of play area in player window of multimedia object again, comprise its coordinate in player window, information such as size, first display region information after obtaining upgrading, then, according to first display region information after upgrading described second display region information is upgraded, according to second display region information after upgrading described the 3rd display region information is upgraded, and the 3rd display region information after will upgrading sends to the stereo display chip, thereby makes the stereo display zone of display screen also obtain renewal.
The user comprises the operation behavior of browser window: to webpage refresh, roll webpage, close webpage, pull webpage, webpage is amplified or dwindles etc.These operation behaviors may cause:
The position of the play area of multimedia object in browser window changes, for example, and the rolling webpage;
The size of the play area of multimedia object with and position in browser window change, for example, webpage is amplified or dwindles;
The position of browser window in display screen changes, and for example, pulls webpage;
The size of browser window with and position in display screen change, for example, webpage is amplified or dwindles.
When said circumstances takes place, need upgrade first display region information, second display region information and/or the 3rd display region information, and the 3rd display region information after will upgrading sends to the stereo display chip, thereby makes the stereo display zone of display screen also obtain renewal.
For example, during the rolling webpage, need to upgrade described second display region information, then, described the 3rd display region information is upgraded according to second display region information after upgrading.
Again for example, when pulling webpage, first and second display region information does not change, and directly upgrades described the 3rd display region information.
Other various more new situations are enumerated here no longer one by one.
In addition, the play area size of the multimedia object that user's aforesaid operations behavior causes and the variation of position, also may cause this net multimedia object no longer to be suitable for stereo display, therefore, the multimedia object display packing based on browser of the embodiment of the invention also can comprise:
When described operation behavior causes described multimedia object to be not suitable for stereo display, send two-dimentional idsplay order to described stereo display chip, so that carrying out two dimension to described multimedia object, the described display screen of described stereo display chip controls shows.
For example, the aforesaid operations behavior causes that the region area of play area of multimedia object is too small, stereoeffect is not obvious or play area when shifting out the browser clients zone, close current stereo display effect by the stereo display chip, and switch to two-dimentional common display effect.
Preferably, the multimedia display method based on browser of the embodiment of the invention also can comprise:
Obtain the status information relevant with stereo display;
When determining not support that described multimedia object carried out stereo display according to described status information, send two-dimentional idsplay order to described stereo display chip, show so that the described display screen of described stereo display chip controls carries out two dimension to described multimedia object.
Wherein, described status information comprises:
Lens pillar state: open or close;
Face tracking state: catch up with still and do not catch up with;
Stereo display state: open or close;
Browser status: whether browser window is whether current theactivewindow, browser window Shipping Options Page are activated, whether the multimedia object play area in the browser is blocked.
Particularly, when following state occurs, close current stereo display effect by the stereo display chip, and switch to two-dimentional common display effect: lens pillar is closed, on face did not follow the tracks of, stereo display was closed, and browser window is not current theactivewindow, multimedia object zone in the browser is blocked, and the browser window Shipping Options Page is not activated.
Corresponding with above-mentioned multimedia display method based on browser, the embodiment of the invention also provides a kind of multi-media display system based on browser, and with reference to Fig. 2, this multi-media display system comprises:
Webpage multi-media module 10 is used for obtaining first display region information of browser window multimedia object with respect to player window;
Page end module 20, be used for selecting the multimedia object to carry out stereo display from browser window, according to described first display region information of described multimedia object correspondence, obtain second display region information of described multimedia object with respect to described browser window;
Browser bridge control 30, be used for obtaining three display region information of described multimedia object with respect to display screen according to described second display region information, and the stereo display instruction that will carry described the 3rd display region information is sent to the stereo display chip, so that the described display screen of described stereo display chip controls carries out stereo display in described the 3rd viewing area to described multimedia object.
In the process of play multimedia object, the user also often carries out certain operations to player window or browser window, these operations can cause multimedia object play area size with and position in display screen change, need upgrade the stereo display zone of display screen according to these variations.
Therefore, described browser bridge control 30 also can be used for, and obtains the operation behavior of user to described player window and described browser window, and according to described operation behavior the 3rd display region information is upgraded;
Described webpage multi-media module 10 also can be used for, and according to described operation behavior described first display region information is upgraded;
Described page end module 20 also can be used for, and according to described operation behavior described second display region information is upgraded.
In addition, the play area size of the multimedia object that user's aforesaid operations behavior causes and the variation of position, also may cause this net multimedia object no longer to be suitable for stereo display, therefore, described browser bridge control 30 also can be used for, when described operation behavior causes described multimedia object to be not suitable for stereo display, send two-dimentional idsplay order to described stereo display chip, so that carrying out two dimension to described multimedia object, the described display screen of described stereo display chip controls shows.
Preferably, described browser bridge control 30 also can be used for, obtain the status information relevant with stereo display, when determining not support that described multimedia object carried out stereo display according to described status information, send two-dimentional idsplay order to described stereo display chip, show so that the described display screen of described stereo display chip controls carries out two dimension to described multimedia object.
Wherein, described status information comprises: lens pillar state, face tracking state, browser status and/or stereo display state.
Three above-mentioned modules all are operated in the browser, browser bridge control 30 is bridges of webpage multi-media module 10, page end module 20 and intersystem communications, embed in the browser with browser plug-in or modularity, make browser to communicate by letter with system-level routine interface, these three modules cooperate the hardware interface of stereo display, under the prerequisite of not changing the browser kernel, can finish stereo display to the webpage multimedia object.
Below provide the specific implementation of above-mentioned three modules.
Webpage multi-media module 10, this module is embedded in the webpage, is used for supporting that the multimedia in the browser page represents, and finishes specifying screen area to call the stereo display function.
This module not only can play multimedia, and, different event during to broadcast has been done respective handling, such as with full screen mode/general mode play multimedia the time, when the multimedia zone changes, the coordinate of play area, size and steric parameter can send page end module 20 to, call the stereo display function by page end module 20.
Simultaneously, this webpage multi-media module 10 is monitored onlooker's face tracking state, column prism current state at any time, the solid of current media is present condition, obtains these state values from page end module 20.Change in case go out present condition, then changing three-dimensional multimedia stereoscopic-state immediately is two-dimensional state, to strengthen user's use experience.
Page end module 20 writes in the page with form of scripts, is loaded and is carried out by browser.
Page end module 20 is used for managing one or more webpage multi-media module 10 in the current web page.Owing to comprise various media informations such as video, advertisement in the page of webpage, so may have a plurality of webpage multi-media modules 10.The area size of coordinate, size and the play area of 20 arrangements of page end module and these webpage multi-media modules 10 of real-time servicing, and mark the current webpage multi-media module 10 that is used, filter out the webpage multi-media module 10 that is not suitable for presenting stereoeffect, for example the play area area is too small, stereoeffect is not obvious, play area shifts out browser clients zone etc., in case these incidents take place, then close current stereoeffect, and change two-dimentional common display effect into.
Page end module 20 is gone back charge capture and the action of leading subscriber when browsing pages, such as detecting browser, detects version compatibility, the parameter integrality, and webpage refreshes, rolls, closes, pulls or change incidents such as webpage size.In case have action to make the zone of webpage multi-media module 10 take place to move or change variation such as size, just note, pass to browser bridge control 30 as relative coordinate (browser relatively).
Page end module 20 can also detect current system and whether support stereo display, does not support then to carry out common two dimension and shows.
Page end module 20 can also and webpage multi-media module 10 mutual, and packaged unit operates multimedia function, for other script use, specifically comprises:
Operate multimedia broadcast/time-out;
Operation web page multi-media module 10 dynamic load multimedia objects;
Wait for receiving viewing area, the display parameter that transmit by webpage multi-media module 10, receive aftertreatment, and send browser bridge control 30 to.
Page end module 20 can also be mutual with browser bridge control 30, and the function in the packing browser bridge control 30 specifically comprises for 10 uses of webpage multimedia:
Obtain current column prism state, open or close;
Obtain current face tracking state, catch up with still and do not catch up with;
Obtain or set the stereo display parameter, about/a right left side/up and down/the following pattern that goes up;
The stereoeffect of specific region on the display screen;
Close the stereoeffect of specific region on the screen;
The page loads and initialization stereo display function;
Page close also unloads the stereo display function.
Browser bridge control 30 is loaded and operation by browser, is the bridge of linking up page end module 20 and hardware.Not only can monitor browser, obtain multimedia steric parameter in the webpage, and can open or close face tracking equipment, obtain the face tracking state, or with the appointed area stereo display on the screen.
Wherein, monitoring browser part is made up of following function:
The monitoring browser is intercepted and captured it to move/varying sized/incident such as minimize, and the relative coordinate (browser relatively) that will send from page end module 20 converts absolute coordinates (display screen relatively) to;
The state of activation of monitoring browser during unactivated state, must in time be closed stereoeffect;
The state of activation of monitoring browser Shipping Options Page during unactivated state, must in time be closed stereoeffect.
Getting state and face tracking part is made up of following function:
Obtain the face tracking state;
Obtain current stereo display state;
Get current lens pillar state.
Fig. 3 is each module cooperation synoptic diagram based on the multi-media display system of browser of the embodiment of the invention.With reference to Fig. 3, relate generally to following flow process:
-user opens webpage, if do not detect the hardware of stereo display, shows multimedia according to traditional two-dimensional approach, otherwise, loading the bridge control module, the hardware that follow the tracks of face this moment is initialised, and face tracking partly begins to start.
If what-the page showed is video, when video began to play, the video area size that will play by the webpage multi-media module sent page end module to, and video suspends or when stopping, stopping to transmit the video area size; If what the page showed is picture, will wait that then the dimension of picture that shows stereoeffect sends page end module to.Page end module receives the dimension information that the webpage multi-media module sends, and converts relative coordinate (browser relatively) to and notes, and shows three-dimensional zone as waiting, sends to browser bridge control.
-browser bridge control obtains waiting showing three-dimensional area size, converts thereof into absolute coordinates (display screen relatively).Simultaneously, also will monitor the state of browser in system, the state of monitoring face tracking is monitored the state of current stereo display, monitors current lens pillar state, with decision suitable demonstration stereoeffect whether.
-at this moment, the webpage multi-media module is in operation, and the status information that is provided by browser bridge control is provided at any time, in case find to continue to show stereoeffect, then immediately with video or picture effect furnishing two-dimensional effects.
-generally speaking, browser bridge control always can will wait that the absolute coordinates that shows three-dimensional zone sends the stereo display hardware interface to, and hardware begins to handle, and then, the user can see the stereoeffect in this zone.
-when following state occurs, browser bridge control can will not wait that the coordinate that shows three-dimensional zone sends the stereo display hardware interface to: on finding that face does not follow the tracks of, show that perhaps stereoscopic-state is closed, perhaps lens pillar is closed, find that perhaps browser window is not current theactivewindow, perhaps the picture region in the browser is blocked, and perhaps current browser window Shipping Options Page is not activated.
-when size takes place browser, moving and wait when changing, page end module can recomputate the picture region size immediately, and continues above flow process, is in time reflected with the real-time change that guarantees the page.
-when the user closed browser, browser bridge control was unloaded, and face tracking is partly closed.
The embodiment of the invention what be primarily aimed at based on the multimedia display method of browser and system is the 3D multimedia object, carry out the effect that 3D shows for the 2D multimedia object and slightly be inferior to the 3D multimedia object.In order to make the 2D multimedia object have better solid show effect, the embodiment of the invention can also utilize known technology earlier the 2D multimedia object to be converted to the 3D multimedia object, and then carries out stereo display according to the said method of the embodiment of the invention.Particularly, a modular converter can be set in system, the 2D multimedia object be converted to the 3D multimedia object by described modular converter.
One of ordinary skill in the art will appreciate that, realize that all or part of step in the foregoing description method is to instruct relevant hardware to finish by program, described program can be stored in the computer read/write memory medium, this program is when carrying out, comprise step as above-mentioned method embodiment, described storage medium, as: magnetic disc, CD, read-only storage memory body (Read-Only Memory, ROM) or at random store memory body (Random Access Memory, RAM) etc.In each method embodiment of the present invention; the sequence number of described each step can not be used to limit the sequencing of each step; for those of ordinary skills, under the prerequisite of not paying creative work, the priority of each step is changed also within protection scope of the present invention.
Should be noted that at last, above embodiment is only unrestricted in order to technical scheme of the present invention to be described, those of ordinary skill in the art is to be understood that, can make amendment or be equal to replacement technical scheme of the present invention, and not breaking away from the spiritual scope of technical solution of the present invention, it all should be encompassed in the middle of the claim scope of the present invention.