Detailed description of the invention
It is more fully described the exemplary embodiment of the disclosure below with reference to accompanying drawings.Although accompanying drawing shows the disclosure
Exemplary embodiment, it being understood, however, that may be realized in various forms the disclosure and should be by embodiments set forth here
Limited.On the contrary, it is provided that these embodiments are able to be best understood from the disclosure, and can be by the scope of the present disclosure
Complete conveys to those skilled in the art.
The present inventor finds during using some to apply (such as, game application), answers using these
With when, can not display application user interface while also play video, i.e. user can not use these application
While can also watch video, user needs additionally to open Video Applications, but, Video Applications and other application can not simultaneously
Showing on mobile terminal screen, the display being also required to by arranging Video Applications and other interfaces applied in PC terminal is big
Little, Video Applications and other application could be shown simultaneously, if user wants to operate Video Applications or other application, need
Will so easily cause use inconvenience by cursor positioning to corresponding application, in order to solve the problems referred to above, inventor is through wound
The work of the property made, it is proposed that utilize parasitic tool kit, bound in advance with main application by parasitism tool kit, to provide in main application
User interface is play the solution of the function of video.
Wherein, main application is an independent application, and this application can independently realize corresponding function, it is not necessary to depends on and appoints
What his application, such as, game application, user plays after application in startup, the user that just can be provided in game application
Game is played on interface.
And this parasitism tool kit need to rely on main application and just can realize corresponding function, this is posted to need main application call
The api interface of raw tool kit could realize the parasitism corresponding function of tool kit, such as, by as a example by application plays video of playing,
Can play video user plays game when, game application here is main application simultaneously, and playing video is parasitic tool kit
The function realized.
During playing video, user can select video play mode, at present, video play mode as required
Switching mainly use hide or display view mode, this mode performance is the lowest, and view can not be drawn in time,
It is easily caused the problems such as switch mode is the most smooth.
Fig. 1 shows the video play mode switching side utilizing parasitic tool kit to realize according to an embodiment of the invention
The flow chart of method.As it is shown in figure 1, the method comprises the following steps:
Step S100, according to the behavior of the video playback that user triggers, creates the first suspended window and arranges the first suspended window
Layout parameter, be embedded in video player at the first suspended window.
The embodiment of the present invention is realizing video playback by the way of creating outstanding first suspended window (Floatwindow).The
One suspended window is the floating frame that there are the terminal screen the superiors, and the first suspended window is not affiliated with Activity interface, is not subject to
The covering impact at Activity interface, but identical with the life cycle of Activity.In the embodiment of the present invention, the first suspended window by
Parasitic tool kit creates.When user wants to watch video in main application, can start by the way of triggering video playback
Play video, after triggering behavior user being detected, according to the behavior of user, create Floatwindow.
The establishment of Floatwindow relates to WindowManager interface, it is achieved class has WindowManagerImpl,
CompatModeWrapper, LocalWindowManager.Specifically, the code of parasitic tool kit starts a Service,
Then in Service, create the first suspended window.When creating the first suspended window, need to define the layout of the first suspended window, wound
Build the first suspended window and the object of layout parameter is set;Arrange the location parameter of the first suspended window and dimensional parameters (comprise width and
height).The location parameter of the first suspended window and dimensional parameters determine the first suspended window and show at end panel with pre-set dimension
The predeterminated position of curtain.
After creating the first suspended window, being embedded in video player at the first suspended window, this video player can be used
In display of video streams.
Step S101, is laid out the first suspended window according to the layout parameter of the first suspended window and represents.
After the layout parameter that the first suspended window is set according to step S100, hang first according to set layout parameter
Floating window is laid out, and represents the first suspended window after layout, and such as, the dimensional parameters arranging the first suspended window is width:
80, height:100 (in units of pixel), be so presented to user is exactly the suspended window of a 100*80.
Step S102, while presenting the user interface of main application in the first suspended window Play Server provide regard
Frequency stream.
Specifically, the video flowing that server provides is transferred to video player, in the first suspended window, plays this video
Stream, thus while presenting the user interface of main application, play video flowing.
Step S103, according to the behavior of the Switch Video play mode that user triggers, revises the layout ginseng of the first suspended window
Number, carries out again layout according to amended layout parameter to the first suspended window and represents.
In embodiments of the present invention, video play mode specifically includes that screen mode toggle, extremely letter pattern and default mode, its
In, screen mode toggle refers to that video pictures takies whole terminal screen, and video pictures will be completely covered the user interface of main application, extremely letter
In pattern, video pictures covers the part minimum of the user interface of main application, and in default mode, video pictures will cover main application
A part for user interface, but in default mode, video pictures is less than video pictures under screen mode toggle, but more than extremely letter pattern
Under video pictures.
In the embodiment of the present invention, video player can show switching push button, can carry out by clicking on switching push button
The switching of video play mode, during for there being various video play mode to be available for user's selection, can be drop-down by selecting
The mode of menu selects concrete video play mode for user.Detect that user selects video play mode in drop-down menu
Operation, selects the triggering behavior as user that operates of video play mode in drop-down menu, certainly, also using the user detected
Can adopt in other ways, this is not especially limited by the present embodiment.
According to the behavior of the Switch Video play mode that user triggers, the layout parameter of the first suspended window is modified,
Such as, it is revised as width:150, height:120, according to amended layout parameter, the first suspended window is carried out layout again,
Be presented to user is exactly the suspended window of a 120*150.
The method provided according to the above embodiment of the present invention, by revising the layout parameter of the first suspended window, according to amendment
After layout parameter the first suspended window is carried out again layout and represents, it is achieved that the switching of video play mode, overcome existing
Have in technology, use and hide or the mode of display view, cause performance the lowest, and view can not be drawn in time, switch mode
The problem such as the most smooth.Further, video can be play by the first suspended window achieve and present user interface same of main application
Time play video, solve user can only be used alone other application or Video Applications, and can not operate other application time with
Time show the defect at interface of Video Applications, overcome in prior art when needs operate other application or Video Applications, all
Needs are switched to apply accordingly, cause unhandy problem, substantially increase the simplicity of user operation, when saving user
Between.
Fig. 2 shows the video play mode switching utilizing parasitic tool kit to realize in accordance with another embodiment of the present invention
The flow chart of method.As in figure 2 it is shown, the method comprises the following steps:
Step S200, according to the behavior of the video playback that user triggers, creates the first suspended window and arranges the first suspended window
Layout parameter, be embedded in video player at the first suspended window.
The embodiment of the present invention is realizing video playback by the way of creating outstanding first suspended window (Floatwindow).The
One suspended window is the floating frame that there are the terminal screen the superiors, and the first suspended window is not affiliated with Activity interface, is not subject to
The covering impact at Activity interface, but identical with the life cycle of Activity.In the embodiment of the present invention, the first suspended window by
Parasitic tool kit creates.When user wants to watch video in main application, can start by the way of triggering video playback
Play video, after triggering behavior user being detected, according to the behavior of user, create Floatwindow.
The establishment of Floatwindow relates to WindowManager interface, it is achieved class has WindowManagerImpl,
CompatModeWrapper, LocalWindowManager.Specifically, the code of parasitic tool kit starts a Service,
Then in Service, create the first suspended window.When creating the first suspended window, need to define the layout of the first suspended window, wound
Build the first suspended window and the object of layout parameter is set;Layout parameter at least includes window size parameter, such as, arranges the first suspension
The location parameter of window and dimensional parameters (comprising width and height).The location parameter of the first suspended window and dimensional parameters determine
First suspended window shows the predeterminated position at terminal screen with pre-set dimension.
After creating the first suspended window, being embedded in video player at the first suspended window, this video player can be used
In display of video streams.Wherein, video player is realized by first window view.In order to make this suspended window show user
The user interface of the Video service started, after creating suspended window, is embedded in first window view at suspended window, and this is first years old
Window view is used for drawing video clip.Here first window view can be by any use that can show that Video service is provided
The view at interface, family, the invention is not limited in this regard.The present embodiment by first window view for entering as a example by surfaceview view
Row explanation.
In android system, surfaceview has independent drawing surface, and it does not shares same with its host window
One drawing surface.Owing to having independent drawing surface, therefore the user interface of surfaceview can be at an independent line
Journey is drawn, and main thread resource will not be taken again.Surfaceview mono-aspect can realize complexity and efficient UI
Draw, be on the other hand not result in that again user inputs and can not get timely responding to.Therefore, surfaceview is used to regard as window
Figure is embedded in suspended window, it is possible to achieve complicated and efficient drafting.
In order to overcome the first window view caused owing to first window view can not refresh in time thoroughly to be arrived end panel
The defect of curtain, is embedded in the second window view at suspended window, arranges the relative position of the second window view and first window view
Relation, sets the second window view and is positioned under first window view, be i.e. positioned under video player, and the second window regards
Figure is nontransparent background view such that it is able to solve the problem that first window view is arrived terminal screen thoroughly.
Step S201, is laid out the first suspended window according to the layout parameter of the first suspended window and represents.
After the layout parameter that the first suspended window is set according to step S200, hang first according to set layout parameter
Floating window is laid out, and represents the first suspended window after layout, and such as, the dimensional parameters arranging the first suspended window is width:
80, height:100, be so presented to user is exactly the suspended window of a 100*80.
Step S202, while presenting the user interface of main application in the first suspended window Play Server provide regard
Frequency stream.
Specifically, after the video flowing that server provides is transferred to first window view, parasitic tool kit controls the
One window view, in video clip corresponding to its drafting chart iso-surface patch video flowing, shows video in the video clip drawn
Stream, it is achieved that play video flowing while presenting the user interface of main application in suspended window.
Step S203, according to the behavior of the Switch Video play mode that user triggers, searches the video playback mould after switching
The layout parameter that formula is corresponding.
In embodiments of the present invention, video play mode specifically includes that screen mode toggle, extremely letter pattern and default mode, its
In, screen mode toggle refers to that video pictures takies whole terminal screen, and video pictures will be completely covered the user interface of main application, extremely letter
In pattern, video pictures covers the part minimum of the user interface of main application, and in default mode, video pictures will cover main application
A part for user interface, but in default mode, video pictures is less than video pictures under screen mode toggle, but more than extremely letter pattern
Under video pictures.
In the embodiment of the present invention, video player can show switching push button, can carry out by clicking on switching push button
The switching of video play mode, during for there being various video play mode to be available for user's selection, can be drop-down by selecting
The mode of menu selects concrete video play mode for user.Detect that user selects video play mode in drop-down menu
Operation, selects the triggering behavior as user that operates of video play mode in drop-down menu, certainly, also using the user detected
Can adopt in other ways, this is not especially limited by the present embodiment.
According to the behavior of the Switch Video play mode that user triggers, in default layout parameter storehouse, after searching switching
Layout parameter corresponding to video play mode, after this layout parameter contains switching, the window size parameter of the first suspended window
Deng, the width of window and height, and the location parameter of the first suspended window, location parameter determines the first suspended window at terminal screen
Position.
Step S204, revises the layout ginseng of the first suspended window according to the layout parameter that the video play mode after switching is corresponding
Number.
Step S205, carries out again layout according to amended layout parameter to the first suspended window and represents.
After the layout parameter that video play mode after finding switching according to step S203 is corresponding, according to this parameter,
The layout parameter of the first suspended window is modified, makes the first suspended window represent with amended window size parameter, if
When revising the layout parameter of the first suspended window, have modified the location parameter of the first suspended window, after the modification, make suspended window to repair
The size that window size parameter after changing is corresponding shows in the position that the location parameter of terminal screen is corresponding.Such as revise suspended window
Window height (height) or window width (width), make suspended window reduce, as being reduced into original 1/3rd, thus
It is that main application reserves bigger display space.
In the present embodiment, when video play mode is switched to extremely letter pattern, it is possible not only to show that video can also be chatted
It etc., as a example by chat, under extremely letter pattern, by creating two suspended windows, one is used for playing video, and one for chatting
My god.
Wherein, the first play mode can be screen mode toggle or default mode, and the second play mode is extremely simple pattern.
In a possible implementation of the present embodiment, if video play mode is switched to by the first play mode
Two play mode, method also includes: creates the second suspended window for representing User Interface, arranges the cloth of the second suspended window
Office's parameter;Second suspended window is laid out according to the layout parameter of the second suspended window and represents.
Specifically, if video play mode is switched to extremely letter pattern by screen mode toggle or default mode, due to extremely simple pattern
Need to use two suspended windows just can complete user mutual, accordingly, it would be desirable to establishment is hanged for represent User Interface second
Floating window, defines the layout of the second suspended window, creates the second suspended window and arrange the object of layout parameter;The position of the second suspended window is set
Put parameter and dimensional parameters (comprising width and height).Location parameter and the dimensional parameters of the second suspended window determine second
Suspended window shows the predeterminated position at terminal screen with pre-set dimension.After the layout parameter arranging the second suspended window, according to institute
Second suspended window is laid out by the layout parameter arranged, and represents the second suspended window after layout, such as, arranges the second suspension
The dimensional parameters of window is width:50, height:20, and be so presented to user is exactly the suspended window of a 20*50.
In a possible implementation of the present embodiment, if video play mode is switched to by the second play mode
One play mode, method also includes: revise the layout parameter of the second suspended window so that the second suspended window by layout to terminal screen
Outside.
Specifically, if video play mode is switched, due to screen mode toggle to screen mode toggle or default mode by extremely letter pattern
Or the first suspended window is used for playing video under default mode, so there is no need to create two suspended windows, prior art uses
Be to hide the second suspended window, display screen mode toggle or the mode of the first suspension window of default mode, it is achieved video playback mould
The switching of formula, this mode performance is the lowest, and the view of correspondence can not be drawn in time, is easily caused that switch mode is the most smooth etc. asks
Topic, the such issues that of in order to overcome, by revising the layout parameter of the second suspended window so that the second suspended window by layout to end panel
Outside Mu, the location parameter such as revising the second suspended window is negative value.
The method provided according to the above embodiment of the present invention, by revising the layout parameter of the first suspended window, according to amendment
After layout parameter the first suspended window is carried out again layout and represents, it is achieved that the switching of video play mode, overcome existing
Have in technology, use and hide or the mode of display view, cause performance the lowest, and view can not be drawn in time, switch mode
The problem such as the most smooth.Further, video can be play by the first suspended window achieve and present user interface same of main application
Time play video, solve user can only be used alone other application or Video Applications, and can not operate other application time with
Time show the defect at interface of Video Applications, overcome in prior art when needs operate other application or Video Applications, all
Needs are switched to apply accordingly, cause unhandy problem, substantially increase the simplicity of user operation, when saving user
Between.
Fig. 3 shows the video play mode switching dress utilizing parasitic tool kit to realize according to an embodiment of the invention
The structured flowchart put.As it is shown on figure 3, this device includes: creation module 300, embed module 310, layout represent module 320, in
Existing module 330 and modified module 340.
Creation module 300, the behavior of the video playback for triggering according to user, create the first suspended window and arrange first
The layout parameter of suspended window.
The embodiment of the present invention is realizing video playback by the way of creating outstanding first suspended window (Floatwindow).The
One suspended window is the floating frame that there are the terminal screen the superiors, and the first suspended window is not affiliated with Activity interface, is not subject to
The covering impact at Activity interface, but identical with the life cycle of Activity.In the embodiment of the present invention, the first suspended window by
Parasitic tool kit creates.When user wants to watch video in main application, can start by the way of triggering video playback
Play video, after triggering behavior user being detected, according to the behavior of user, create Floatwindow.
The establishment of Floatwindow relates to WindowManager interface, it is achieved class has WindowManagerImpl,
CompatModeWrapper, LocalWindowManager.Specifically, the code of parasitic tool kit starts a Service,
Then in Service, create the first suspended window.When creating the first suspended window, need to define the layout of the first suspended window, wound
Build the first suspended window and the object of layout parameter is set;Layout parameter at least includes window size parameter, such as, arranges the first suspension
The location parameter of window and dimensional parameters (comprising width and height).The location parameter of the first suspended window and dimensional parameters determine
First suspended window shows the predeterminated position at terminal screen with pre-set dimension.
Embed module 310, be suitable to be embedded in video player at the first suspended window.
After creating the first suspended window, being embedded in video player at the first suspended window, this video player can be used
In display of video streams.Wherein, video player is realized by first window view.In order to make this suspended window show user
The user interface of the Video service started, after creating suspended window, is embedded in first window view at suspended window, and this is first years old
Window view is used for drawing video clip.Here first window view can be by any use that can show that Video service is provided
The view at interface, family, the invention is not limited in this regard.The present embodiment by first window view for entering as a example by surfaceview view
Row explanation.
In android system, surfaceview has independent drawing surface, and it does not shares same with its host window
One drawing surface.Owing to having independent drawing surface, therefore the user interface of surfaceview can be at an independent line
Journey is drawn, and main thread resource will not be taken again.Surfaceview mono-aspect can realize complexity and efficient UI
Draw, be on the other hand not result in that again user inputs and can not get timely responding to.Therefore, surfaceview is used to regard as window
Figure is embedded in suspended window, it is possible to achieve complicated and efficient drafting.
In order to overcome the first window view caused owing to first window view can not refresh in time thoroughly to be arrived end panel
The defect of curtain, is embedded in the second window view at suspended window, arranges the relative position of the second window view and first window view
Relation, sets the second window view and is positioned under first window view, be i.e. positioned under video player, and the second window regards
Figure is nontransparent background view such that it is able to solve the problem that first window view is arrived terminal screen thoroughly.
Layout represents module 320, is suitable to according to the layout parameter of the first suspended window, the first suspended window is laid out and opened up
Existing.
After the layout parameter that the first suspended window is set, according to set layout parameter, the first suspended window is carried out cloth
Office, and represent the first suspended window after layout, such as, the dimensional parameters arranging the first suspended window is width:80, height:
100 (in units of pixels), be so presented to user is exactly the suspended window of a 100*80.
Present module 330, be suitable to while presenting the user interface of main application Play Server in the first suspended window
The video flowing provided.
Specifically, after the video flowing that server provides is transferred to first window view, parasitic tool kit controls the
One window view, in video clip corresponding to its drafting chart iso-surface patch video flowing, shows video in the video clip drawn
Stream, it is achieved that play video flowing while presenting the user interface of main application in suspended window.
Modified module 340, the behavior of the Switch Video play mode for triggering according to user, revise the first suspended window
Layout parameter.
Layout represents module 320 and is further adapted for: according to amended layout parameter, the first suspended window is carried out cloth again
Office and represent.
In embodiments of the present invention, video play mode specifically includes that screen mode toggle, extremely letter pattern and default mode, its
In, screen mode toggle refers to that video pictures takies whole terminal screen, and video pictures will be completely covered the user interface of main application, extremely letter
In pattern, video pictures covers the part minimum of the user interface of main application, and in default mode, video pictures will cover main application
A part for user interface, but in default mode, video pictures is less than video pictures under screen mode toggle, but more than extremely letter pattern
Under video pictures.
Generally, video player can show switching push button, video can be carried out by clicking on switching push button
The switching of play mode, during for there being various video play mode to be available for user's selection, can be by selecting drop-down menu
Mode select concrete video play mode for user.Detect that user selects the behaviour of video play mode in drop-down menu
Make, the user detected selects the operation of video play mode in drop-down menu, as the triggering behavior of user, certainly, also may be used
To adopt in other ways, this is not especially limited by the present embodiment.
Further, modified module 340 farther includes: search unit 341 and amendment unit 342.
Search unit 341, be suitable to the behavior of the Switch Video play mode triggered according to user, search the video after switching
The layout parameter that play mode is corresponding.
According to the behavior of the Switch Video play mode that user triggers, in default layout parameter storehouse, after searching switching
Layout parameter corresponding to video play mode, after this layout parameter contains switching, the window size parameter of the first suspended window
Deng, the width of window and height, and the location parameter of the first suspended window, location parameter determines the first suspended window at terminal screen
Position.
Amendment unit 342, is suitable to the layout parameter according to the video play mode after switching is corresponding and revises the first suspended window
Layout parameter.
Layout represents module 320 and is further adapted for: enter the first suspended window according to the amendment amended layout parameter of unit
Row layout and representing again.
In the present embodiment, when video play mode is switched to extremely letter pattern, it is possible not only to show that video can also be chatted
It etc., as a example by chat, under extremely letter pattern, create two suspended windows by needs, one is used for playing video, and one is used for
Chat.
Wherein, the first play mode can be screen mode toggle or default mode, and the second play mode is extremely simple pattern.
Further, if video play mode is switched to the second play mode by the first play mode, creation module 300 is entered
One step is suitable to: creates the second suspended window for representing User Interface, arranges the layout parameter of the second suspended window;
Layout represents module 320 and is further adapted for: according to the layout parameter of the second suspended window, the second suspended window is carried out cloth
Office and represent.
Specifically, if video play mode is switched to extremely letter pattern by screen mode toggle or default mode, due to extremely simple pattern
Need to use two suspended windows just can complete user mutual, accordingly, it would be desirable to establishment is hanged for represent User Interface second
Floating window, defines the layout of the second suspended window, creates the second suspended window and arrange the object of layout parameter;The position of the second suspended window is set
Put parameter and dimensional parameters (comprising width and height).Location parameter and the dimensional parameters of the second suspended window determine second
Suspended window shows the predeterminated position at terminal screen with pre-set dimension.After the layout parameter arranging the second suspended window, according to institute
Second suspended window is laid out by the layout parameter arranged, and represents the second suspended window after layout, such as, arranges the second suspension
The dimensional parameters of window is width:50, height:20, and be so presented to user is exactly the suspended window of a 20*50.
Further, if video play mode is switched to the first play mode by the second play mode, modified module 340 enters
One step is suitable to: revise the layout parameter of the second suspended window so that the second suspended window is by outside layout to terminal screen.
Specifically, if video play mode is switched, due to screen mode toggle to screen mode toggle or default mode by extremely letter pattern
Or the first suspended window is used for playing video under default mode, so there is no need to create two suspended windows, prior art uses
Be to hide the second suspended window, display screen mode toggle or the mode of the first suspension window of default mode, it is achieved video playback mould
The switching of formula, this mode performance is the lowest, and the view of correspondence can not be drawn in time, is easily caused that switch mode is the most smooth etc. asks
Topic, the such issues that of in order to overcome, by revising the layout parameter of the second suspended window so that the second suspended window by layout to end panel
Outside Mu, the location parameter such as revising the second suspended window is negative value.
The device provided according to the above embodiment of the present invention, by revising the layout parameter of the first suspended window, according to amendment
After layout parameter the first suspended window is carried out again layout and represents, it is achieved that the switching of video play mode, overcome existing
Have in technology, use and hide or the mode of display view, cause performance the lowest, and view can not be drawn in time, switch mode
The problem such as the most smooth.Further, video can be play by the first suspended window achieve and present user interface same of main application
Time play video, solve user can only be used alone other application or Video Applications, and can not operate other application time with
Time show the defect at interface of Video Applications, overcome in prior art when needs operate other application or Video Applications, all
Needs are switched to apply accordingly, cause unhandy problem, substantially increase the simplicity of user operation, when saving user
Between.
Algorithm and display are not intrinsic to any certain computer, virtual system or miscellaneous equipment relevant provided herein.
Various general-purpose systems can also be used together with based on teaching in this.As described above, construct required by this kind of system
Structure be apparent from.Additionally, the present invention is also not for any certain programmed language.It is understood that, it is possible to use various
Programming language realizes the content of invention described herein, and the description done language-specific above is to disclose this
Bright preferred forms.
In description mentioned herein, illustrate a large amount of detail.It is to be appreciated, however, that the enforcement of the present invention
Example can be put into practice in the case of not having these details.In some instances, it is not shown specifically known method, structure
And technology, in order to do not obscure the understanding of this description.
Similarly, it will be appreciated that one or more in order to simplify that the disclosure helping understands in each inventive aspect, exist
Above in the description of the exemplary embodiment of the present invention, each feature of the present invention is grouped together into single enforcement sometimes
In example, figure or descriptions thereof.But, the method for the disclosure should not be construed to reflect an intention that i.e. required guarantor
The application claims feature more more than the feature being expressly recited in each claim protected.More precisely, as following
Claims reflected as, inventive aspect is all features less than single embodiment disclosed above.Therefore,
The claims following detailed description of the invention are thus expressly incorporated in this detailed description of the invention, the most each claim itself
All as the independent embodiment of the present invention.
Those skilled in the art are appreciated that and can carry out the module in the equipment in embodiment adaptively
Change and they are arranged in one or more equipment different from this embodiment.Can be the module in embodiment or list
Unit or assembly are combined into a module or unit or assembly, and can put them in addition multiple submodule or subelement or
Sub-component.In addition at least some in such feature and/or process or unit excludes each other, can use any
Combine all features disclosed in this specification (including adjoint claim, summary and accompanying drawing) and so disclosed appoint
Where method or all processes of equipment or unit are combined.Unless expressly stated otherwise, this specification (includes adjoint power
Profit requires, summary and accompanying drawing) disclosed in each feature can be carried out generation by providing identical, equivalent or the alternative features of similar purpose
Replace.
Although additionally, it will be appreciated by those of skill in the art that embodiments more described herein include other embodiments
Some feature included by rather than further feature, but the combination of the feature of different embodiment means to be in the present invention's
Within the scope of and form different embodiments.Such as, in the following claims, embodiment required for protection appoint
One of meaning can mode use in any combination.
The all parts embodiment of the present invention can realize with hardware, or to run on one or more processor
Software module realize, or with combinations thereof realize.It will be understood by those of skill in the art that and can use in practice
Microprocessor or digital signal processor (DSP) realize regarding of the parasitic tool kit realization of utilization according to embodiments of the present invention
The some or all functions of the some or all parts in the equipment of play mode switching frequently.The present invention is also implemented as using
In part or all the equipment or device program (such as, computer program and the meter that perform method as described herein
Calculation machine program product).The program of such present invention of realization can store on a computer-readable medium, or can have one
Individual or the form of multiple signal.Such signal can be downloaded from internet website and obtain, or carries on carrier signal
Confession, or provide with any other form.
The present invention will be described rather than limits the invention to it should be noted above-described embodiment, and ability
Field technique personnel can design alternative embodiment without departing from the scope of the appended claims.In the claims,
Any reference marks that should not will be located between bracket is configured to limitations on claims.Word " comprises " and does not excludes the presence of not
Arrange element in the claims or step.Word "a" or "an" before being positioned at element does not excludes the presence of multiple such
Element.The present invention and can come real by means of including the hardware of some different elements by means of properly programmed computer
Existing.If in the unit claim listing equipment for drying, several in these devices can be by same hardware branch
Specifically embody.Word first, second and third use do not indicate that any order.These word explanations can be run after fame
Claim.
The invention discloses: A1, a kind of video play mode changing method utilizing parasitic tool kit to realize, wherein parasitic
Tool kit is bound in advance with main application, plays video and Switch Video broadcasting to provide in the user interface of described main application
The function of pattern, described method includes:
According to the behavior of the video playback that user triggers, create the first suspended window and the layout of described first suspended window is set
Parameter, is embedded in video player at the first suspended window;
According to the layout parameter of described first suspended window the first suspended window it is laid out and represents;
While presenting the user interface of described main application in described first suspended window Play Server provide regard
Frequency stream;
According to the behavior of the Switch Video play mode that user triggers, revise the layout parameter of described first suspended window, root
According to amended layout parameter, described first suspended window is carried out again layout and represents.
A2, according to the method described in A1, the behavior of the described Switch Video play mode triggered according to user, amendment is described
The layout parameter of the first suspended window, according to amended layout parameter described first suspended window carried out again layout and represent into
One step includes:
According to the behavior of the Switch Video play mode that user triggers, search the cloth that the video play mode after switching is corresponding
Office's parameter;
The layout ginseng of described first suspended window is revised according to the layout parameter that the video play mode after described switching is corresponding
Number;
According to amended layout parameter, described first suspended window is carried out again layout and represents.
A3, according to the method described in A1 or A2, described layout parameter at least includes window size parameter.
A4, according to the method described in any one of A1-A3, wherein, if video play mode is switched to by the first play mode
Second play mode, described method also includes:
Create the second suspended window for representing User Interface, the layout parameter of described second suspended window is set;
According to the layout parameter of described second suspended window, described second suspended window is laid out and represents.
A5, according to the method described in A4, wherein, if video play mode is switched to the first broadcasting mould by the second play mode
Formula, described method also includes:
Revise the layout parameter of described second suspended window so that described second suspended window is by outside layout to terminal screen.
A6, according to the method described in any one of A1-A5, wherein, described video play mode includes: screen mode toggle, extremely letter
Pattern and default mode.
The invention also discloses: B7, a kind of video play mode switching device utilizing parasitic tool kit to realize, wherein post
Raw tool kit is bound in advance with main application, to provide broadcasting video and Switch Video in the user interface of described main application to broadcast
The function of mode playback, described device includes:
Creation module, for the behavior of video playback triggered according to user, creates the first suspended window and arranges described the
The layout parameter of one suspended window;
Embed module, be suitable to be embedded in video player at the first suspended window;
Layout represents module, is suitable to according to the layout parameter of described first suspended window, the first suspended window is laid out and opened up
Existing;
Present module, be suitable to play in described first suspended window clothes while presenting the user interface of described main application
The video flowing that business device provides;
Modified module, the behavior of the Switch Video play mode for triggering according to user, revise described first suspended window
Layout parameter;
Described layout represents module and is further adapted for: carry out described first suspended window heavily according to amended layout parameter
New layout and representing.
B8, according to the device described in B7, described modified module farther includes:
Search unit, be suitable to the behavior of the Switch Video play mode triggered according to user, search the video after switching and broadcast
The layout parameter that mode playback is corresponding;
Amendment unit, layout parameter amendment described first corresponding to video play mode after being suitable to according to described switching is hanged
The layout parameter of floating window;
Described layout represents module and is further adapted for: according to the described amended layout parameter of amendment unit to described first
Suspended window carries out again layout and represents.
B9, according to the device described in B7 or B8, described layout parameter at least includes window size parameter.
B10, according to the device described in any one of B7-B9, wherein, if video play mode is switched to by the first play mode
Second play mode, described creation module is further adapted for: creates the second suspended window for representing User Interface, arranges
The layout parameter of described second suspended window;
Described layout represents module and is further adapted for: suspend to described second according to the layout parameter of described second suspended window
Window is laid out and represents.
B11, according to the device described in B10, wherein, if video play mode is switched to the first broadcasting by the second play mode
Pattern, described modified module is further adapted for: revise the layout parameter of described second suspended window so that described second suspended window quilt
Layout is to outside terminal screen.
B12, according to the device described in any one of B7-B11, wherein, described video play mode includes: screen mode toggle, pole
Letter pattern and default mode.