Summary of the invention
The purpose of this invention is to provide a kind of multimedia display method based on browser and system, under the prerequisite of not changing browser kernel, allow the stereo display of browser support to multimedia object.
For achieving the above object, the invention provides technical scheme as follows:
A kind of multimedia display method based on browser comprises:
From browser window, selecting the multimedia object that need to carry out stereo display;
Obtain first display region information of described multimedia object with respect to player window;
According to described the first display region information, obtain second display region information of described multimedia object with respect to described browser window;
According to described the second display region information, obtain three display region information of described multimedia object 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 the first display region information, described the 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 to stereo display;
When according to described status information is definite, not supporting described multimedia object is carried out to 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 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 Web-page Multi-media module, for obtaining first display region information of browser window multimedia object with respect to player window;
Page end module, for from browser window, selecting the multimedia object that need to carry out stereo display, described first display region information corresponding according to described multimedia object, obtain second display region information of described multimedia object with respect to described browser window;
Browser bridge control, for according to described the second display region information, obtaining three display region information of described multimedia object with respect to display screen, 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 for, obtain the operation behavior of user to described player window and described browser window, and according to described operation behavior, the 3rd display region information upgraded;
Described Web-page Multi-media module also for, according to described operation behavior, described the first display region information is upgraded;
Described page end module also for, according to described operation behavior, described the second display region information is upgraded.
Above-mentioned multi-media display system, wherein:
Described browser bridge control also 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 for, obtain the status information relevant to stereo display, when according to described status information is definite, not supporting described multimedia object is carried out to 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 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 from obtaining the display region information of multimedia object browser, and after being converted to the display region information with respect to display screen, this display region information sends to stereo display hardware, by stereo display hardware, complete the stereo display to described multimedia object, thereby realized under the prerequisite of not changing browser kernel, allow the browser support to the stereo display of multimedia object, greatly strengthened user's experience.
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 present invention, comprise the steps:
Step 101: from selecting the multimedia object that need to carry out stereo display browser window;
Multimedia refers to the general designation of the various media such as figure, image, animation and video that act on people's sense organ.In webpage, often embed various multimedia objects are arranged, after the user opened a webpage by browser, the multimedia object in webpage need be play through the player associated with it, and broadcast mode is automatically to play or play according to user's selection.Some multimedia object is not suitable for stereo display, too small such as the play area area, stereoeffect is not obvious, play area shifts out the multimedia objects such as browser clients zone.Can automatically detect by the broadcasting to multimedia object, obtain the size of coordinate, size and the play area of multimedia object play area, and according to these information, weed out the multimedia object that is not suitable for carrying out stereo display.
Also can determine the multimedia object that need to carry out 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 the multimedia object of stereo display as needs.
Certainly, under the prerequisite of not considering display effect, can also select all multimedia objects in browser window are carried out to stereo display.
Step 102: obtain first display region information of described multimedia object with respect to player window;
After selecting and need to carrying out the multimedia object of stereo display, just in the time of can obtaining it and play with respect to the first display region information of player window, the i.e. position of the play area of this multimedia object in player window, comprise the 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 the first display region information;
At first obtain the position of player window in browser window, then, position according to player window in browser window, by the play area of multimedia object, be the coordinate with respect to browser window 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 the second viewing area.
Step 104: obtain three display region information of described multimedia object with respect to display screen according to described the second display region information;
At first obtain the position of browser window in display screen, then, position according to browser window in display screen, by the play area of multimedia object, be the coordinate with respect to display screen 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 in described the 3rd viewing area, carry out stereo display to described multimedia object by the described display screen of described stereo display chip controls.
The said method of the embodiment of the present invention is by from obtaining the display region information of multimedia object browser, and after being converted to the display region information with respect to display screen, this display region information sends to stereo display hardware, by stereo display hardware, complete the stereo display to described multimedia object, thereby realized under the prerequisite of not changing browser kernel, allow the browser support to the stereo display of multimedia object, greatly strengthened user's experience.
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 to the stereo display zone of display screen, upgrade according to these variations.Therefore, the multimedia display method based on browser of the embodiment of the present invention also can comprise:
Obtain the operation behavior of user to described player window and described browser window;
According to described operation behavior, described the first display region information, described the 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 to (comprise and minimize player window), towing player window etc.When these operation behaviors occur, can again obtain the position of play area in player window of multimedia object, comprise its coordinate in player window, the information such as size, the first display region information after being upgraded, then, according to the first display region information after upgrading, described the second display region information is upgraded, according to the second display region information after upgrading, described the 3rd display region information is upgraded, and the 3rd display region information after upgrading sends to the stereo display chip, thereby make 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 zoomed in or out 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 zoomed in or out;
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 zoomed in or out.
When said circumstances occurs, need to upgrade the first display region information, the second display region information and/or the 3rd display region information, and the 3rd display region information after upgrading sends to the stereo display chip, thereby make the stereo display zone of display screen also obtain renewal.
For example, during the rolling webpage, need to upgrade described the second display region information, then, according to the second display region information after upgrading, described the 3rd display region information is upgraded.
Again for example, while pulling webpage, first and second display region information does not change, and directly upgrades described the 3rd display region information.
Other various update status, will not enumerate here.
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 display packing of the multimedia object based on browser of the embodiment of the present 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 while shifting out the browser clients zone, by the stereo display chip, close current stereo display effect, and switch to two-dimentional common display effect.
Preferably, the multimedia display method based on browser of the embodiment of the present invention also can comprise:
Obtain the status information relevant to stereo display;
When according to described status information is definite, not supporting described multimedia object is carried out to 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.
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 browser is blocked.
Particularly, when following state occurs, by the stereo display chip, close current stereo display effect, and switch to two-dimentional common display effect: lens pillar is closed, face does not follow the tracks of upper, and stereo display is closed, and browser window is not current theactivewindow, multimedia object zone in 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 present 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:
Web-page Multi-media module 10, for obtaining first display region information of browser window multimedia object with respect to player window;
Page end module 20, for from browser window, selecting the multimedia object that need to carry out stereo display, described first display region information corresponding according to described multimedia object, obtain second display region information of described multimedia object with respect to described browser window;
Browser bridge control 30, for according to described the second display region information, obtaining three display region information of described multimedia object with respect to display screen, 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 to the stereo display zone of display screen, upgrade 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 Web-page Multi-media module 10 also can be used for, and according to described operation behavior, described the first display region information is upgraded;
Described page end module 20 also can be used for, and according to described operation behavior, described the 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 to stereo display, when according to described status information is definite, not supporting described multimedia object is carried out to 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.
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 browser, browser bridge control 30 is bridges of Web-page Multi-media module 10, page end module 20 and intersystem communications, in browser plug-in or modularity embedding browser, make browser to communicate by letter with system-level routine interface, these three modules coordinate the hardware interface of stereo display, under the prerequisite of not changing browser kernel, can complete the stereo display to the Web-page Multi-media object.
Below provide the specific implementation of above-mentioned three modules.
Web-page Multi-media module 10, this Module-embedding, in webpage, are used for supporting that the multimedia in browser page represents, and complete specifying screen area to call the stereo display function.
This module not only can play multimedia, and, different event during to broadcasting has been done respective handling, such as with full screen mode/general mode play multimedia the time, the multimedia zone is while changing, 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 Web-page 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.In case go out present condition, change, changing immediately three-dimensional multimedia stereoscopic-state is two-dimensional state, to strengthen user's use impression.
Page end module 20, write in the page with form of scripts, loaded and carried out by browser.
Page end module 20 is used for managing Web-page Multi-media modules 10 one or more in current web page.In the page due to webpage, comprise the various media informations such as video, advertisement, so may have a plurality of Web-page Multi-media modules 10.Page end module 20 arranges the also size of coordinate, size and the play area of these Web-page Multi-media modules 10 of real-time servicing, and mark the current Web-page Multi-media module 10 be used, filter out the Web-page Multi-media module 10 that is not suitable for presenting stereoeffect, too small such as the play area area, stereoeffect is not obvious, play area shifts out browser clients zone etc., in case these events occur, 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 the events such as webpage size.In case there is action to make the zone of Web-page Multi-media module 10 occur mobile or change the variations such as big or small, just record, as relative coordinate (browser relatively), pass to browser bridge control 30.
Page end module 20 can also detect current system and whether support stereo display, does not support to carry out common two dimension and shows.
Page end module 20 can also be mutual with Web-page Multi-media module 10, and the multimedia function of packaged unit operation, for other script, specifically comprises:
Operate multimedia broadcasting/time-out;
Operation web page multi-media module 10 dynamic load multimedia objects;
Wait for and receive viewing area, the display parameter that transmitted by Web-page 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 packing browser bridge control 30 specifically comprises for Web-page Multi-media 10:
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, left and right/right left side/upper and lower/lower upper pattern;
The stereoeffect of specific region on display screen;
Close the stereoeffect of specific region on screen;
The page loads and initialization stereo display function;
Page close also unloads the stereo display function.
Browser bridge control 30, loaded and moved by browser, is the bridge of linking up page end module 20 and hardware.Not only can monitor browser, obtain multimedia steric parameter in webpage, and can open or close face tracking equipment, obtain the face tracking state, or by the appointed area stereo display on screen.
Wherein, monitoring browser part is comprised of following function:
The monitoring browser, intercept and capture it to move/varying sized/event such as minimize, and the relative coordinate (browser relatively) that will send from page end module 20, convert absolute coordinates (display screen relatively) to;
The state of activation of monitoring browser, during unactivated state, must close stereoeffect in time;
The state of activation of monitoring browser Shipping Options Page, during unactivated state, must close stereoeffect in time.
Getting state and face tracking partly is comprised of following function:
Obtain the face tracking state;
Obtain current stereo display state;
Get current lens pillar state.
Fig. 3 is each module cooperation schematic diagram of the multi-media display system based on browser of the embodiment of the present invention.With reference to Fig. 3, relate generally to following flow process:
-user opens webpage, if the hardware of stereo display do not detected, shows multimedia according to traditional two-dimensional approach, otherwise, loading the bridge control module, the hardware of now following the tracks of face is initialised, and face tracking partly starts to start.
If what-the page showed is video, when video started to play, the video area size that will play by the Web-page Multi-media module sent page end module to, and video suspends or while stopping, stopping transmitting the video area size; If what the page showed is picture, will treat that the dimension of picture of aobvious stereoeffect sends page end module to.Page end module receives the dimension information that the Web-page Multi-media module sends, and converts relative coordinate (browser relatively) to and records, and as treating aobvious three-dimensional zone, sends to browser bridge control.
-browser bridge control obtains treating aobvious three-dimensional area size, converts thereof into absolute coordinates (display screen relatively).Simultaneously, also to monitor the state of browser in system, the state of monitoring face tracking, the state of the current stereo display of monitoring, monitor current lens pillar state, with decision suitable demonstration stereoeffect whether.
-now, the Web-page Multi-media module is in operation, and the status information provided by browser bridge control is provided at any time, in case find, can not continue to show stereoeffect, immediately by video or picture effect furnishing two-dimensional effects.
-generally, browser bridge control always can send the absolute coordinates for the treatment of aobvious three-dimensional zone to the stereo display hardware interface, and hardware starts to process, and then, the user can see the stereoeffect in this zone.
-when following state occurs, browser bridge control can not send the coordinate for the treatment of aobvious three-dimensional zone to the stereo display hardware interface: 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 browser is blocked, or current browser window Shipping Options Page is not activated.
-when size occurs browser, moving and wait while changing, page end module can recalculate the picture region size immediately, and continues above flow process, is reflected in time 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 multimedia display method based on browser of the embodiment of the present invention and system mainly for be the 3D multimedia object, the effect of carrying out the 3D displaying for the 2D multimedia object slightly is inferior to the 3D multimedia object.In order to make the 2D multimedia object have better solid show effect, the embodiment of the present invention can also utilize known technology first 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 present invention.Particularly, a modular converter can be set in system, by described modular converter, the 2D multimedia object be converted to the 3D multimedia object.
One of ordinary skill in the art will appreciate that, realize that all or part of step in above-described embodiment method is to come the hardware that instruction is relevant to complete by program, described program can be stored in a computer read/write memory medium, this program is when carrying out, comprise the step as above-mentioned embodiment of the method, described storage medium, as: magnetic disc, CD, read-only store-memory body (Read-Only Memory, ROM) or random store-memory body (Random Access Memory, RAM) etc.In each embodiment of the method for the present invention; the sequence number of described each step can not be used to limiting 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.
Finally should be noted that, 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 modify 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 claim scope of the present invention.