CN106131686B - The video play mode switching method and device realized using parasitic kit - Google Patents

The video play mode switching method and device realized using parasitic kit Download PDF

Info

Publication number
CN106131686B
CN106131686B CN201610483838.XA CN201610483838A CN106131686B CN 106131686 B CN106131686 B CN 106131686B CN 201610483838 A CN201610483838 A CN 201610483838A CN 106131686 B CN106131686 B CN 106131686B
Authority
CN
China
Prior art keywords
suspended window
video
play mode
window
mode
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201610483838.XA
Other languages
Chinese (zh)
Other versions
CN106131686A (en
Inventor
王智源
李勇
郭宇卓
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Hongxiang Technical Service Co Ltd
Original Assignee
Beijing Qihoo Technology Co Ltd
Qizhi Software Beijing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Qihoo Technology Co Ltd, Qizhi Software Beijing Co Ltd filed Critical Beijing Qihoo Technology Co Ltd
Priority to CN201610483838.XA priority Critical patent/CN106131686B/en
Publication of CN106131686A publication Critical patent/CN106131686A/en
Priority to PCT/CN2017/090013 priority patent/WO2018001202A1/en
Application granted granted Critical
Publication of CN106131686B publication Critical patent/CN106131686B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/431Generation of visual interfaces for content selection or interaction; Content or additional data rendering
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/47End-user applications
    • H04N21/472End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content

Abstract

The invention discloses a kind of video play mode switching methods and device realized using parasitic kit.Wherein parasitic kit and main application binding in advance, to provide the function of playing video and Switch Video play mode in the user interface of main application, this method comprises: according to the behavior of the video playing of user's triggering, it creates the first suspended window and the layout parameter of the first suspended window is set, be embedded in video player in the first suspended window;Layout parameter according to the first suspended window is laid out and shows to the first suspended window;The video flowing that Play Server provides in the first suspended window while the user interface of main application is presented;According to the behavior of the Switch Video play mode of user's triggering, modify the layout parameter of the first suspended window, the first suspended window is laid out and is showed again according to modified layout parameter, overcome in the prior art, by the way of hiding or display view, lead to the problems such as performance is very low, and switch mode is not smooth, improves performance.

Description

The video play mode switching method and device realized using parasitic kit
Technical field
The present invention relates to intelligent terminal technical fields, and in particular to a kind of video playing mould realized using parasitic kit Formula switching method and device.
Background technique
As the screen of intelligent terminal is increasing, CPU (Central Processing Unit, central processing unit), interior Deposit, the hardware capabilities such as GPU (Graphics Processing Unit, graphics processor) it is stronger and stronger, user is to application Demand is also higher and higher, such as user wishes that video can be watched while operating other application.Currently, if terminal is being transported Operation Video Applications are wanted while one application of row, terminal is the relevant operation pause for needing to apply current operation, or The application interface for closing current operation application, then can just be switched to the application interface of another application.For example, when user plays trip When play, need to watch video, user, which needs to suspend or exit the game played, could watch video;Alternatively, by setting The display size for setting the interface of Video Applications and other application, could show Video Applications and other application simultaneously, and user needs It toggles between the application interface of each application, makes troubles to the operation of user, and can not achieve and showing other Video is played while the user interface of application.In addition, in prior art, what the switching of video play mode mainly used It is the mode for hiding or showing view, this mode performance is very low, and view cannot be drawn in time, be easy to cause switch mode The problems such as not smooth.
Summary of the invention
In view of the above problems, it proposes on the present invention overcomes the above problem or at least be partially solved in order to provide one kind It states the video play mode switching method for utilizing parasitic kit to realize of problem and parasitic kit is utilized to realize accordingly Video play mode switching device.
According to an aspect of the invention, there is provided a kind of video play mode switching side realized using parasitic kit Method, wherein parasitic kit and main application binding in advance, play video and switching to provide in the user interface of main application The function of video play mode, method include:
According to the behavior of the video playing of user's triggering, creates the first suspended window and the layout ginseng of the first suspended window is set Number, is embedded in video player in the first suspended window;
Layout parameter according to the first suspended window is laid out and shows to the first suspended window;
The video flowing that Play Server provides in the first suspended window while the user interface of main application is presented;
According to the behavior of the Switch Video play mode of user's triggering, the layout parameter of the first suspended window is modified, according to repairing Layout parameter after changing is laid out and is showed again to the first suspended window.
According to another aspect of the present invention, a kind of video play mode switching dress realized using parasitic kit is provided It sets, wherein parasitic kit and main application binding in advance, play video and switching to provide in the user interface of main application The function of video play mode, device include:
Creation module, the behavior of the video playing for being triggered according to user create the first suspended window and are arranged first and hang The layout parameter of floating window;
It is embedded in module, suitable for being embedded in video player in the first suspended window;
It is laid out display module, the first suspended window is laid out and is showed suitable for the layout parameter according to the first suspended window;
Module is presented, suitable for Play Server provides in the first suspended window while the user interface of main application is presented Video flowing;
The cloth of the first suspended window is modified in modified module, the behavior of the Switch Video play mode for being triggered according to user Office's parameter;
Layout display module be further adapted for: the first suspended window is laid out again according to modified layout parameter and Show.
The scheme provided according to the present invention is joined by modifying the layout parameter of the first suspended window according to modified layout It is several that first suspended window is laid out and is showed again, the switching of video play mode is realized, overcomes in the prior art, adopts With hiding or the mode of display view, cause performance very low, and view cannot be drawn in time, switch mode is not smooth etc. asks Topic, improves performance.Further, video can be played by the first suspended window realizes the same of the user interface that main application is presented When play video, other application or Video Applications can only be used alone by solving user, and cannot be same when operating other application When show Video Applications interface defect, overcome in the prior art when needing to operate other application or Video Applications, all It needs to be switched to corresponding application, leads to inconvenient problem, substantially increase the simplicity of user's operation, when saving user Between.
The above description is only an overview of the technical scheme of the present invention, in order to better understand the technical means of the present invention, And it can be implemented in accordance with the contents of the specification, and in order to allow above and other objects of the present invention, feature and advantage can It is clearer and more comprehensible, the followings are specific embodiments of the present invention.
Detailed description of the invention
By reading the following detailed description of the preferred embodiment, various other advantages and benefits are common for this field Technical staff will become clear.The drawings are only for the purpose of illustrating a preferred embodiment, and is not considered as to the present invention Limitation.And throughout the drawings, the same reference numbers will be used to refer to the same parts.In the accompanying drawings:
Fig. 1 shows the video play mode switching side according to an embodiment of the invention realized using parasitic kit The flow chart of method;
Fig. 2 shows the video play mode switchings in accordance with another embodiment of the present invention realized using parasitic kit The flow chart of method;
Fig. 3 shows the video play mode switching dress according to an embodiment of the invention realized using parasitic kit The structural block diagram set.
Specific embodiment
Exemplary embodiments of the present disclosure are described in more detail below with reference to accompanying drawings.Although showing the disclosure in attached drawing Exemplary embodiment, it being understood, however, that may be realized in various forms the disclosure without should be by embodiments set forth here It is limited.On the contrary, these embodiments are provided to facilitate a more thoroughly understanding of the present invention, and can be by the scope of the present disclosure It is fully disclosed to those skilled in the art.
The present inventor is had found during using some applications (for example, game application), is answered using these With when, can not display application user interface while also play video, that is, user cannot using these application While can also watch video, user needs in addition to open Video Applications, however, Video Applications and other application can not be simultaneously It shows, is also required in PC terminal big by the display at the interface of setting Video Applications and other application on mobile terminal screen It is small, Video Applications and other application could be shown simultaneously, if user wants to operate Video Applications or other application, needed Cursor is navigated into corresponding application, easily cause in this way it is inconvenient for use, to solve the above-mentioned problems, inventor by wound The labour for the property made is proposed using parasitic kit, by parasitic kit and main application binding in advance, to provide in main application The solution of the function of video is played in user interface.
Wherein, main application is an independent application, which can independently realize corresponding function, is not need to rely on and appoints What other application, for example, game application, user, can be in user provided by game application after starting game application Game is played on interface.
And the parasitism kit need to rely on it is main application corresponding function just may be implemented, need main application that this is called to post The api interface of raw kit is just able to achieve the corresponding function of parasitic kit, for example, by for game application plays video, Video can be played simultaneously when user plays game, is applied based on game application here, and playing video is parasitic kit The function of being realized.
During playing video, user can according to need selection video play mode, currently, video play mode Switching mainly using hide or display view mode, this mode performance is very low, and view cannot be drawn in time, The problems such as being easy to cause switch mode not smooth.
Fig. 1 shows the video play mode switching side according to an embodiment of the invention realized using parasitic kit The flow chart of method.As shown in Figure 1, method includes the following steps:
Step S100 creates the first suspended window and the first suspended window is arranged according to the behavior of the video playing of user's triggering Layout parameter, be embedded in video player in the first suspended window.
The embodiment of the present invention is realizing video playing by way of creating outstanding first suspended window (Floatwindow).The One suspended window is there are the floating frame of terminal screen top layer, and the first suspended window is not affiliated with the interface Activity, also not by The covering at the interface Activity influences, but identical as the life cycle of Activity.In the embodiment of the present invention, the first suspended window by Parasitic kit creation.When user wants to watch video in main application, can be started by way of triggering video playing Video is played, after detecting the triggering behavior of user, according to the behavior of user, creates Floatwindow.
The creation of Floatwindow is related to WindowManager interface, realizes that class has WindowManagerImpl, CompatModeWrapper, LocalWindowManager.Specifically, the code of parasitic kit starts a Service, Then the first suspended window is created in Service.It when creating the first suspended window, needs to define the layout of the first suspended window, creates Build the object of the first suspended window setting layout parameter;Be arranged the first suspended window location parameter and dimensional parameters (comprising width and height).The location parameter and dimensional parameters of first suspended window determine that the first suspended window is shown in end panel with pre-set dimension The predeterminated position of curtain.
After creating the first suspended window, it is embedded in video player in the first suspended window, which can use In display of video streams.
Step S101, the layout parameter according to the first suspended window are laid out and show to the first suspended window.
It is outstanding to first according to set layout parameter after according to step S100, the layout parameter of the first suspended window is set Floating window is laid out, and shows the first suspended window after layout, for example, the dimensional parameters of the first suspended window of setting are width: 80, height:100 (as unit of pixel), be presented to user in this way is exactly the suspended window of a 100*80.
Step S102, the view that Play Server provides in the first suspended window while the user interface of main application is presented Frequency flows.
Specifically, video flowing server provided is transferred to video player, and the video is played in the first suspended window Stream, to play video flowing while the user interface of main application is presented.
Step S103, according to the behavior of the Switch Video play mode of user's triggering, the layout ginseng of the first suspended window of modification Number, is laid out and is showed again to the first suspended window according to modified layout parameter.
In embodiments of the present invention, video play mode specifically includes that screen mode toggle, extremely simple mode and default mode, In, screen mode toggle refers to that video pictures occupy entire terminal screen, and the user interface of main application will be completely covered in video pictures, extremely simple Video pictures cover the part minimum of the user interface of main application in mode, and video pictures will cover main application in default mode A part of user interface, however video pictures are less than video pictures under screen mode toggle in default mode, but are greater than extremely simple mode Under video pictures.
In the embodiment of the present invention, switching push button can be shown on video player, can be carried out by clicking switching push button The switching of video play mode can pull down the case where there are many video play modes for user's selection by selection The mode of menu selects specific video play mode for user.Detect that user selects video play mode in drop-down menu Operation, the user that will test select triggering behavior of the operation of video play mode in drop-down menu as user, certainly, also Other modes can be used, the present embodiment is not especially limited this.
According to the behavior of the Switch Video play mode of user's triggering, modify to the layout parameter of the first suspended window, For example, being revised as width:150, height:120, the first suspended window is laid out again according to modified layout parameter, Be presented to user is exactly the suspended window of a 120*150.
The method provided according to that above embodiment of the present invention, by modifying the layout parameter of the first suspended window, according to modification Layout parameter afterwards is laid out and is showed again to the first suspended window, and the switching of video play mode is realized, and is overcome existing Have in technology, by the way of hiding or showing view, causes performance very low, and view cannot be drawn in time, switch mode The problems such as not smooth.Further, video can be played by the first suspended window realizes the same of the user interface that main application is presented When play video, other application or Video Applications can only be used alone by solving user, and cannot be same when operating other application When show Video Applications interface defect, overcome in the prior art when needing to operate other application or Video Applications, all It needs to be switched to corresponding application, leads to inconvenient problem, substantially increase the simplicity of user's operation, when saving user Between.
Fig. 2 shows the video play mode switchings in accordance with another embodiment of the present invention realized using parasitic kit The flow chart of method.As shown in Fig. 2, method includes the following steps:
Step S200 creates the first suspended window and the first suspended window is arranged according to the behavior of the video playing of user's triggering Layout parameter, be embedded in video player in the first suspended window.
The embodiment of the present invention is realizing video playing by way of creating outstanding first suspended window (Floatwindow).The One suspended window is there are the floating frame of terminal screen top layer, and the first suspended window is not affiliated with the interface Activity, also not by The covering at the interface Activity influences, but identical as the life cycle of Activity.In the embodiment of the present invention, the first suspended window by Parasitic kit creation.When user wants to watch video in main application, can be started by way of triggering video playing Video is played, after detecting the triggering behavior of user, according to the behavior of user, creates Floatwindow.
The creation of Floatwindow is related to WindowManager interface, realizes that class has WindowManagerImpl, CompatModeWrapper, LocalWindowManager.Specifically, the code of parasitic kit starts a Service, Then the first suspended window is created in Service.It when creating the first suspended window, needs to define the layout of the first suspended window, creates Build the object of the first suspended window setting layout parameter;Layout parameter includes at least window size parameter, for example, setting first suspends The location parameter and dimensional parameters (including width and height) of window.The location parameter and dimensional parameters of first suspended window determine First suspended window is shown in pre-set dimension the predeterminated position of terminal screen.
After creating the first suspended window, it is embedded in video player in the first suspended window, which can use In display of video streams.Wherein, video player is realized by first window view.In order to make the suspended window show user The user interface of the Video service started is embedded in first window view in suspended window, this first after creating suspended window Window view is for drawing video clip.Here first window view can be used provided by Video service for any can show The view at family interface, the invention is not limited in this regard.The present embodiment by first window view be surfaceview view for into Row explanation.
In android system, surfaceview has independent drawing surface, it is not shared same with its host window One drawing surface.Since the user interface with independent drawing surface, surfaceview can be in an independent line It is drawn in journey, and main thread resource will not be occupied again.On the one hand complicated and efficient UI may be implemented in surfaceview It draws, on the other hand not will lead to user's input again cannot timely respond to.Therefore, surfaceview is used to regard as window Figure is embedded into suspended window, and complicated and efficient drafting may be implemented.
In order to overcome cannot refresh in time due to first window view caused by first window view arrived end panel thoroughly The defect of curtain is embedded in the second window view in suspended window, the relative position of the second window view and first window view is arranged Relationship, the second window view of setting is located under first window view, that is, is located under video player, and the second window regards Figure is nontransparent background view, so as to solve the problems, such as that first window view is arrived terminal screen thoroughly.
Step S201, the layout parameter according to the first suspended window are laid out and show to the first suspended window.
It is outstanding to first according to set layout parameter after according to step S200, the layout parameter of the first suspended window is set Floating window is laid out, and shows the first suspended window after layout, for example, the dimensional parameters of the first suspended window of setting are width: 80, height:100, be presented to user in this way is exactly the suspended window of a 100*80.
Step S202, the view that Play Server provides in the first suspended window while the user interface of main application is presented Frequency flows.
Specifically, after the video flowing for providing server is transferred to first window view, parasitic kit control the One window view shows video in the video clip drawn in its corresponding video clip of drawing surface rendering video flowing Stream realizes and plays video flowing in suspended window while the user interface of main application is presented.
Step S203, the video playing mould according to the behavior of the Switch Video play mode of user's triggering, after searching switching The corresponding layout parameter of formula.
In embodiments of the present invention, video play mode specifically includes that screen mode toggle, extremely simple mode and default mode, In, screen mode toggle refers to that video pictures occupy entire terminal screen, and the user interface of main application will be completely covered in video pictures, extremely simple Video pictures cover the part minimum of the user interface of main application in mode, and video pictures will cover main application in default mode A part of user interface, however video pictures are less than video pictures under screen mode toggle in default mode, but are greater than extremely simple mode Under video pictures.
In the embodiment of the present invention, switching push button can be shown on video player, can be carried out by clicking switching push button The switching of video play mode can pull down the case where there are many video play modes for user's selection by selection The mode of menu selects specific video play mode for user.Detect that user selects video play mode in drop-down menu Operation, the user that will test select triggering behavior of the operation of video play mode in drop-down menu as user, certainly, also Other modes can be used, the present embodiment is not especially limited this.
According to the behavior of the Switch Video play mode of user's triggering, in preset layout parameter library, after searching switching The corresponding layout parameter of video play mode, after which contains switching, the window size parameter of the first suspended window Deng the width and height of window and the location parameter of the first suspended window, location parameter determine the first suspended window in terminal screen Position.
Step S204 modifies the layout ginseng of the first suspended window according to the corresponding layout parameter of video play mode after switching Number.
Step S205 is laid out and is showed again to the first suspended window according to modified layout parameter.
After finding the corresponding layout parameter of video play mode after switching according to step S203, according to the parameter, It modifies to the layout parameter of the first suspended window, shows the first suspended window with modified window size parameter, if When modifying the layout parameter of the first suspended window, the location parameter of the first suspended window is had modified, after the modification, makes suspended window to repair The corresponding size of window size parameter after changing is shown in the corresponding position of location parameter of terminal screen.Such as modification suspended window Window height (height) or window width (width), reduce suspended window, be such as reduced into original one third, thus Based on using reserving bigger display space.
In the present embodiment, when video play mode is switched to extremely simple mode, it can not only show that video can also be chatted It etc., by taking chat as an example, under extremely simple mode, by creating two suspended windows, one is used to play video, and one for chatting It.
Wherein, the first play mode can be screen mode toggle or default mode, and the second play mode is extremely simple mode.
In a possible implementation of the present embodiment, if video play mode is switched to by the first play mode Two play mode, method further include: create the second suspended window for showing user interface, the cloth of the second suspended window is set Office's parameter;Layout parameter according to the second suspended window is laid out and shows to the second suspended window.
Specifically, if video play mode is switched to extremely simple mode by screen mode toggle or default mode, due to extremely simple mode Need to complete user's interaction using two suspended windows, it is second outstanding for showing user interface therefore, it is necessary to create Floating window defines the layout of the second suspended window, the object of creation the second suspended window setting layout parameter;The position of second suspended window is set Set parameter and dimensional parameters (comprising width and height).The location parameter and dimensional parameters of second suspended window determine second Suspended window is shown in the predeterminated position of terminal screen with pre-set dimension.After the layout parameter that the second suspended window is arranged, according to institute The layout parameter of setting is laid out the second suspended window, and shows the second suspended window after layout, for example, setting second suspends The dimensional parameters of window are width:50, height:20, and be presented to user in this way 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 further include: the layout parameter of the second suspended window of modification, so that the second suspended window arrives terminal screen by layout Except.
Specifically, if video play mode is switched by extremely simple mode to screen mode toggle or default mode, due to screen mode toggle Or the first suspended window, so there is no need to create two suspended windows, uses in the prior art for playing video under default mode Be to hide the second suspended window, show the mode of the first suspension windows of screen mode toggle or default mode, realize video playing mould The switching of formula, this mode performance is very low, and corresponding view cannot be drawn in time, is easy to cause switch mode not smooth etc. and asks Topic, such issues that in order to overcome, by modifying the layout parameter of the second suspended window, so that the second suspended window arrives end panel by layout Except curtain, such as modifying the location parameter of the second suspended window is negative value.
The method provided according to that above embodiment of the present invention, by modifying the layout parameter of the first suspended window, according to modification Layout parameter afterwards is laid out and is showed again to the first suspended window, and the switching of video play mode is realized, and is overcome existing Have in technology, by the way of hiding or showing view, causes performance very low, and view cannot be drawn in time, switch mode The problems such as not smooth.Further, video can be played by the first suspended window realizes the same of the user interface that main application is presented When play video, other application or Video Applications can only be used alone by solving user, and cannot be same when operating other application When show Video Applications interface defect, overcome in the prior art when needing to operate other application or Video Applications, all It needs to be switched to corresponding application, leads to inconvenient problem, substantially increase the simplicity of user's operation, when saving user Between.
Fig. 3 shows the video play mode switching dress according to an embodiment of the invention realized using parasitic kit The structural block diagram set.As shown in figure 3, the device includes: creation module 300, insertion module 310, layout display module 320, is in Existing module 330 and modified module 340.
Creation module 300, the behavior of the video playing for being triggered according to user create the first suspended window and are arranged first The layout parameter of suspended window.
The embodiment of the present invention is realizing video playing by way of creating outstanding first suspended window (Floatwindow).The One suspended window is there are the floating frame of terminal screen top layer, and the first suspended window is not affiliated with the interface Activity, also not by The covering at the interface Activity influences, but identical as the life cycle of Activity.In the embodiment of the present invention, the first suspended window by Parasitic kit creation.When user wants to watch video in main application, can be started by way of triggering video playing Video is played, after detecting the triggering behavior of user, according to the behavior of user, creates Floatwindow.
The creation of Floatwindow is related to WindowManager interface, realizes that class has WindowManagerImpl, CompatModeWrapper, LocalWindowManager.Specifically, the code of parasitic kit starts a Service, Then the first suspended window is created in Service.It when creating the first suspended window, needs to define the layout of the first suspended window, creates Build the object of the first suspended window setting layout parameter;Layout parameter includes at least window size parameter, for example, setting first suspends The location parameter and dimensional parameters (including width and height) of window.The location parameter and dimensional parameters of first suspended window determine First suspended window is shown in pre-set dimension the predeterminated position of terminal screen.
It is embedded in module 310, suitable for being embedded in video player in the first suspended window.
After creating the first suspended window, it is embedded in video player in the first suspended window, which can use In display of video streams.Wherein, video player is realized by first window view.In order to make the suspended window show user The user interface of the Video service started is embedded in first window view in suspended window, this first after creating suspended window Window view is for drawing video clip.Here first window view can be used provided by Video service for any can show The view at family interface, the invention is not limited in this regard.The present embodiment by first window view be surfaceview view for into Row explanation.
In android system, surfaceview has independent drawing surface, it is not shared same with its host window One drawing surface.Since the user interface with independent drawing surface, surfaceview can be in an independent line It is drawn in journey, and main thread resource will not be occupied again.On the one hand complicated and efficient UI may be implemented in surfaceview It draws, on the other hand not will lead to user's input again cannot timely respond to.Therefore, surfaceview is used to regard as window Figure is embedded into suspended window, and complicated and efficient drafting may be implemented.
In order to overcome cannot refresh in time due to first window view caused by first window view arrived end panel thoroughly The defect of curtain is embedded in the second window view in suspended window, the relative position of the second window view and first window view is arranged Relationship, the second window view of setting is located under first window view, that is, is located under video player, and the second window regards Figure is nontransparent background view, so as to solve the problems, such as that first window view is arrived terminal screen thoroughly.
It is laid out display module 320, the first suspended window is laid out and is opened up suitable for the layout parameter according to the first suspended window It is existing.
After the layout parameter that the first suspended window is set, cloth is carried out to the first suspended window according to set layout parameter Office, and show the first suspended window after layout, for example, the dimensional parameters of the first suspended window of setting are width:80, height: 100 (as unit of pixels), be presented to user in this way is exactly the suspended window of a 100*80.
Module 330 is presented, suitable for while the user interface of main application is presented in the first suspended window Play Server The video flowing of offer.
Specifically, after the video flowing for providing server is transferred to first window view, parasitic kit control the One window view shows video in the video clip drawn in its corresponding video clip of drawing surface rendering video flowing Stream realizes and plays video flowing in suspended window while the user interface of main application is presented.
Modified module 340, the behavior of the Switch Video play mode for being triggered according to user, the first suspended window of modification Layout parameter.
Layout display module 320 is further adapted for: carrying out cloth again to the first suspended window according to modified layout parameter Office and show.
In embodiments of the present invention, video play mode specifically includes that screen mode toggle, extremely simple mode and default mode, In, screen mode toggle refers to that video pictures occupy entire terminal screen, and the user interface of main application will be completely covered in video pictures, extremely simple Video pictures cover the part minimum of the user interface of main application in mode, and video pictures will cover main application in default mode A part of user interface, however video pictures are less than video pictures under screen mode toggle in default mode, but are greater than extremely simple mode Under video pictures.
Under normal circumstances, switching push button can be shown on video player, can carry out video by clicking switching push button The switching of play mode can be by selecting drop-down menu for the case where there are many video play modes for user's selection Mode select specific video play mode for user.Detect that user selects the behaviour of video play mode in drop-down menu Make, the user that will test selects the operation of video play mode in drop-down menu may be used also certainly as the triggering behavior of user To use other modes, the present embodiment is not especially limited this.
Further, modified module 340 further comprises: searching unit 341 and modification unit 342.
Searching unit 341, the video suitable for the behavior of the Switch Video play mode triggered according to user, after searching switching The corresponding layout parameter of play mode.
According to the behavior of the Switch Video play mode of user's triggering, in preset layout parameter library, after searching switching The corresponding layout parameter of video play mode, after which contains switching, the window size parameter of the first suspended window Deng the width and height of window and the location parameter of the first suspended window, location parameter determine the first suspended window in terminal screen Position.
Unit 342 is modified, suitable for modifying the first suspended window according to the corresponding layout parameter of video play mode after switching Layout parameter.
Layout display module 320 be further adapted for: according to modification the modified layout parameter of unit to the first suspended window into Row is laid out and shows again.
In the present embodiment, when video play mode is switched to extremely simple mode, it can not only show that video can also be chatted It etc., by taking chat as an example, under extremely simple mode, by needing to create two suspended windows, one is used to play 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 mode.
Further, if video play mode is switched to the second play mode by the first play mode, creation module 300 into One step is suitable for: creating the second suspended window for showing user interface, the layout parameter of the second suspended window is arranged;
Layout display module 320 is further adapted for: the layout parameter according to the second suspended window carries out cloth to the second suspended window Office and show.
Specifically, if video play mode is switched to extremely simple mode by screen mode toggle or default mode, due to extremely simple mode Need to complete user's interaction using two suspended windows, it is second outstanding for showing user interface therefore, it is necessary to create Floating window defines the layout of the second suspended window, the object of creation the second suspended window setting layout parameter;The position of second suspended window is set Set parameter and dimensional parameters (comprising width and height).The location parameter and dimensional parameters of second suspended window determine second Suspended window is shown in the predeterminated position of terminal screen with pre-set dimension.After the layout parameter that the second suspended window is arranged, according to institute The layout parameter of setting is laid out the second suspended window, and shows the second suspended window after layout, for example, setting second suspends The dimensional parameters of window are width:50, height:20, and be presented to user in this way 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 into One step is suitable for: the layout parameter of the second suspended window of modification, so that the second suspended window is laid out to except terminal screen.
Specifically, if video play mode is switched by extremely simple mode to screen mode toggle or default mode, due to screen mode toggle Or the first suspended window, so there is no need to create two suspended windows, uses in the prior art for playing video under default mode Be to hide the second suspended window, show the mode of the first suspension windows of screen mode toggle or default mode, realize video playing mould The switching of formula, this mode performance is very low, and corresponding view cannot be drawn in time, is easy to cause switch mode not smooth etc. and asks Topic, such issues that in order to overcome, by modifying the layout parameter of the second suspended window, so that the second suspended window arrives end panel by layout Except curtain, such as modifying the location parameter of the second suspended window is negative value.
The device provided according to that above embodiment of the present invention, by modifying the layout parameter of the first suspended window, according to modification Layout parameter afterwards is laid out and is showed again to the first suspended window, and the switching of video play mode is realized, and is overcome existing Have in technology, by the way of hiding or showing view, causes performance very low, and view cannot be drawn in time, switch mode The problems such as not smooth.Further, video can be played by the first suspended window realizes the same of the user interface that main application is presented When play video, other application or Video Applications can only be used alone by solving user, and cannot be same when operating other application When show Video Applications interface defect, overcome in the prior art when needing to operate other application or Video Applications, all It needs to be switched to corresponding application, leads to inconvenient problem, substantially increase the simplicity of user's operation, when saving user Between.
Algorithm and display are not inherently related to any particular computer, virtual system, or other device provided herein. Various general-purpose systems can also be used together with teachings based herein.As described above, it constructs required by this kind of system Structure be obvious.In addition, the present invention is also not directed to any particular programming language.It should be understood that can use various Programming language realizes summary of the invention described herein, and the description done above to language-specific is to disclose this hair Bright preferred forms.
In the instructions provided here, numerous specific details are set forth.It is to be appreciated, however, that implementation of the invention Example can be practiced without these specific details.In some instances, well known method, structure is not been shown in detail And technology, so as not to obscure the understanding of this specification.
Similarly, it should be understood that in order to simplify the disclosure and help to understand one or more of the various inventive aspects, Above in the description of exemplary embodiment of the present invention, each feature of the invention is grouped together into single implementation sometimes In example, figure or descriptions thereof.However, the disclosed method should not be interpreted as reflecting the following intention: i.e. required to protect Shield the present invention claims features more more than feature expressly recited in each claim.More precisely, as following Claims reflect as, inventive aspect is all features less than single embodiment disclosed above.Therefore, Thus the claims for following specific embodiment are expressly incorporated in the specific embodiment, wherein each claim itself All as a separate embodiment of the present invention.
Those skilled in the art will understand that can be carried out adaptively to the module in the equipment in embodiment Change and they are arranged in one or more devices different from this embodiment.It can be the module or list in embodiment Member or component are combined into a module or unit or component, and furthermore they can be divided into multiple submodule or subelement or Sub-component.Other than such feature and/or at least some of process or unit exclude each other, it can use any Combination is to all features disclosed in this specification (including adjoint claim, abstract and attached drawing) and so disclosed All process or units of what method or apparatus are combined.Unless expressly stated otherwise, this specification is (including adjoint power Benefit require, abstract and attached drawing) disclosed in each feature can carry out generation with an alternative feature that provides the same, equivalent, or similar purpose It replaces.
In addition, it will be appreciated by those of skill in the art that although some embodiments described herein include other embodiments In included certain features rather than other feature, but the combination of the feature of different embodiments mean it is of the invention Within the scope of and form different embodiments.For example, in the following claims, embodiment claimed is appointed Meaning one of can in any combination mode come using.
Various component embodiments of the invention can be implemented in hardware, or to run on one or more processors Software module realize, or be implemented in a combination thereof.It will be understood by those of skill in the art that can be used in practice Microprocessor or digital signal processor (DSP) realize the view according to an embodiment of the present invention realized using parasitic kit The some or all functions of some or all components in frequency play mode switching equipment.The present invention is also implemented as using In executing some or all device or device programs of method as described herein (for example, computer program and meter Calculation machine program product).It is such to realize that program of the invention can store on a computer-readable medium, or can have one The form of a or multiple signals.Such signal can be downloaded from an internet website to obtain, or mention on the carrier signal For, or be provided in any other form.
It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and ability Field technique personnel can be designed alternative embodiment without departing from the scope of the appended claims.In the claims, Any reference symbol between parentheses should not be configured to limitations on claims.Word "comprising" does not exclude the presence of not Element or step listed in the claims.Word "a" or "an" located in front of the element does not exclude the presence of multiple such Element.The present invention can be by means of including the hardware of several different elements and being come by means of properly programmed computer real It is existing.In the unit claims listing several devices, several in these devices can be through the same hardware branch To embody.The use of word first, second, and third does not indicate any sequence.These words can be explained and be run after fame Claim.

Claims (12)

1. a kind of video play mode switching method realized using parasitic kit, wherein parasitic kit and main application are preparatory Binding, to provide the function of playing video and Switch Video play mode in the user interface of the main application, the side Method includes:
According to the behavior of the video playing of user's triggering, creates the first suspended window and the layout ginseng of first suspended window is set Number, is embedded in the surfaceview with independent drawing surface in the first suspended window, is realized by the surfaceview Video player, first suspended window are created by parasitic kit;
Layout parameter according to first suspended window is laid out and shows to the first suspended window;
The video flowing that Play Server provides in first suspended window while user interface of the main application is presented;
According to the behavior of the Switch Video play mode of user's triggering, the layout parameter of first suspended window is modified, according to repairing Layout parameter after changing is laid out and is showed again to first suspended window.
2. according to the method described in claim 1, the behavior of the Switch Video play mode according to user's triggering, modifies institute The layout parameter for stating the first suspended window is laid out and is showed again to first suspended window according to modified layout parameter Further comprise:
The corresponding layout ginseng of video play mode according to the behavior of the Switch Video play mode of user's triggering, after searching switching Number;
The layout parameter of first suspended window is modified according to the corresponding layout parameter of video play mode after the switching;
First suspended window is laid out and is showed again according to modified layout parameter.
3. method according to claim 1 or 2, the layout parameter includes at least window size parameter.
4. according to the method described in claim 1, wherein, if video play mode is switched to the second broadcasting by the first play mode Mode, the method also includes:
The second suspended window for showing user interface is created, the layout parameter of second suspended window is set;
Layout parameter according to second suspended window is laid out and shows to second suspended window.
5. according to the method described in claim 4, wherein, if video play mode is switched to the first broadcasting by the second play mode Mode, the method also includes:
The layout parameter of second suspended window is modified, so that second suspended window is laid out to except terminal screen.
6. method according to claim 1 or 4 or 5, wherein the video play mode includes: screen mode toggle, extremely simple mould Formula and default mode.
7. a kind of video play mode switching device realized using parasitic kit, wherein parasitic kit and main application are preparatory Binding, to provide the function of playing video and Switch Video play mode in the user interface of the main application, the dress It sets and includes:
Creation module, the behavior of the video playing for being triggered according to user create the first suspended window and are arranged described first and hang The layout parameter of floating window, first suspended window are created by parasitic kit;
It is embedded in module, suitable for being embedded in the surfaceview with independent drawing surface in the first suspended window, by described Surfaceview realizes video player;
It is laid out display module, suitable for the first suspended window is laid out and is showed according to the layout parameter of first suspended window;
Module is presented, suitable for while the user interface of the main application is presented in first suspended window Play Server The video flowing of offer;
The cloth of first suspended window is modified in modified module, the behavior of the Switch Video play mode for being triggered according to user Office's parameter;
The layout display module is further adapted for: carrying out cloth again to first suspended window according to modified layout parameter Office and show.
8. device according to claim 7, the modified module further comprises:
Searching unit, the video playing mould suitable for the behavior of the Switch Video play mode triggered according to user, after searching switching The corresponding layout parameter of formula;
Unit is modified, suitable for modifying first suspended window according to the corresponding layout parameter of video play mode after the switching Layout parameter;
The layout display module is further adapted for: being suspended according to the modified layout parameter of the modification unit to described first Window is laid out and is showed again.
9. device according to claim 7 or 8, the layout parameter includes at least window size parameter.
10. device according to claim 7, wherein broadcast if video play mode is switched to second by the first play mode Mode playback, the creation module are further adapted for: being created the second suspended window for showing user interface, be arranged described the The layout parameter of two suspended windows;
It is described layout display module be further adapted for: according to second suspended window layout parameter to second suspended window into Row is laid out and shows.
11. device according to claim 10, wherein broadcast if video play mode is switched to first by the second play mode Mode playback, the modified module are further adapted for: the layout parameter of modification second suspended window, so that second suspended window It is laid out to except terminal screen.
12. according to device described in claim 7 or 10 or 11, wherein the video play mode includes: screen mode toggle, pole Simple mode and default mode.
CN201610483838.XA 2016-06-27 2016-06-27 The video play mode switching method and device realized using parasitic kit Active CN106131686B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201610483838.XA CN106131686B (en) 2016-06-27 2016-06-27 The video play mode switching method and device realized using parasitic kit
PCT/CN2017/090013 WO2018001202A1 (en) 2016-06-27 2017-06-26 Video playback mode switching method, device, program and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610483838.XA CN106131686B (en) 2016-06-27 2016-06-27 The video play mode switching method and device realized using parasitic kit

Publications (2)

Publication Number Publication Date
CN106131686A CN106131686A (en) 2016-11-16
CN106131686B true CN106131686B (en) 2019-06-25

Family

ID=57267417

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610483838.XA Active CN106131686B (en) 2016-06-27 2016-06-27 The video play mode switching method and device realized using parasitic kit

Country Status (2)

Country Link
CN (1) CN106131686B (en)
WO (1) WO2018001202A1 (en)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106131686B (en) * 2016-06-27 2019-06-25 北京奇虎科技有限公司 The video play mode switching method and device realized using parasitic kit
CN106803978A (en) * 2017-03-16 2017-06-06 上海青橙实业有限公司 Mobile terminal and the method that video is played based on suspension windows
CN107277562B (en) * 2017-05-05 2020-02-11 中广热点云科技有限公司 Method and system for adjusting screen display picture to hide preview scroll bar
CN109151581A (en) * 2018-07-26 2019-01-04 北京奇艺世纪科技有限公司 A kind of data output method and device
CN109445879A (en) * 2018-10-19 2019-03-08 四川长虹电器股份有限公司 Method, storage medium and the equipment of monitor video are shown with suspended window
CN111090362B (en) * 2018-10-23 2021-12-28 鸿合科技股份有限公司 Scene processing method and device and electronic equipment
CN112584195B (en) * 2019-09-29 2023-06-09 中兴通讯股份有限公司 Video playing and processing method and device, cloud set top box, cloud platform and medium
CN112333514B (en) * 2020-07-24 2024-02-06 深圳Tcl新技术有限公司 Display mode switching method and device, intelligent television and computer readable storage medium
DE112021001955T5 (en) 2021-03-01 2023-01-26 Boe Technology Group Co., Ltd. INTERFACE DISPLAY METHOD AND APPARATUS, COMPUTER READABLE STORAGE MEDIUM AND ELECTRONIC DEVICE
CN113126839B (en) * 2021-03-16 2023-06-23 北京达佳互联信息技术有限公司 Object playing method and device, electronic equipment and storage medium
CN114040243B (en) * 2021-11-04 2023-08-04 上海哔哩哔哩科技有限公司 Live broadcasting room video playing method and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102883226A (en) * 2011-07-14 2013-01-16 上海聚力传媒技术有限公司 Method for providing program information on video displaying window and equipment thereof
CN103297855A (en) * 2012-03-02 2013-09-11 腾讯科技(深圳)有限公司 Application display method and terminal
CN103745733A (en) * 2013-12-23 2014-04-23 乐视网信息技术(北京)股份有限公司 Video playing control method and video player
CN104899062A (en) * 2015-05-29 2015-09-09 努比亚技术有限公司 Application booting method and apparatus
CN105187939A (en) * 2015-09-21 2015-12-23 合一网络技术(北京)有限公司 Method and device of playing video in webpage game

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5680323A (en) * 1995-06-23 1997-10-21 Canon Information Systems, Inc. Multimedia player
US20020073123A1 (en) * 2000-12-08 2002-06-13 Wen-Sung Tsai Method for displaying overlapping documents in a computer environment
CN101382867B (en) * 2008-10-28 2010-09-08 深圳市迅雷网络技术有限公司 Video playing interaction method and terminal
US10606564B2 (en) * 2010-12-27 2020-03-31 Microsoft Technology Licensing, Llc Companion window experience
CN103064735A (en) * 2011-10-24 2013-04-24 联想(北京)有限公司 Display process method, display device and electronic equipment
CN103049258A (en) * 2012-12-10 2013-04-17 乐视网信息技术(北京)股份有限公司 Method and system for controlling video playing based on android operating system
CN104571920B (en) * 2015-01-27 2018-07-06 联想(北京)有限公司 Display processing method and display processing unit
CN104951271A (en) * 2015-07-03 2015-09-30 上海与德通讯技术有限公司 Split screen display method and electronic equipment
CN105653133B (en) * 2015-12-30 2019-03-01 语联网(武汉)信息技术有限公司 The extended method and device of application program
CN106131686B (en) * 2016-06-27 2019-06-25 北京奇虎科技有限公司 The video play mode switching method and device realized using parasitic kit

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102883226A (en) * 2011-07-14 2013-01-16 上海聚力传媒技术有限公司 Method for providing program information on video displaying window and equipment thereof
CN103297855A (en) * 2012-03-02 2013-09-11 腾讯科技(深圳)有限公司 Application display method and terminal
CN103745733A (en) * 2013-12-23 2014-04-23 乐视网信息技术(北京)股份有限公司 Video playing control method and video player
CN104899062A (en) * 2015-05-29 2015-09-09 努比亚技术有限公司 Application booting method and apparatus
CN105187939A (en) * 2015-09-21 2015-12-23 合一网络技术(北京)有限公司 Method and device of playing video in webpage game

Also Published As

Publication number Publication date
WO2018001202A1 (en) 2018-01-04
CN106131686A (en) 2016-11-16

Similar Documents

Publication Publication Date Title
CN106131686B (en) The video play mode switching method and device realized using parasitic kit
CN106126236B (en) Multi-screen display method, device and the terminal of terminal screen
CN105915993B (en) The video play mode setting method and device realized using parasitic kit
CN105915933B (en) The video pushing method and device realized using parasitic kit
US9696888B2 (en) Application-launching interface for multiple modes
CN106201241A (en) The multi-screen display method of terminal screen, device and terminal
CN105142031B (en) The method and device of text information is shown with barrage in video playing
CN105979339B (en) Window display method and client
JP2018010684A (en) Arranging tiles
US9285945B2 (en) Method and apparatus for displaying multi-task interface
CN103902165A (en) Method and device for implementing background of menu
CN106201167A (en) The multi-screen display method of terminal screen, device and terminal
EP3944067A1 (en) Multi-display system, electronic device, and content output method
CN105635790B (en) Video display method and device
JP2014505927A (en) Customizing the immersive environment
KR20140014101A (en) User interface, apparatus and method for gesture recognition
CN109922360A (en) Method for processing video frequency, device and storage medium
CN103582863A (en) Multi-application environment
CN106168869B (en) Desktop view processing method, device and terminal based on suspended window
CN108984137A (en) Double-screen display method and its system, computer readable storage medium
CN104284236A (en) Method and device for controlling and playing multi-video resources on terminal
CN110147512A (en) Player preloading, operation method, device, equipment and medium
US20210349586A1 (en) Single representation of a group of applications on a user interface
JP2007518167A (en) How to generate an on-screen menu
US20200310603A1 (en) Context-based user interface menu with selectable actions

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20220729

Address after: 300450 No. 9-3-401, No. 39, Gaoxin 6th Road, Binhai Science Park, Binhai New Area, Tianjin

Patentee after: 3600 Technology Group Co.,Ltd.

Address before: 100088 room 112, block D, 28 new street, new street, Xicheng District, Beijing (Desheng Park)

Patentee before: BEIJING QIHOO TECHNOLOGY Co.,Ltd.

Patentee before: Qizhi software (Beijing) Co.,Ltd.

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20230627

Address after: 1765, floor 17, floor 15, building 3, No. 10 Jiuxianqiao Road, Chaoyang District, Beijing 100015

Patentee after: Beijing Hongxiang Technical Service Co.,Ltd.

Address before: 300450 No. 9-3-401, No. 39, Gaoxin 6th Road, Binhai Science Park, Binhai New Area, Tianjin

Patentee before: 3600 Technology Group Co.,Ltd.