WO2018001246A1 - Video play mode setting method, device, program and medium - Google Patents

Video play mode setting method, device, program and medium Download PDF

Info

Publication number
WO2018001246A1
WO2018001246A1 PCT/CN2017/090365 CN2017090365W WO2018001246A1 WO 2018001246 A1 WO2018001246 A1 WO 2018001246A1 CN 2017090365 W CN2017090365 W CN 2017090365W WO 2018001246 A1 WO2018001246 A1 WO 2018001246A1
Authority
WO
WIPO (PCT)
Prior art keywords
floating window
window
video
user
floating
Prior art date
Application number
PCT/CN2017/090365
Other languages
French (fr)
Chinese (zh)
Inventor
王智源
樊维
郭宇卓
杨中意
Original Assignee
北京奇虎科技有限公司
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 北京奇虎科技有限公司 filed Critical 北京奇虎科技有限公司
Publication of WO2018001246A1 publication Critical patent/WO2018001246A1/en

Links

Images

Classifications

    • 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/41Structure of client; Structure of client peripherals
    • H04N21/426Internal components of the client ; Characteristics thereof
    • H04N21/42653Internal components of the client ; Characteristics thereof for processing graphics
    • 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/41Structure of client; Structure of client peripherals
    • H04N21/426Internal components of the client ; Characteristics thereof
    • 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/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
    • H04N21/4312Generation of visual interfaces for content selection or interaction; Content or additional data rendering involving specific graphical features, e.g. screen layout, special fonts or colors, blinking icons, highlights or animations
    • 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/485End-user interface for client configuration
    • 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/485End-user interface for client configuration
    • H04N21/4858End-user interface for client configuration for modifying screen layout parameters, e.g. fonts, size of the windows

Definitions

  • the present invention relates to the field of intelligent terminal technologies, and in particular, to a video playback mode setting method implemented by using a parasitic toolkit, a video playback mode setting device implemented by using a parasitic toolkit, a computer program, and a computer readable medium.
  • the user needs to switch back and forth between the application interfaces of the respective applications, which brings inconvenience to the user's operation, and cannot play the video while displaying the user interface of other applications.
  • the user cannot flexibly set the video play mode, and can only switch in the existing video play mode, and cannot provide interactive services to the user, which cannot meet the needs of the user.
  • the present invention has been made in order to provide a video play mode setting method and a corresponding video play mode setting apparatus and computer implemented by using a parasitic toolkit that overcome the above problems or at least partially solve the above problems.
  • Program and computer readable medium Program and computer readable medium.
  • a video play mode setting method implemented using a parasitic toolkit wherein a parasitic toolkit is pre-bound with a main application to provide a user in a main application
  • the function of playing video and setting the video playback mode in the interface including:
  • the video stream provided by the video server is played in the first floating window while the user interface of the main application is presented, and the user interaction interface is presented in the second floating window.
  • a video play mode setting apparatus implemented using a parasitic toolkit, wherein a parasitic toolkit is pre-bound with a main application to provide a video and a set video in a main application's user interface.
  • the function of the play mode, the device includes:
  • a creating module configured to create a first floating window and a second floating window according to a setting behavior of a video playing mode triggered by the user, and set layout parameters of the first floating window and the second floating window;
  • An embedded module adapted to embed a video player in the first floating window
  • the layout display module is adapted to layout and display the first floating window and the second floating window according to the layout parameters of the first floating window and the second floating window;
  • the presentation module is adapted to play the video stream provided by the video server in the first floating window while presenting the user interface of the main application, and present the user interaction interface in the second floating window.
  • a computer program comprising computer readable code, when the readable code is run on a computing device, causes the computing device to perform any of the embodiments of the present invention
  • the video playback mode setting method implemented by the parasitic toolkit is described.
  • the embodiment of the invention further provides a computer readable medium, wherein the program according to the embodiment of the invention is stored.
  • the first floating window and the second floating window are set, the layout parameters of the first floating window and the second floating window are set, and the first floating window and the second floating window are set according to the set layout parameters.
  • Layout and presentation the setting of the video play mode is realized, and the video can be played while presenting the user interface of the main application, and the interactive service is provided to the user, which solves the problem that the user can only use other applications or video applications alone, but cannot Display video at the same time when working with other apps
  • the interface of the application and the defects of performing other interactions overcome the problem that the prior art needs to switch to the corresponding application when it needs to operate other applications or video applications, resulting in inconvenient operation, and greatly improving the convenience of the user operation. , saving user time.
  • FIG. 1 shows a flow chart of a video play mode setting method implemented using a parasitic toolkit according to an embodiment of the present invention
  • FIG. 2 is a flow chart showing a video play mode setting method implemented by using a parasitic toolkit according to another embodiment of the present invention
  • FIG. 3 is a block diagram showing the structure of a video play mode setting apparatus implemented by using a parasitic toolkit according to an embodiment of the present invention
  • FIG. 4 shows a block diagram of a computing device for performing a video play mode setting method implemented using a parasitic toolkit in accordance with the present invention
  • FIG. 5 illustrates a storage unit for holding or carrying program code that implements a video play mode setting method implemented using a parasitic toolkit in accordance with the present invention.
  • the inventors of the present invention have found in the process of using some applications (for example, game applications) that when using these applications, the video cannot be played while displaying the user interface of the application, that is, the user cannot use the applications. At the same time, the video can be viewed. The user needs to open the video application separately. However, the video application and other applications cannot be displayed on the screen of the mobile terminal at the same time. In the PC terminal, the display size of the interface of the video application and other applications needs to be set simultaneously. Display video applications and other applications. If the user wants to operate the video application or other applications, the cursor needs to be positioned to the corresponding application, which is easy to cause inconvenience. In order to solve the above problems, the inventor has creatively worked out The parasitic toolkit is used to pre-bind the parasitic toolkit with the main application to provide a solution for playing video in the main application's user interface.
  • some applications for example, game applications
  • the main application is a stand-alone application, and the application can independently implement the corresponding functions without relying on any other application, for example, a game application, and the user interface provided by the game application after the user launches the game application. Play on the game.
  • the parasitic toolkit needs to rely on the main application to implement the corresponding function, and the main application needs to call the API interface of the parasitic toolkit to implement the corresponding function of the parasitic toolkit, for example, to play the video in the game application as an example, in the user.
  • the game application is the main application
  • the playback video is a function realized by the parasitic toolkit.
  • the user may need to perform other operations, such as communicating the game being played in real time with other users, or commenting on the played video.
  • the current video playback mode does not implement the corresponding function.
  • FIG. 1 shows a flow chart of a video play mode setting method implemented using a parasitic toolkit in accordance with one embodiment of the present invention. As shown in Figure 1, the method includes the following steps:
  • Step S100 Create a first floating window and a second floating window according to a setting behavior of the video playing mode triggered by the user, and set layout parameters of the first floating window and the second floating window, and embed the video in the first floating window. player.
  • the button for setting the video play mode may be triggered, and after detecting that the user triggers the button for setting the video play mode, the Floatwindow is created according to the behavior of the user.
  • the creation of Floatwindow involves the WindowManager interface.
  • the implementation classes are WindowManagerImpl, CompatModeWrapper, and LocalWindowManager. Specifically, the code of the parasitic toolkit starts a Service, and then creates a first floating window in the Service and The second floating window.
  • the position and size parameters of the two floating windows determine that the first and second floating windows are displayed in a preset size on the preset position of the terminal screen.
  • the floating window is a floating window on the terminal screen.
  • the floating window is not affiliated with the Activity interface, and is not affected by the coverage of the Activity interface, but is the same as the life cycle of the Activity.
  • the first floating window and the second floating window are created by a parasitic toolkit. After detecting the user's trigger behavior, create a Floatwindow based on the user's behavior. The size of the created first and second floating windows is smaller than the size of the user interface of the main application.
  • the embodiment of the present invention embeds a video player in the first floating window, and the video player can be used to display a video stream.
  • Step S101 Layout and display the first floating window and the second floating window according to the layout parameters of the first floating window and the second floating window.
  • the first floating window and the second floating window are laid out according to the set layout parameters, and the first floating window and the second after the layout are presented.
  • the floating window for example, sets the size parameter of the first floating window to width: 80, height: 100 (in pixels), and sets the size parameter of the second floating window to width: 80, height: 20, which is presented to the user. It is a 100*80 first floating window and a 20*80 second floating window.
  • Step S102 playing the video stream provided by the video server in the first floating window while presenting the user interface of the main application, and presenting the user interaction interface in the second floating window.
  • the corresponding video stream is obtained from the server, and the video stream provided by the server is transmitted to the video player, and the video stream is played in the first floating window, thereby Playing the video stream while presenting the user interface of the main application, and presenting the user interaction interface in the second floating window, allowing the user to interact with other users through the second floating window while presenting the user interface of the main application, or performing other operating.
  • the method provided by the above embodiment of the present invention by setting a first floating window and a second floating window, setting layout parameters of the first floating window and the second floating window, and according to the set layout parameters, the first floating window and the first
  • the two floating windows are arranged and displayed to realize the setting of the video playing mode, and It is enough to play the video while presenting the user interface of the main application, and provide interactive services to the user, which solves the problem that the user can only use other applications or video applications separately, but can not simultaneously display the interface of the video application while operating other applications, and other
  • the shortcoming of the interaction overcomes the problem that the prior art needs to switch to the corresponding application when it needs to operate other applications or video applications, resulting in inconvenient operation, greatly improving the convenience of the user operation and saving user time.
  • FIG. 2 shows a flow chart of a video play mode setting method implemented using a parasitic toolkit according to another embodiment of the present invention. As shown in FIG. 2, the method includes the following steps:
  • Step S200 Create a first floating window and a second floating window having a control panel according to a setting behavior of the video playing mode triggered by the user, and set layout parameters of the first floating window and the second floating window.
  • the button for setting the video play mode may be triggered, and after detecting that the user triggers the button for setting the video play mode, the Floatwindow is created according to the behavior of the user.
  • the creation of Floatwindow involves the WindowManager interface.
  • the implementation classes are WindowManagerImpl, CompatModeWrapper, and LocalWindowManager.
  • the code of the parasitic toolkit starts a Service, and then creates a first floating window and a second floating window with a control panel in the Service.
  • the first floating window may be a video playback floating window
  • the second floating window may be a chat floating window, that is, the provided video stream may be played in the first floating window, and the user chat content may be presented in the second floating window.
  • the floating window is a floating window on the terminal screen.
  • the floating window is not affiliated with the Activity interface, and is not affected by the coverage of the Activity interface, but is the same as the life cycle of the Activity.
  • the first floating window and the second floating window are created by a parasitic toolkit. After detecting the user's trigger behavior, create a Floatwindow based on the user's behavior. The size of the created first and second floating windows is smaller than the size of the user interface of the main application.
  • the user can determine whether the second floating window needs to be displayed according to the requirement, whether the user interaction interface is presented in the second floating window, and the user interaction interface is not required to be presented in the second floating window. Close by triggering the control panel on the first floating window The second floating window.
  • Step S201 embedding a window view in the first floating window to create a drawing surface of the window view.
  • the video player is implemented through a window view.
  • a window view is embedded in the first floating window, the window view being used to draw the video interface.
  • the window view here can be any view capable of displaying the user interface provided by the video service, which is not limited by the present invention.
  • This embodiment uses a window view as a surface view as an example for description.
  • the surfaceview has a separate drawing surface that does not share the same drawing surface with its host window.
  • the surfaceview user interface can be drawn in a separate thread without taking up the main thread resources.
  • surfaceview can achieve complex and efficient UI rendering, on the other hand, it does not cause user input to be unable to respond in time. Therefore, using surfaceview as a window view embedded in the first floating window enables complex and efficient drawing.
  • Step S202 Layout and display the first floating window and the second floating window according to the layout parameters of the first floating window and the second floating window.
  • the first floating window and the second floating window are laid out according to the set layout parameters, and the first floating window and the second after the layout are presented.
  • the floating window for example, sets the size parameter of the first floating window to width: 80, height: 100 (in pixels), and sets the size parameter of the second floating window to width: 80, height: 20, which is presented to the user. It is a 100*80 first floating window and a 20*80 second floating window.
  • Step S203 the control window view draws a video interface corresponding to the video stream on the drawing surface, plays the video stream provided by the video server in the first floating window, and presents the user interaction in the second floating window while presenting the user interface of the main application. interface.
  • the parasitic toolkit controls the window view to draw a video interface corresponding to the video stream on the drawing surface thereof, and displays the video stream in the drawn video interface, thereby realizing Presenting the user interface of the main application while playing the video stream in the first floating window, and presenting the user interaction interface in the second floating window, enabling the user to pass the second floating window and other users while presenting the user interface of the main application Interact or do other things.
  • Step S204 monitoring whether the user triggers to close the second floating window on the first floating window, and if yes, executing step S205; if not, proceeding without processing, continuing to play the video stream in the first floating window, and in the second floating A user interface is presented within the window.
  • the second floating window is closed, and the corresponding interactive service is stopped. If the triggering behavior of the user is not monitored, the second floating window is retained, and the user interaction interface is presented in the second floating window, so that the user can pass the second floating according to the requirement.
  • the window interacts with other users or performs other operations.
  • Step S205 closing the second floating window.
  • the second floating window is closed when it is detected that the user triggers the closing of the second floating window on the first floating window.
  • the method further includes: modifying a window position parameter of the first floating window and the second floating window according to a behavior of the first floating window and the second floating window triggered by the user, according to The modified window position parameter lays out and displays the first floating window and the second floating window.
  • the floating window created by the above steps occupies a part of the display area of the terminal screen for displaying the user interface of the video service initiated by the user.
  • the window position parameter and/or the window size parameter of the floating window may be modified, for example, the window position parameter and the window size of the floating window are simultaneously modified.
  • the floating window is displayed in the corresponding position of the position parameter of the terminal screen with the size corresponding to the modified window size parameter. For example, modify the window height or window width of the floating window to reduce the floating window, such as reducing it to the original one-third, thus leaving a larger display space for the main application.
  • the method provided by the above embodiment of the present invention by setting a first floating window and a second floating window, setting layout parameters of the first floating window and the second floating window, and according to the set layout parameters, the first floating window and the first
  • the second floating window is arranged and displayed, realizes the setting of the video playing mode, and can play the video while presenting the user interface of the main application, and provides an interactive service to the user, which solves the problem that the user can only use other applications or video applications separately. Can't be used while working with other apps
  • the defect of displaying the interface of the video application and performing other interaction operations overcomes the problem that the prior art needs to switch to the corresponding application when it needs to operate other applications or video applications, resulting in inconvenient operation and greatly improving the operation of the user. Simplicity saves user time.
  • FIG. 3 is a block diagram showing the structure of a video play mode setting apparatus implemented by using a parasitic toolkit according to an embodiment of the present invention.
  • the apparatus includes: a creation module 300, an embedded module 310, a layout presentation module 320, and a presentation module 330.
  • the creating module 300 is adapted to create a first floating window and a second floating window according to a setting behavior of the user-triggered video playing mode, and set layout parameters of the first floating window and the second floating window.
  • the button for setting the video play mode may be triggered, and after detecting that the user triggers the button for setting the video play mode, the Floatwindow is created according to the behavior of the user.
  • the creation of Floatwindow involves the WindowManager interface.
  • the implementation classes are WindowManagerImpl, CompatModeWrapper, and LocalWindowManager.
  • the code of the parasitic toolkit starts a Service, and then creates a first floating window and a second floating window with a control panel in the Service.
  • the first floating window may be a video playback floating window
  • the second floating window may be a chat floating window, that is, the provided video stream may be played in the first floating window, and the user chat content may be presented in the second floating window.
  • the floating window is a floating window on the terminal screen.
  • the floating window is not affiliated with the Activity interface, and is not affected by the coverage of the Activity interface, but is the same as the life cycle of the Activity.
  • the first floating window and the second floating window are created by a parasitic toolkit. After detecting the user's trigger behavior, create a Floatwindow based on the user's behavior. The size of the created first and second floating windows is smaller than the size of the user interface of the main application.
  • the user can determine whether the second floating window needs to be displayed according to the requirement, whether the user interaction interface is presented in the second floating window, and the user interaction interface is not required to be presented in the second floating window.
  • the second floating window is closed by triggering the control panel on the first floating window.
  • the embedding module 310 is adapted to embed the video player in the first floating window.
  • the video player is implemented by a window view, which is a surfaceview view.
  • the layout display module 320 is adapted to layout and display the first floating window and the second floating window according to the layout parameters of the first floating window and the second floating window.
  • the first floating window and the second floating window are laid out according to the set layout parameters, and the first floating window and the second floating window after the layout are displayed. For example, set the size parameter of the first floating window to width: 80, height: 100 (in pixels), and set the size parameter of the second floating window to width: 80, height: 20, so that the user is presented with a 100. *80 first floating window and 20*80 second floating window.
  • the presentation module 330 is adapted to play the video stream provided by the video server in the first floating window while presenting the user interface of the main application, and present the user interaction interface in the second floating window.
  • the device further includes: a modifying module 340, configured to modify window position parameters of the first floating window and the second floating window according to a behavior of the first floating window and the second floating window that are triggered by the user.
  • a modifying module 340 configured to modify window position parameters of the first floating window and the second floating window according to a behavior of the first floating window and the second floating window that are triggered by the user.
  • the created floating window occupies a portion of the display area of the terminal screen for displaying the user interface of the video service initiated by the user.
  • the window position parameter and/or the window size parameter of the floating window may be modified, for example, the window position parameter and the window size of the floating window are simultaneously modified.
  • the floating window is displayed in the corresponding position of the position parameter of the terminal screen with the size corresponding to the modified window size parameter. For example, modify the window height or window width of the floating window to reduce the floating window, such as reducing it to the original one-third, thus leaving a larger display space for the main application.
  • the layout presentation module 320 is adapted to: layout and display the first floating window and the second floating window according to the modified window position parameter.
  • the embedding module 310 is adapted to: embed a window view in the first floating window to create a drawing surface of the window view.
  • the video player is implemented through a window view.
  • a window view is embedded in the floating window, which is used to draw the video interface.
  • the window view here can be any view capable of displaying the user interface provided by the video service, which is not limited by the present invention.
  • This embodiment uses a window view as a surface view as an example for description.
  • the surfaceview has a separate drawing surface that does not share the same drawing surface with its host window.
  • the surfaceview user interface can be drawn in a separate thread without taking up the main thread resources.
  • surfaceview can achieve complex and efficient UI rendering, on the other hand, it does not cause user input to be unable to respond in time. Therefore, using surfaceview as a window view embedded in a floating window enables complex and efficient drawing.
  • the presentation module 330 is adapted to: control the window view to draw a video interface corresponding to the video stream on the drawing surface.
  • the parasitic toolkit controls the window view to draw a video interface corresponding to the video stream on the drawing surface thereof, and displays the video stream in the drawn video interface, thereby realizing Presenting the user interface of the main application while playing the video stream in the floating window, and presenting the user interaction interface in the second floating window, allowing the user to interact with other users through the second floating window while presenting the user interface of the main application , or do other things.
  • the creating module 300 is adapted to: create a first floating window with a control panel according to a setting behavior of a video playing mode triggered by the user.
  • the device further includes: a monitoring module 350, configured to monitor whether the user triggers to close the second floating window on the first floating window;
  • the closing module 360 is adapted to close the second floating window in case the user is monitored to trigger the closing of the second floating window on the first floating window.
  • the second floating window is closed, and the corresponding interactive service is stopped. If the triggering behavior of the user is not monitored, the second floating window is retained, and the user interaction interface is presented in the second floating window, so that the user can pass the second floating according to the requirement.
  • the window interacts with other users or performs other operations.
  • the first floating window and the second floating window are set, the layout parameters of the first floating window and the second floating window are set, and the first floating window and the first floating window are determined according to the set layout parameters.
  • the two floating windows are arranged and displayed to realize the setting of the video playing mode, and It is enough to play the video while presenting the user interface of the main application, and provide interactive services to the user, which solves the problem that the user can only use other applications or video applications separately, but can not simultaneously display the interface of the video application while operating other applications, and other
  • the shortcoming of the interaction overcomes the problem that the prior art needs to switch to the corresponding application when it needs to operate other applications or video applications, resulting in inconvenient operation, greatly improving the convenience of the user operation and saving user time.
  • modules in the devices of the embodiments can be adaptively changed and placed in one or more devices different from the embodiment.
  • the modules or units or components of the embodiments may be combined into one module or unit or component, and further they may be divided into a plurality of sub-modules or sub-units or sub-components.
  • any combination of the features disclosed in the specification, including the accompanying claims, the abstract and the drawings, and any methods so disclosed, or All processes or units of the device are combined.
  • Each feature disclosed in this specification (including the accompanying claims, the abstract and the drawings) may be replaced by alternative features that provide the same, equivalent or similar purpose.
  • the various component embodiments of the present invention may be implemented in hardware, or in a software module running on one or more processors, or in a combination thereof.
  • a microprocessor or digital signal processor may be used in practice to implement some or all of the components of the video playback mode setting device implemented with a parasitic toolkit in accordance with an embodiment of the present invention.
  • the invention can also be implemented as a device or device program (e.g., a computer program and a computer program product) for performing some or all of the methods described herein.
  • Such a program implementing the invention may be stored on a computer readable medium or may be in the form of one or more signals. Such signals may be downloaded from an Internet website, provided on a carrier signal, or provided in any other form.
  • FIG. 4 illustrates a computing device that can implement a video play mode setting method implemented using a parasitic toolkit in accordance with the present invention.
  • the computing device conventionally includes a processor 410 and a program product or readable medium in the form of a memory 420.
  • Memory 420 can be an electronic memory such as a flash memory, EEPROM (Electrically Erasable Programmable Read Only Memory), EPROM, or ROM.
  • Memory 420 has a memory space 430 for program code 431 for performing any of the method steps described above.
  • storage space 430 for program code may include various program code 431 for implementing various steps in the above methods, respectively.
  • These program codes can be read from or written to one or more program products.
  • These program products include program code carriers such as memory cards.
  • Such a program product is typically a portable or fixed storage unit as described with reference to FIG.
  • the storage unit may have storage segments, storage spaces, and the like that are similarly arranged to memory 420 in the computing device of FIG.
  • the program code can be compressed, for example, in an appropriate form.
  • the storage unit includes readable code 431', ie, code that can be read by a processor, such as 410, which, when executed by a computing device, causes the computing device to perform various steps in the methods described above. .

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Human Computer Interaction (AREA)
  • User Interface Of Digital Computer (AREA)
  • Computer Graphics (AREA)

Abstract

Provided are a video play mode setting method, a device, a program and a medium. A parasitic toolkit is pre-bound with a main application, so as to provide a function of playing video and setting a video play mode in a user interface of the main application. The method comprises: creating a first suspension window and a second suspension window according to a behavior of setting a video play mode triggered by a user; setting layout parameters of the first suspension window and the second suspension window; embedding a video player in the first suspension window; arranging and presenting the first suspension window and the second suspension window according to the layout parameters of the first suspension window and the second suspension window; and while presenting the user interface of the main application, a video stream provided by the video server is played in the first suspension window, and a user interaction interface is presented in the second suspension window. The present invention achieves setting of the video playback mode, and the video is played while presenting the user interface of the main application, so that providing interactive services to the user.

Description

视频播放模式设置方法、装置、程序及介质Video playback mode setting method, device, program and medium 技术领域Technical field
本发明涉及智能终端技术领域,具体涉及一种利用寄生工具包实现的视频播放模式设置方法、一种利用寄生工具包实现的视频播放模式设置装置、一种计算机程序以及一种计算机可读介质。The present invention relates to the field of intelligent terminal technologies, and in particular, to a video playback mode setting method implemented by using a parasitic toolkit, a video playback mode setting device implemented by using a parasitic toolkit, a computer program, and a computer readable medium.
背景技术Background technique
随着智能终端的屏幕越来越大、CPU(Central Processing Unit,中央处理器)、内存、GPU(Graphics Processing Unit,图形处理器)等硬件功能越来越强大,用户对应用的需求也越来越高,例如用户希望在操作其他应用的同时能够观看视频。目前,如果终端在运行一个应用的同时想要运行视频应用,终端是需要将当前运行应用的相关操作暂停,或者关闭当前运行应用的应用界面,然后才能切换到另一个应用的应用界面。例如,当用户玩游戏的时候,需要观看视频,用户需要暂停或退出正在玩的游戏才能观看视频;或者,通过设置视频应用和其他应用的界面的显示大小,才能同时显示视频应用和其他应用,用户需要在各个应用的应用界面之间来回切换,给用户的操作带来不便,且并不能实现在显示其他应用的用户界面的同时播放视频。此外,现有技术方案中,用户不能灵活设置视频播放模式,只能在现有的视频播放模式中切换,无法向用户提供交互服务,不能满足用户的需求。As the screens of smart terminals become larger and larger, and hardware functions such as CPU (Central Processing Unit), memory, GPU (Graphics Processing Unit) become more and more powerful, users' demand for applications is also increasing. The higher, for example, the user wants to be able to watch the video while operating other applications. Currently, if the terminal wants to run the video application while running an application, the terminal needs to pause the related operation of the currently running application, or close the application interface of the currently running application, and then switch to the application interface of another application. For example, when a user plays a game, they need to watch the video, the user needs to pause or quit the game being played to watch the video; or, by setting the display size of the interface of the video application and other applications, the video application and other applications can be simultaneously displayed. The user needs to switch back and forth between the application interfaces of the respective applications, which brings inconvenience to the user's operation, and cannot play the video while displaying the user interface of other applications. In addition, in the prior art solution, the user cannot flexibly set the video play mode, and can only switch in the existing video play mode, and cannot provide interactive services to the user, which cannot meet the needs of the user.
发明内容Summary of the invention
鉴于上述问题,提出了本发明以便提供一种克服上述问题或者至少部分地解决上述问题的利用寄生工具包实现的视频播放模式设置方法和相应的利用寄生工具包实现的视频播放模式设置装置、计算机程序及计算机可读介质。In view of the above problems, the present invention has been made in order to provide a video play mode setting method and a corresponding video play mode setting apparatus and computer implemented by using a parasitic toolkit that overcome the above problems or at least partially solve the above problems. Program and computer readable medium.
根据本发明的一个方面,提供了一种利用寄生工具包实现的视频播放模式设置方法,其中,寄生工具包与主应用预先绑定,以提供在主应用的用户 界面中播放视频以及设置视频播放模式的功能,方法包括:According to an aspect of the present invention, a video play mode setting method implemented using a parasitic toolkit is provided, wherein a parasitic toolkit is pre-bound with a main application to provide a user in a main application The function of playing video and setting the video playback mode in the interface, including:
根据用户触发的视频播放模式的设置行为,创建第一悬浮窗和第二悬浮窗,并设置第一悬浮窗和第二悬浮窗的布局参数,以及,在第一悬浮窗内嵌入视频播放器;Forming a first floating window and a second floating window according to a setting behavior of the video playing mode triggered by the user, and setting layout parameters of the first floating window and the second floating window, and embedding the video player in the first floating window;
依据第一悬浮窗和第二悬浮窗的布局参数对第一悬浮窗和第二悬浮窗进行布局及展现;Arranging and displaying the first floating window and the second floating window according to layout parameters of the first floating window and the second floating window;
在呈现主应用的用户界面的同时在第一悬浮窗内播放视频服务器提供的视频流,以及在第二悬浮窗内呈现用户交互界面。The video stream provided by the video server is played in the first floating window while the user interface of the main application is presented, and the user interaction interface is presented in the second floating window.
根据本发明的另一方面,提供了一种利用寄生工具包实现的视频播放模式设置装置,其中,寄生工具包与主应用预先绑定,以提供在主应用的用户界面中播放视频以及设置视频播放模式的功能,装置包括:According to another aspect of the present invention, there is provided a video play mode setting apparatus implemented using a parasitic toolkit, wherein a parasitic toolkit is pre-bound with a main application to provide a video and a set video in a main application's user interface. The function of the play mode, the device includes:
创建模块,适于根据用户触发的视频播放模式的设置行为,创建第一悬浮窗和第二悬浮窗,并设置第一悬浮窗和第二悬浮窗的布局参数;a creating module, configured to create a first floating window and a second floating window according to a setting behavior of a video playing mode triggered by the user, and set layout parameters of the first floating window and the second floating window;
嵌入模块,适于在第一悬浮窗内嵌入视频播放器;An embedded module adapted to embed a video player in the first floating window;
布局展现模块,适于依据第一悬浮窗和第二悬浮窗的布局参数对第一悬浮窗和第二悬浮窗进行布局及展现;The layout display module is adapted to layout and display the first floating window and the second floating window according to the layout parameters of the first floating window and the second floating window;
呈现模块,适于在呈现主应用的用户界面的同时在第一悬浮窗内播放视频服务器提供的视频流,以及在第二悬浮窗内呈现用户交互界面。The presentation module is adapted to play the video stream provided by the video server in the first floating window while presenting the user interface of the main application, and present the user interaction interface in the second floating window.
根据本发明的又一方面,提供了一种计算机程序,包括计算机可读代码,当所述可读代码在计算设备上运行时,导致所述计算设备执行根据本发明实施例中的任一个所述的利用寄生工具包实现的视频播放模式设置方法。According to still another aspect of the present invention, a computer program comprising computer readable code, when the readable code is run on a computing device, causes the computing device to perform any of the embodiments of the present invention The video playback mode setting method implemented by the parasitic toolkit is described.
本发明实施例还提供了一种计算机可读介质,其中存储了如本发明实施例所述的程序。The embodiment of the invention further provides a computer readable medium, wherein the program according to the embodiment of the invention is stored.
根据本发明提供的方案,通过创建第一悬浮窗和第二悬浮窗,设置第一悬浮窗和第二悬浮窗的布局参数,并依据所设置的布局参数对第一悬浮窗和第二悬浮窗进行布局及展现,实现了视频播放模式的设置,而且能够在呈现主应用的用户界面的同时播放视频,以及向用户提供交互服务,解决了用户只能单独使用其他应用或视频应用,而不能在操作其他应用时同时显示视频 应用的界面、以及进行其他交互操作的缺陷,克服了现有技术中当需要操作其他应用或视频应用时,都需要切换到相应的应用,导致操作不便的问题,大大提高了用户操作的简便性,节省用户时间。According to the solution provided by the present invention, the first floating window and the second floating window are set, the layout parameters of the first floating window and the second floating window are set, and the first floating window and the second floating window are set according to the set layout parameters. Layout and presentation, the setting of the video play mode is realized, and the video can be played while presenting the user interface of the main application, and the interactive service is provided to the user, which solves the problem that the user can only use other applications or video applications alone, but cannot Display video at the same time when working with other apps The interface of the application and the defects of performing other interactions overcome the problem that the prior art needs to switch to the corresponding application when it needs to operate other applications or video applications, resulting in inconvenient operation, and greatly improving the convenience of the user operation. , saving user time.
上述说明仅是本发明技术方案的概述,为了能够更清楚了解本发明的技术手段,而可依照说明书的内容予以实施,并且为了让本发明的上述和其它目的、特征和优点能够更明显易懂,以下特举本发明的具体实施方式。The above description is only an overview of the technical solutions of the present invention, and the above-described and other objects, features and advantages of the present invention can be more clearly understood. Specific embodiments of the invention are set forth below.
附图说明DRAWINGS
通过阅读下文优选实施方式的详细描述,各种其他的优点和益处对于本领域普通技术人员将变得清楚明了。附图仅用于示出优选实施方式的目的,而并不认为是对本发明的限制。而且在整个附图中,用相同的参考符号表示相同的部件。在附图中:Various other advantages and benefits will become apparent to those skilled in the art from a The drawings are only for the purpose of illustrating the preferred embodiments and are not to be construed as limiting. Throughout the drawings, the same reference numerals are used to refer to the same parts. In the drawing:
图1示出了根据本发明一个实施例的利用寄生工具包实现的视频播放模式设置方法的流程图;1 shows a flow chart of a video play mode setting method implemented using a parasitic toolkit according to an embodiment of the present invention;
图2示出了根据本发明另一个实施例的利用寄生工具包实现的视频播放模式设置方法的流程图;2 is a flow chart showing a video play mode setting method implemented by using a parasitic toolkit according to another embodiment of the present invention;
图3示出了根据本发明一个实施例的利用寄生工具包实现的视频播放模式设置装置的结构框图;3 is a block diagram showing the structure of a video play mode setting apparatus implemented by using a parasitic toolkit according to an embodiment of the present invention;
图4示出了用于执行根据本发明的利用寄生工具包实现的视频播放模式设置方法的计算设备的框图;4 shows a block diagram of a computing device for performing a video play mode setting method implemented using a parasitic toolkit in accordance with the present invention;
图5示出了用于保持或者携带实现根据本发明的利用寄生工具包实现的视频播放模式设置方法的程序代码的存储单元。FIG. 5 illustrates a storage unit for holding or carrying program code that implements a video play mode setting method implemented using a parasitic toolkit in accordance with the present invention.
具体实施方式detailed description
下面将参照附图更详细地描述本公开的示例性实施例。虽然附图中显示了本公开的示例性实施例,然而应当理解,可以以各种形式实现本公开而不应被这里阐述的实施例所限制。相反,提供这些实施例是为了能够更透彻地理解本公开,并且能够将本公开的范围完整的传达给本领域的技术人员。 Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While the embodiments of the present invention have been shown in the drawings, the embodiments Rather, these embodiments are provided so that this disclosure will be more fully understood and the scope of the disclosure will be fully disclosed.
本发明的发明人在使用一些应用(例如,游戏应用)的过程中发现,在使用这些应用的时候,并不能在显示应用的用户界面的同时还播放视频,即,用户不能在使用这些应用的同时还能观看视频,用户需要另外开启视频应用,然而,视频应用和其他应用并不能同时在移动终端屏幕上显示,在PC终端也需要通过设置视频应用和其他应用的界面的显示大小,才能同时显示视频应用和其他应用,若用户想要对视频应用或其他应用进行操作时,需要将光标定位到相应的应用,这样很容易造成使用不便,为了解决上述问题,发明人经过创造性的劳动,提出了利用寄生工具包,将寄生工具包与主应用预先绑定,以提供在主应用的用户界面中播放视频的功能的解决方案。The inventors of the present invention have found in the process of using some applications (for example, game applications) that when using these applications, the video cannot be played while displaying the user interface of the application, that is, the user cannot use the applications. At the same time, the video can be viewed. The user needs to open the video application separately. However, the video application and other applications cannot be displayed on the screen of the mobile terminal at the same time. In the PC terminal, the display size of the interface of the video application and other applications needs to be set simultaneously. Display video applications and other applications. If the user wants to operate the video application or other applications, the cursor needs to be positioned to the corresponding application, which is easy to cause inconvenience. In order to solve the above problems, the inventor has creatively worked out The parasitic toolkit is used to pre-bind the parasitic toolkit with the main application to provide a solution for playing video in the main application's user interface.
其中,主应用是一独立的应用,该应用可以独立实现相应的功能,不需要依赖于任何其他的应用,例如,游戏应用,用户在启动游戏应用后,便可以在游戏应用所提供的用户界面上玩游戏。The main application is a stand-alone application, and the application can independently implement the corresponding functions without relying on any other application, for example, a game application, and the user interface provided by the game application after the user launches the game application. Play on the game.
而该寄生工具包需要依赖于主应用才可以实现相应的功能,需要主应用调用该寄生工具包的API接口才能实现寄生工具包相应的功能,例如,以在游戏应用播放视频为例,在用户玩游戏的时候可以同时播放视频,这里游戏应用为主应用,播放视频是寄生工具包所实现的功能。The parasitic toolkit needs to rely on the main application to implement the corresponding function, and the main application needs to call the API interface of the parasitic toolkit to implement the corresponding function of the parasitic toolkit, for example, to play the video in the game application as an example, in the user. When playing a game, you can play video at the same time. Here, the game application is the main application, and the playback video is a function realized by the parasitic toolkit.
在播放视频或者玩游戏的过程中,用户可能需要进行其他操作,例如与其他用户实时沟通正在玩的游戏,或者点评播放的视频,目前的视频播放模式并不能实现相应的功能。During the process of playing a video or playing a game, the user may need to perform other operations, such as communicating the game being played in real time with other users, or commenting on the played video. The current video playback mode does not implement the corresponding function.
图1示出了根据本发明一个实施例的利用寄生工具包实现的视频播放模式设置方法的流程图。如图1所示,该方法包括以下步骤:1 shows a flow chart of a video play mode setting method implemented using a parasitic toolkit in accordance with one embodiment of the present invention. As shown in Figure 1, the method includes the following steps:
步骤S100,根据用户触发的视频播放模式的设置行为,创建第一悬浮窗和第二悬浮窗,并设置第一悬浮窗和第二悬浮窗的布局参数,以及,在第一悬浮窗内嵌入视频播放器。Step S100: Create a first floating window and a second floating window according to a setting behavior of the video playing mode triggered by the user, and set layout parameters of the first floating window and the second floating window, and embed the video in the first floating window. player.
具体地,当用户需要设置视频播放模式时,可以触发设置视频播放模式的按钮,在检测到用户触发设置视频播放模式的按钮后,根据用户的该行为,创建Floatwindow。Floatwindow的创建涉及到WindowManager接口,实现类有WindowManagerImpl,CompatModeWrapper,LocalWindowManager。具体地,寄生工具包的代码启动一个Service,然后在Service中创建第一悬浮窗和 第二悬浮窗。在创建第一悬浮窗和第二悬浮窗时,需要定义第一悬浮窗和第二悬浮窗的布局,创建第一悬浮窗和第二悬浮窗设置布局参数的对象;设置第一悬浮窗和第二悬浮窗的位置参数和尺寸参数(包含width和height)。第一悬浮窗和第二悬浮窗的位置参数和尺寸参数决定了第一悬浮窗和第二悬浮窗以预设尺寸显示在终端屏幕的预设位置。Specifically, when the user needs to set the video play mode, the button for setting the video play mode may be triggered, and after detecting that the user triggers the button for setting the video play mode, the Floatwindow is created according to the behavior of the user. The creation of Floatwindow involves the WindowManager interface. The implementation classes are WindowManagerImpl, CompatModeWrapper, and LocalWindowManager. Specifically, the code of the parasitic toolkit starts a Service, and then creates a first floating window in the Service and The second floating window. When creating the first floating window and the second floating window, it is necessary to define a layout of the first floating window and the second floating window, and create an object of the first floating window and the second floating window to set a layout parameter; setting the first floating window and the first The position and size parameters of the two floating windows (including width and height). The positional parameters and the size parameters of the first and second floating windows determine that the first and second floating windows are displayed in a preset size on the preset position of the terminal screen.
其中,悬浮窗是存在终端屏幕之上的浮动窗口,悬浮窗不隶属于Activity界面,也不受Activity界面的覆盖影响,但与Activity的生命周期相同。本发明实施例中,第一悬浮窗和第二悬浮窗由寄生工具包创建。在检测到用户的触发行为后,根据用户的该行为,创建Floatwindow。其中,创建的第一悬浮窗和第二悬浮窗的尺寸小于主应用的用户界面的尺寸。The floating window is a floating window on the terminal screen. The floating window is not affiliated with the Activity interface, and is not affected by the coverage of the Activity interface, but is the same as the life cycle of the Activity. In an embodiment of the invention, the first floating window and the second floating window are created by a parasitic toolkit. After detecting the user's trigger behavior, create a Floatwindow based on the user's behavior. The size of the created first and second floating windows is smaller than the size of the user interface of the main application.
本发明实施例在创建第一悬浮窗之后,在第一悬浮窗内嵌入视频播放器,该视频播放器可以用于显示视频流。After the first floating window is created, the embodiment of the present invention embeds a video player in the first floating window, and the video player can be used to display a video stream.
步骤S101,依据第一悬浮窗和第二悬浮窗的布局参数对第一悬浮窗和第二悬浮窗进行布局及展现。Step S101: Layout and display the first floating window and the second floating window according to the layout parameters of the first floating window and the second floating window.
在根据步骤S100设置第一悬浮窗和第二悬浮窗的布局参数后,依据所设置的布局参数对第一悬浮窗和第二悬浮窗进行布局,并展现布局后的第一悬浮窗和第二悬浮窗,例如,设置第一悬浮窗的尺寸参数为width:80、height:100(以像素为单位),设置第二悬浮窗的尺寸参数为width:80、height:20,这样展现给用户的就是一个100*80的第一悬浮窗和20*80的第二悬浮窗。After the layout parameters of the first floating window and the second floating window are set according to step S100, the first floating window and the second floating window are laid out according to the set layout parameters, and the first floating window and the second after the layout are presented. The floating window, for example, sets the size parameter of the first floating window to width: 80, height: 100 (in pixels), and sets the size parameter of the second floating window to width: 80, height: 20, which is presented to the user. It is a 100*80 first floating window and a 20*80 second floating window.
步骤S102,在呈现主应用的用户界面的同时在第一悬浮窗内播放视频服务器提供的视频流,以及在第二悬浮窗内呈现用户交互界面。Step S102, playing the video stream provided by the video server in the first floating window while presenting the user interface of the main application, and presenting the user interaction interface in the second floating window.
具体地,在利用步骤S100在悬浮窗内嵌入视频播放器之后,从服务器获取相应的视频流,将服务器提供的视频流传输给视频播放器,在第一悬浮窗内播放该视频流,从而在呈现主应用的用户界面的同时播放视频流,以及在第二悬浮窗内呈现用户交互界面,在呈现主应用的用户界面的同时使得用户可以通过第二悬浮窗与其他用户进行交互,或者进行其他操作。Specifically, after the video player is embedded in the floating window by using step S100, the corresponding video stream is obtained from the server, and the video stream provided by the server is transmitted to the video player, and the video stream is played in the first floating window, thereby Playing the video stream while presenting the user interface of the main application, and presenting the user interaction interface in the second floating window, allowing the user to interact with other users through the second floating window while presenting the user interface of the main application, or performing other operating.
根据本发明上述实施例提供的方法,通过创建第一悬浮窗和第二悬浮窗,设置第一悬浮窗和第二悬浮窗的布局参数,并依据所设置的布局参数对第一悬浮窗和第二悬浮窗进行布局及展现,实现了视频播放模式的设置,而且能 够在呈现主应用的用户界面的同时播放视频,以及向用户提供交互服务,解决了用户只能单独使用其他应用或视频应用,而不能在操作其他应用时同时显示视频应用的界面、以及进行其他交互操作的缺陷,克服了现有技术中当需要操作其他应用或视频应用时,都需要切换到相应的应用,导致操作不便的问题,大大提高了用户操作的简便性,节省用户时间。According to the method provided by the above embodiment of the present invention, by setting a first floating window and a second floating window, setting layout parameters of the first floating window and the second floating window, and according to the set layout parameters, the first floating window and the first The two floating windows are arranged and displayed to realize the setting of the video playing mode, and It is enough to play the video while presenting the user interface of the main application, and provide interactive services to the user, which solves the problem that the user can only use other applications or video applications separately, but can not simultaneously display the interface of the video application while operating other applications, and other The shortcoming of the interaction overcomes the problem that the prior art needs to switch to the corresponding application when it needs to operate other applications or video applications, resulting in inconvenient operation, greatly improving the convenience of the user operation and saving user time.
图2示出了根据本发明另一个实施例的利用寄生工具包实现的视频播放模式设置方法的流程图。如图2所示,该方法包括以下步骤:2 shows a flow chart of a video play mode setting method implemented using a parasitic toolkit according to another embodiment of the present invention. As shown in FIG. 2, the method includes the following steps:
步骤S200,根据用户触发的视频播放模式的设置行为,创建具有控制面板的第一悬浮窗和第二悬浮窗,并设置第一悬浮窗和第二悬浮窗的布局参数。Step S200: Create a first floating window and a second floating window having a control panel according to a setting behavior of the video playing mode triggered by the user, and set layout parameters of the first floating window and the second floating window.
具体地,当用户需要设置视频播放模式时,可以触发设置视频播放模式的按钮,在检测到用户触发设置视频播放模式的按钮后,根据用户的该行为,创建Floatwindow。Floatwindow的创建涉及到WindowManager接口,实现类有WindowManagerImpl,CompatModeWrapper,LocalWindowManager。具体地,寄生工具包的代码启动一个Service,然后在Service中创建具有控制面板的第一悬浮窗和第二悬浮窗。在创建第一悬浮窗和第二悬浮窗时,需要定义第一悬浮窗和第二悬浮窗的布局,创建第一悬浮窗和第二悬浮窗设置布局参数的对象;设置第一悬浮窗和第二悬浮窗的位置参数和尺寸参数(包含width和height)。第一悬浮窗和第二悬浮窗的位置参数和尺寸参数决定了第一悬浮窗和第二悬浮窗以预设尺寸显示在终端屏幕的预设位置。其中,第一悬浮窗可以为视频播放悬浮窗,第二悬浮窗可以为聊天悬浮窗,即,可以在第一悬浮窗播放所提供的视频流,第二悬浮窗内呈现用户聊天内容等。Specifically, when the user needs to set the video play mode, the button for setting the video play mode may be triggered, and after detecting that the user triggers the button for setting the video play mode, the Floatwindow is created according to the behavior of the user. The creation of Floatwindow involves the WindowManager interface. The implementation classes are WindowManagerImpl, CompatModeWrapper, and LocalWindowManager. Specifically, the code of the parasitic toolkit starts a Service, and then creates a first floating window and a second floating window with a control panel in the Service. When creating the first floating window and the second floating window, it is necessary to define a layout of the first floating window and the second floating window, and create an object of the first floating window and the second floating window to set a layout parameter; setting the first floating window and the first The position and size parameters of the two floating windows (including width and height). The positional parameters and the size parameters of the first and second floating windows determine that the first and second floating windows are displayed in a preset size on the preset position of the terminal screen. The first floating window may be a video playback floating window, and the second floating window may be a chat floating window, that is, the provided video stream may be played in the first floating window, and the user chat content may be presented in the second floating window.
其中,悬浮窗是存在终端屏幕之上的浮动窗口,悬浮窗不隶属于Activity界面,也不受Activity界面的覆盖影响,但与Activity的生命周期相同。本发明实施例中,第一悬浮窗和第二悬浮窗由寄生工具包创建。在检测到用户的触发行为后,根据用户的该行为,创建Floatwindow。其中,创建的第一悬浮窗和第二悬浮窗的尺寸小于主应用的用户界面的尺寸。The floating window is a floating window on the terminal screen. The floating window is not affiliated with the Activity interface, and is not affected by the coverage of the Activity interface, but is the same as the life cycle of the Activity. In an embodiment of the invention, the first floating window and the second floating window are created by a parasitic toolkit. After detecting the user's trigger behavior, create a Floatwindow based on the user's behavior. The size of the created first and second floating windows is smaller than the size of the user interface of the main application.
本发明实施例中,用户可以根据需求确定是否需要显示第二悬浮窗,是否在第二悬浮窗内呈现用户交互界面,在不需要在第二悬浮窗内呈现用户交互界面的情况下,用户可以通过触发第一悬浮窗上的控制面板的方式,关闭 第二悬浮窗。In the embodiment of the present invention, the user can determine whether the second floating window needs to be displayed according to the requirement, whether the user interaction interface is presented in the second floating window, and the user interaction interface is not required to be presented in the second floating window. Close by triggering the control panel on the first floating window The second floating window.
步骤S201,在第一悬浮窗内嵌入窗口视图,创建窗口视图的绘图表面。Step S201, embedding a window view in the first floating window to create a drawing surface of the window view.
其中,视频播放器通过窗口视图来实现。为了能够使第一悬浮窗显示用户所启动的视频服务的用户界面,在创建第一悬浮窗之后,在第一悬浮窗内嵌入窗口视图,该窗口视图用于绘制视频界面。这里窗口视图可以为任何能够显示视频服务所提供的用户界面的视图,本发明对此不作限制。本实施例以窗口视图为surfaceview视图为例进行说明。Among them, the video player is implemented through a window view. In order to enable the first floating window to display the user interface of the video service initiated by the user, after creating the first floating window, a window view is embedded in the first floating window, the window view being used to draw the video interface. The window view here can be any view capable of displaying the user interface provided by the video service, which is not limited by the present invention. This embodiment uses a window view as a surface view as an example for description.
在Android系统中,surfaceview具有独立的绘图表面,它不与其宿主窗口共享同一个绘图表面。由于具有独立的绘图表面,因此surfaceview的用户界面可在一个独立的线程中进行绘制,而且又不会占用主线程资源。surfaceview一方面可以实现复杂而高效的UI绘制,另一方面又不会导致用户输入得不到及时响应。因此,使用surfaceview作为窗口视图嵌入到第一悬浮窗中,可以实现复杂和高效的绘制。In the Android system, the surfaceview has a separate drawing surface that does not share the same drawing surface with its host window. With a separate drawing surface, the surfaceview user interface can be drawn in a separate thread without taking up the main thread resources. On the one hand, surfaceview can achieve complex and efficient UI rendering, on the other hand, it does not cause user input to be unable to respond in time. Therefore, using surfaceview as a window view embedded in the first floating window enables complex and efficient drawing.
步骤S202,依据第一悬浮窗和第二悬浮窗的布局参数对第一悬浮窗和第二悬浮窗进行布局及展现。Step S202: Layout and display the first floating window and the second floating window according to the layout parameters of the first floating window and the second floating window.
在根据步骤S200设置第一悬浮窗和第二悬浮窗的布局参数后,依据所设置的布局参数对第一悬浮窗和第二悬浮窗进行布局,并展现布局后的第一悬浮窗和第二悬浮窗,例如,设置第一悬浮窗的尺寸参数为width:80、height:100(以像素为单位),设置第二悬浮窗的尺寸参数为width:80、height:20,这样展现给用户的就是一个100*80的第一悬浮窗和20*80的第二悬浮窗。After the layout parameters of the first floating window and the second floating window are set according to step S200, the first floating window and the second floating window are laid out according to the set layout parameters, and the first floating window and the second after the layout are presented. The floating window, for example, sets the size parameter of the first floating window to width: 80, height: 100 (in pixels), and sets the size parameter of the second floating window to width: 80, height: 20, which is presented to the user. It is a 100*80 first floating window and a 20*80 second floating window.
步骤S203,控制窗口视图在绘图表面绘制视频流对应的视频界面,在呈现主应用的用户界面的同时在第一悬浮窗内播放视频服务器提供的视频流,以及在第二悬浮窗内呈现用户交互界面。Step S203, the control window view draws a video interface corresponding to the video stream on the drawing surface, plays the video stream provided by the video server in the first floating window, and presents the user interaction in the second floating window while presenting the user interface of the main application. interface.
在将服务器提供的与频道标识对应的视频流传输给窗口视图之后,寄生工具包控制窗口视图在其绘图表面绘制视频流对应的视频界面,在所绘制的视频界面内显示视频流,实现了在呈现主应用的用户界面的同时在第一悬浮窗内播放视频流,以及在第二悬浮窗内呈现用户交互界面,在呈现主应用的用户界面的同时使得用户可以通过第二悬浮窗与其他用户进行交互,或者进行其他操作。 After the video stream corresponding to the channel identifier provided by the server is transmitted to the window view, the parasitic toolkit controls the window view to draw a video interface corresponding to the video stream on the drawing surface thereof, and displays the video stream in the drawn video interface, thereby realizing Presenting the user interface of the main application while playing the video stream in the first floating window, and presenting the user interaction interface in the second floating window, enabling the user to pass the second floating window and other users while presenting the user interface of the main application Interact or do other things.
步骤S204,监测用户是否在第一悬浮窗上触发关闭第二悬浮窗,若是,则执行步骤S205;若否,则不做处理,继续在第一悬浮窗内播放视频流,以及在第二悬浮窗内呈现用户交互界面。Step S204, monitoring whether the user triggers to close the second floating window on the first floating window, and if yes, executing step S205; if not, proceeding without processing, continuing to play the video stream in the first floating window, and in the second floating A user interface is presented within the window.
监测用户是否在第一悬浮窗的控制面板上触发关闭第二悬浮窗,主要是为了确定是否关闭第二悬浮窗,在监测到用户在控制面板上触发关闭画中画浮窗后,则可以控制关闭第二悬浮窗,停止提供相应的交互服务,若未监测到用户的触发行为,则继续保留第二悬浮窗,在第二悬浮窗内呈现用户交互界面,使得用户可以根据需求通过第二悬浮窗与其他用户进行交互,或者进行其他操作。Monitoring whether the user triggers the closing of the second floating window on the control panel of the first floating window, mainly to determine whether to close the second floating window, and after controlling to trigger the user to close the picture-in-picture floating window on the control panel, The second floating window is closed, and the corresponding interactive service is stopped. If the triggering behavior of the user is not monitored, the second floating window is retained, and the user interaction interface is presented in the second floating window, so that the user can pass the second floating according to the requirement. The window interacts with other users or performs other operations.
步骤S205,关闭第二悬浮窗。Step S205, closing the second floating window.
在监测到用户在第一悬浮窗上触发关闭第二悬浮窗的情况下,关闭第二悬浮窗。The second floating window is closed when it is detected that the user triggers the closing of the second floating window on the first floating window.
在本实施例的一个可能的实现方式中,该方法还包括:根据用户触发的移动第一悬浮窗和第二悬浮窗的行为,修改第一悬浮窗和第二悬浮窗的窗口位置参数,根据修改后的窗口位置参数对第一悬浮窗和第二悬浮窗进行布局及展现。In a possible implementation manner of the embodiment, the method further includes: modifying a window position parameter of the first floating window and the second floating window according to a behavior of the first floating window and the second floating window triggered by the user, according to The modified window position parameter lays out and displays the first floating window and the second floating window.
通过上述步骤创建的悬浮窗占用终端屏幕的一部分显示区域,用于显示用户所启动的视频服务的用户界面。当用户触发移动悬浮窗和/或改变悬浮窗大小时,为了便于用户操作主应用,可修改悬浮窗的窗口位置参数和/或窗口尺寸参数,例如,同时修改悬浮窗的窗口位置参数和窗口尺寸参数,在修改后,使悬浮窗以修改后的窗口尺寸参数对应的尺寸显示在终端屏幕的位置参数对应的位置。例如修改悬浮窗的窗口高度(height)或窗口宽度(width),使悬浮窗缩小,如缩小为原来的三分之一,从而为主应用留出更大的显示空间。The floating window created by the above steps occupies a part of the display area of the terminal screen for displaying the user interface of the video service initiated by the user. When the user triggers the movement of the floating window and/or changes the size of the floating window, in order to facilitate the user to operate the main application, the window position parameter and/or the window size parameter of the floating window may be modified, for example, the window position parameter and the window size of the floating window are simultaneously modified. After the modification, the floating window is displayed in the corresponding position of the position parameter of the terminal screen with the size corresponding to the modified window size parameter. For example, modify the window height or window width of the floating window to reduce the floating window, such as reducing it to the original one-third, thus leaving a larger display space for the main application.
根据本发明上述实施例提供的方法,通过创建第一悬浮窗和第二悬浮窗,设置第一悬浮窗和第二悬浮窗的布局参数,并依据所设置的布局参数对第一悬浮窗和第二悬浮窗进行布局及展现,实现了视频播放模式的设置,而且能够在呈现主应用的用户界面的同时播放视频,以及向用户提供交互服务,解决了用户只能单独使用其他应用或视频应用,而不能在操作其他应用时同时 显示视频应用的界面、以及进行其他交互操作的缺陷,克服了现有技术中当需要操作其他应用或视频应用时,都需要切换到相应的应用,导致操作不便的问题,大大提高了用户操作的简便性,节省用户时间。According to the method provided by the above embodiment of the present invention, by setting a first floating window and a second floating window, setting layout parameters of the first floating window and the second floating window, and according to the set layout parameters, the first floating window and the first The second floating window is arranged and displayed, realizes the setting of the video playing mode, and can play the video while presenting the user interface of the main application, and provides an interactive service to the user, which solves the problem that the user can only use other applications or video applications separately. Can't be used while working with other apps The defect of displaying the interface of the video application and performing other interaction operations overcomes the problem that the prior art needs to switch to the corresponding application when it needs to operate other applications or video applications, resulting in inconvenient operation and greatly improving the operation of the user. Simplicity saves user time.
图3示出了根据本发明一个实施例的利用寄生工具包实现的视频播放模式设置装置的结构框图。如图3所示,该装置包括:创建模块300、嵌入模块310、布局展现模块320和呈现模块330。FIG. 3 is a block diagram showing the structure of a video play mode setting apparatus implemented by using a parasitic toolkit according to an embodiment of the present invention. As shown in FIG. 3, the apparatus includes: a creation module 300, an embedded module 310, a layout presentation module 320, and a presentation module 330.
创建模块300,适于根据用户触发的视频播放模式的设置行为,创建第一悬浮窗和第二悬浮窗,并设置第一悬浮窗和第二悬浮窗的布局参数。The creating module 300 is adapted to create a first floating window and a second floating window according to a setting behavior of the user-triggered video playing mode, and set layout parameters of the first floating window and the second floating window.
具体地,当用户需要设置视频播放模式时,可以触发设置视频播放模式的按钮,在检测到用户触发设置视频播放模式的按钮后,根据用户的该行为,创建Floatwindow。Floatwindow的创建涉及到WindowManager接口,实现类有WindowManagerImpl,CompatModeWrapper,LocalWindowManager。具体地,寄生工具包的代码启动一个Service,然后在Service中创建具有控制面板的第一悬浮窗和第二悬浮窗。在创建第一悬浮窗和第二悬浮窗时,需要定义第一悬浮窗和第二悬浮窗的布局,创建第一悬浮窗和第二悬浮窗设置布局参数的对象;设置第一悬浮窗和第二悬浮窗的位置参数和尺寸参数(包含width和height)。第一悬浮窗和第二悬浮窗的位置参数和尺寸参数决定了第一悬浮窗和第二悬浮窗以预设尺寸显示在终端屏幕的预设位置。其中,第一悬浮窗可以为视频播放悬浮窗,第二悬浮窗可以为聊天悬浮窗,即,可以在第一悬浮窗播放所提供的视频流,第二悬浮窗内呈现用户聊天内容等。Specifically, when the user needs to set the video play mode, the button for setting the video play mode may be triggered, and after detecting that the user triggers the button for setting the video play mode, the Floatwindow is created according to the behavior of the user. The creation of Floatwindow involves the WindowManager interface. The implementation classes are WindowManagerImpl, CompatModeWrapper, and LocalWindowManager. Specifically, the code of the parasitic toolkit starts a Service, and then creates a first floating window and a second floating window with a control panel in the Service. When creating the first floating window and the second floating window, it is necessary to define a layout of the first floating window and the second floating window, and create an object of the first floating window and the second floating window to set a layout parameter; setting the first floating window and the first The position and size parameters of the two floating windows (including width and height). The positional parameters and the size parameters of the first and second floating windows determine that the first and second floating windows are displayed in a preset size on the preset position of the terminal screen. The first floating window may be a video playback floating window, and the second floating window may be a chat floating window, that is, the provided video stream may be played in the first floating window, and the user chat content may be presented in the second floating window.
其中,悬浮窗是存在终端屏幕之上的浮动窗口,悬浮窗不隶属于Activity界面,也不受Activity界面的覆盖影响,但与Activity的生命周期相同。本发明实施例中,第一悬浮窗和第二悬浮窗由寄生工具包创建。在检测到用户的触发行为后,根据用户的该行为,创建Floatwindow。其中,创建的第一悬浮窗和第二悬浮窗的尺寸小于主应用的用户界面的尺寸。The floating window is a floating window on the terminal screen. The floating window is not affiliated with the Activity interface, and is not affected by the coverage of the Activity interface, but is the same as the life cycle of the Activity. In an embodiment of the invention, the first floating window and the second floating window are created by a parasitic toolkit. After detecting the user's trigger behavior, create a Floatwindow based on the user's behavior. The size of the created first and second floating windows is smaller than the size of the user interface of the main application.
本发明实施例中,用户可以根据需求确定是否需要显示第二悬浮窗,是否在第二悬浮窗内呈现用户交互界面,在不需要在第二悬浮窗内呈现用户交互界面的情况下,用户可以通过触发第一悬浮窗上的控制面板的方式,关闭第二悬浮窗。 In the embodiment of the present invention, the user can determine whether the second floating window needs to be displayed according to the requirement, whether the user interaction interface is presented in the second floating window, and the user interaction interface is not required to be presented in the second floating window. The second floating window is closed by triggering the control panel on the first floating window.
嵌入模块310,适于在第一悬浮窗内嵌入视频播放器。The embedding module 310 is adapted to embed the video player in the first floating window.
其中,视频播放器通过窗口视图来实现,该窗口视图为surfaceview视图。The video player is implemented by a window view, which is a surfaceview view.
布局展现模块320,适于依据第一悬浮窗和第二悬浮窗的布局参数对第一悬浮窗和第二悬浮窗进行布局及展现。The layout display module 320 is adapted to layout and display the first floating window and the second floating window according to the layout parameters of the first floating window and the second floating window.
在设置第一悬浮窗和第二悬浮窗的布局参数后,依据所设置的布局参数对第一悬浮窗和第二悬浮窗进行布局,并展现布局后的第一悬浮窗和第二悬浮窗,例如,设置第一悬浮窗的尺寸参数为width:80、height:100(以像素为单位),设置第二悬浮窗的尺寸参数为width:80、height:20,这样展现给用户的就是一个100*80的第一悬浮窗和20*80的第二悬浮窗。After setting the layout parameters of the first floating window and the second floating window, the first floating window and the second floating window are laid out according to the set layout parameters, and the first floating window and the second floating window after the layout are displayed. For example, set the size parameter of the first floating window to width: 80, height: 100 (in pixels), and set the size parameter of the second floating window to width: 80, height: 20, so that the user is presented with a 100. *80 first floating window and 20*80 second floating window.
呈现模块330,适于在呈现主应用的用户界面的同时在第一悬浮窗内播放视频服务器提供的视频流,以及在第二悬浮窗内呈现用户交互界面。The presentation module 330 is adapted to play the video stream provided by the video server in the first floating window while presenting the user interface of the main application, and present the user interaction interface in the second floating window.
可选的,该装置还包括:修改模块340,适于根据用户触发的移动第一悬浮窗和第二悬浮窗的行为,修改第一悬浮窗和第二悬浮窗的窗口位置参数。Optionally, the device further includes: a modifying module 340, configured to modify window position parameters of the first floating window and the second floating window according to a behavior of the first floating window and the second floating window that are triggered by the user.
所创建的悬浮窗占用终端屏幕的一部分显示区域,用于显示用户所启动的视频服务的用户界面。当用户触发移动悬浮窗和/或改变悬浮窗大小时,为了便于用户操作主应用,可修改悬浮窗的窗口位置参数和/或窗口尺寸参数,例如,同时修改悬浮窗的窗口位置参数和窗口尺寸参数,在修改后,使悬浮窗以修改后的窗口尺寸参数对应的尺寸显示在终端屏幕的位置参数对应的位置。例如修改悬浮窗的窗口高度(height)或窗口宽度(width),使悬浮窗缩小,如缩小为原来的三分之一,从而为主应用留出更大的显示空间。The created floating window occupies a portion of the display area of the terminal screen for displaying the user interface of the video service initiated by the user. When the user triggers the movement of the floating window and/or changes the size of the floating window, in order to facilitate the user to operate the main application, the window position parameter and/or the window size parameter of the floating window may be modified, for example, the window position parameter and the window size of the floating window are simultaneously modified. After the modification, the floating window is displayed in the corresponding position of the position parameter of the terminal screen with the size corresponding to the modified window size parameter. For example, modify the window height or window width of the floating window to reduce the floating window, such as reducing it to the original one-third, thus leaving a larger display space for the main application.
布局展现模块320适于:根据修改后的窗口位置参数对第一悬浮窗和第二悬浮窗进行布局及展现。The layout presentation module 320 is adapted to: layout and display the first floating window and the second floating window according to the modified window position parameter.
可选的,嵌入模块310适于:在第一悬浮窗内嵌入窗口视图,创建窗口视图的绘图表面。Optionally, the embedding module 310 is adapted to: embed a window view in the first floating window to create a drawing surface of the window view.
其中,视频播放器通过窗口视图来实现。为了能够使该悬浮窗显示用户所启动的视频服务的用户界面,在创建悬浮窗之后,在悬浮窗内嵌入窗口视图,该窗口视图用于绘制视频界面。这里窗口视图可以为任何能够显示视频服务所提供的用户界面的视图,本发明对此不作限制。本实施例以窗口视图为surfaceview视图为例进行说明。 Among them, the video player is implemented through a window view. In order to enable the floating window to display the user interface of the video service initiated by the user, after creating the floating window, a window view is embedded in the floating window, which is used to draw the video interface. The window view here can be any view capable of displaying the user interface provided by the video service, which is not limited by the present invention. This embodiment uses a window view as a surface view as an example for description.
在Android系统中,surfaceview具有独立的绘图表面,它不与其宿主窗口共享同一个绘图表面。由于具有独立的绘图表面,因此surfaceview的用户界面可在一个独立的线程中进行绘制,而且又不会占用主线程资源。surfaceview一方面可以实现复杂而高效的UI绘制,另一方面又不会导致用户输入得不到及时响应。因此,使用surfaceview作为窗口视图嵌入到悬浮窗中,可以实现复杂和高效的绘制。In the Android system, the surfaceview has a separate drawing surface that does not share the same drawing surface with its host window. With a separate drawing surface, the surfaceview user interface can be drawn in a separate thread without taking up the main thread resources. On the one hand, surfaceview can achieve complex and efficient UI rendering, on the other hand, it does not cause user input to be unable to respond in time. Therefore, using surfaceview as a window view embedded in a floating window enables complex and efficient drawing.
可选的,呈现模块330适于:控制窗口视图在绘图表面绘制视频流对应的视频界面。Optionally, the presentation module 330 is adapted to: control the window view to draw a video interface corresponding to the video stream on the drawing surface.
在将服务器提供的与频道标识对应的视频流传输给窗口视图之后,寄生工具包控制窗口视图在其绘图表面绘制视频流对应的视频界面,在所绘制的视频界面内显示视频流,实现了在呈现主应用的用户界面的同时在悬浮窗内播放视频流,以及在第二悬浮窗内呈现用户交互界面,在呈现主应用的用户界面的同时使得用户可以通过第二悬浮窗与其他用户进行交互,或者进行其他操作。After the video stream corresponding to the channel identifier provided by the server is transmitted to the window view, the parasitic toolkit controls the window view to draw a video interface corresponding to the video stream on the drawing surface thereof, and displays the video stream in the drawn video interface, thereby realizing Presenting the user interface of the main application while playing the video stream in the floating window, and presenting the user interaction interface in the second floating window, allowing the user to interact with other users through the second floating window while presenting the user interface of the main application , or do other things.
可选的,创建模块300适于:根据用户触发的视频播放模式的设置行为,创建具有控制面板的第一悬浮窗。Optionally, the creating module 300 is adapted to: create a first floating window with a control panel according to a setting behavior of a video playing mode triggered by the user.
可选的,该装置还包括:监测模块350,适于监测用户是否在第一悬浮窗上触发关闭第二悬浮窗;Optionally, the device further includes: a monitoring module 350, configured to monitor whether the user triggers to close the second floating window on the first floating window;
关闭模块360,适于在监测出用户在第一悬浮窗上触发关闭第二悬浮窗的情况下,关闭第二悬浮窗。The closing module 360 is adapted to close the second floating window in case the user is monitored to trigger the closing of the second floating window on the first floating window.
监测用户是否在第一悬浮窗的控制面板上触发关闭第二悬浮窗,主要是为了确定是否关闭第二悬浮窗,在监测到用户在控制面板上触发关闭画中画浮窗后,则可以控制关闭第二悬浮窗,停止提供相应的交互服务,若未监测到用户的触发行为,则继续保留第二悬浮窗,在第二悬浮窗内呈现用户交互界面,使得用户可以根据需求通过第二悬浮窗与其他用户进行交互,或者进行其他操作。Monitoring whether the user triggers the closing of the second floating window on the control panel of the first floating window, mainly to determine whether to close the second floating window, and after controlling to trigger the user to close the picture-in-picture floating window on the control panel, The second floating window is closed, and the corresponding interactive service is stopped. If the triggering behavior of the user is not monitored, the second floating window is retained, and the user interaction interface is presented in the second floating window, so that the user can pass the second floating according to the requirement. The window interacts with other users or performs other operations.
根据本发明上述实施例提供的装置,通过创建第一悬浮窗和第二悬浮窗,设置第一悬浮窗和第二悬浮窗的布局参数,并依据所设置的布局参数对第一悬浮窗和第二悬浮窗进行布局及展现,实现了视频播放模式的设置,而且能 够在呈现主应用的用户界面的同时播放视频,以及向用户提供交互服务,解决了用户只能单独使用其他应用或视频应用,而不能在操作其他应用时同时显示视频应用的界面、以及进行其他交互操作的缺陷,克服了现有技术中当需要操作其他应用或视频应用时,都需要切换到相应的应用,导致操作不便的问题,大大提高了用户操作的简便性,节省用户时间。According to the apparatus provided by the above embodiment of the present invention, the first floating window and the second floating window are set, the layout parameters of the first floating window and the second floating window are set, and the first floating window and the first floating window are determined according to the set layout parameters. The two floating windows are arranged and displayed to realize the setting of the video playing mode, and It is enough to play the video while presenting the user interface of the main application, and provide interactive services to the user, which solves the problem that the user can only use other applications or video applications separately, but can not simultaneously display the interface of the video application while operating other applications, and other The shortcoming of the interaction overcomes the problem that the prior art needs to switch to the corresponding application when it needs to operate other applications or video applications, resulting in inconvenient operation, greatly improving the convenience of the user operation and saving user time.
在此提供的算法和显示不与任何特定计算机、虚拟系统或者其它设备固有相关。各种通用系统也可以与基于在此的示教一起使用。根据上面的描述,构造这类系统所要求的结构是显而易见的。此外,本发明也不针对任何特定编程语言。应当明白,可以利用各种编程语言实现在此描述的本发明的内容,并且上面对特定语言所做的描述是为了披露本发明的最佳实施方式。The algorithms and displays provided herein are not inherently related to any particular computer, virtual system, or other device. Various general purpose systems can also be used with the teaching based on the teachings herein. The structure required to construct such a system is apparent from the above description. Moreover, the invention is not directed to any particular programming language. It is to be understood that the invention may be embodied in a variety of programming language, and the description of the specific language has been described above in order to disclose the preferred embodiments of the invention.
在此处所提供的说明书中,说明了大量具体细节。然而,能够理解,本发明的实施例可以在没有这些具体细节的情况下实践。在一些实例中,并未详细示出公知的方法、结构和技术,以便不模糊对本说明书的理解。In the description provided herein, numerous specific details are set forth. However, it is understood that the embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures, and techniques are not shown in detail so as not to obscure the understanding of the description.
类似地,应当理解,为了精简本公开并帮助理解各个发明方面中的一个或多个,在上面对本发明的示例性实施例的描述中,本发明的各个特征有时被一起分组到单个实施例、图、或者对其的描述中。然而,并不应将该公开的方法解释成反映如下意图:即所要求保护的本发明要求比在每个权利要求中所明确记载的特征更多的特征。更确切地说,如下面的权利要求书所反映的那样,发明方面在于少于前面公开的单个实施例的所有特征。因此,遵循具体实施方式的权利要求书由此明确地并入该具体实施方式,其中每个权利要求本身都作为本发明的单独实施例。Similarly, the various features of the invention are sometimes grouped together into a single embodiment, in the above description of the exemplary embodiments of the invention, Figure, or a description of it. However, the method disclosed is not to be interpreted as reflecting the intention that the claimed invention requires more features than those recited in the claims. Rather, as the following claims reflect, inventive aspects reside in less than all features of the single embodiments disclosed herein. Therefore, the claims following the specific embodiments are hereby explicitly incorporated into the embodiments, and each of the claims as a separate embodiment of the invention.
本领域那些技术人员可以理解,可以对实施例中的设备中的模块进行自适应性地改变并且把它们设置在与该实施例不同的一个或多个设备中。可以把实施例中的模块或单元或组件组合成一个模块或单元或组件,以及此外可以把它们分成多个子模块或子单元或子组件。除了这样的特征和/或过程或者单元中的至少一些是相互排斥之外,可以采用任何组合对本说明书(包括伴随的权利要求、摘要和附图)中公开的所有特征以及如此公开的任何方法或者设备的所有过程或单元进行组合。除非另外明确陈述,本说明书(包括伴随的权利要求、摘要和附图)中公开的每个特征可以由提供相同、等同或相似目的的替代特征来代替。 Those skilled in the art will appreciate that the modules in the devices of the embodiments can be adaptively changed and placed in one or more devices different from the embodiment. The modules or units or components of the embodiments may be combined into one module or unit or component, and further they may be divided into a plurality of sub-modules or sub-units or sub-components. In addition to such features and/or at least some of the processes or units being mutually exclusive, any combination of the features disclosed in the specification, including the accompanying claims, the abstract and the drawings, and any methods so disclosed, or All processes or units of the device are combined. Each feature disclosed in this specification (including the accompanying claims, the abstract and the drawings) may be replaced by alternative features that provide the same, equivalent or similar purpose.
此外,本领域的技术人员能够理解,尽管在此所述的一些实施例包括其它实施例中所包括的某些特征而不是其它特征,但是不同实施例的特征的组合意味着处于本发明的范围之内并且形成不同的实施例。例如,在下面的权利要求书中,所要求保护的实施例的任意之一都可以以任意的组合方式来使用。In addition, those skilled in the art will appreciate that, although some embodiments described herein include certain features that are included in other embodiments and not in other features, combinations of features of different embodiments are intended to be within the scope of the present invention. Different embodiments are formed and formed. For example, in the following claims, any one of the claimed embodiments can be used in any combination.
本发明的各个部件实施例可以以硬件实现,或者以在一个或者多个处理器上运行的软件模块实现,或者以它们的组合实现。本领域的技术人员应当理解,可以在实践中使用微处理器或者数字信号处理器(DSP)来实现根据本发明实施例的利用寄生工具包实现的视频播放模式设置设备中的一些或者全部部件的一些或者全部功能。本发明还可以实现为用于执行这里所描述的方法的一部分或者全部的设备或者装置程序(例如,计算机程序和计算机程序产品)。这样的实现本发明的程序可以存储在计算机可读介质上,或者可以具有一个或者多个信号的形式。这样的信号可以从因特网网站上下载得到,或者在载体信号上提供,或者以任何其他形式提供。The various component embodiments of the present invention may be implemented in hardware, or in a software module running on one or more processors, or in a combination thereof. Those skilled in the art will appreciate that a microprocessor or digital signal processor (DSP) may be used in practice to implement some or all of the components of the video playback mode setting device implemented with a parasitic toolkit in accordance with an embodiment of the present invention. Some or all of the features. The invention can also be implemented as a device or device program (e.g., a computer program and a computer program product) for performing some or all of the methods described herein. Such a program implementing the invention may be stored on a computer readable medium or may be in the form of one or more signals. Such signals may be downloaded from an Internet website, provided on a carrier signal, or provided in any other form.
例如,图4示出了可以实现根据本发明的利用寄生工具包实现的视频播放模式设置方法的计算设备。该计算设备传统上包括处理器410和以存储器420形式的程序产品或者可读介质。存储器420可以是诸如闪存、EEPROM(电可擦除可编程只读存储器)、EPROM或者ROM之类的电子存储器。存储器420具有用于执行上述方法中的任何方法步骤的程序代码431的存储空间430。例如,用于程序代码的存储空间430可以包括分别用于实现上面的方法中的各种步骤的各个程序代码431。这些程序代码可以从一个或者多个程序产品中读出或者写入到这一个或者多个程序产品中。这些程序产品包括诸如存储卡之类的程序代码载体。这样的程序产品通常为如参考图5所述的便携式或者固定存储单元。该存储单元可以具有与图4的计算设备中的存储器420类似布置的存储段、存储空间等。程序代码可以例如以适当形式进行压缩。通常,存储单元包括可读代码431’,即可以由例如诸如410之类的处理器读取的代码,这些代码当由计算设备运行时,导致该计算设备执行上面所描述的方法中的各个步骤。For example, FIG. 4 illustrates a computing device that can implement a video play mode setting method implemented using a parasitic toolkit in accordance with the present invention. The computing device conventionally includes a processor 410 and a program product or readable medium in the form of a memory 420. Memory 420 can be an electronic memory such as a flash memory, EEPROM (Electrically Erasable Programmable Read Only Memory), EPROM, or ROM. Memory 420 has a memory space 430 for program code 431 for performing any of the method steps described above. For example, storage space 430 for program code may include various program code 431 for implementing various steps in the above methods, respectively. These program codes can be read from or written to one or more program products. These program products include program code carriers such as memory cards. Such a program product is typically a portable or fixed storage unit as described with reference to FIG. The storage unit may have storage segments, storage spaces, and the like that are similarly arranged to memory 420 in the computing device of FIG. The program code can be compressed, for example, in an appropriate form. Typically, the storage unit includes readable code 431', ie, code that can be read by a processor, such as 410, which, when executed by a computing device, causes the computing device to perform various steps in the methods described above. .
应该注意的是上述实施例对本发明进行说明而不是对本发明进行限制,并且本领域技术人员在不脱离所附权利要求的范围的情况下可设计出替换实施例。在权利要求中,不应将位于括号之间的任何参考符号构造成对权利要求 的限制。单词“包含”不排除存在未列在权利要求中的元件或步骤。位于元件之前的单词“一”或“一个”不排除存在多个这样的元件。本发明可以借助于包括有若干不同元件的硬件以及借助于适当编程的计算机来实现。在列举了若干装置的单元权利要求中,这些装置中的若干个可以是通过同一个硬件项来具体体现。单词第一、第二、以及第三等的使用不表示任何顺序。可将这些单词解释为名称。It is to be noted that the above-described embodiments are illustrative of the invention and are not intended to be limiting, and that the invention may be devised without departing from the scope of the appended claims. In the claims, any reference signs between parentheses shall not be limits. The word "comprising" does not exclude the presence of the elements or steps that are not recited in the claims. The word "a" or "an" The invention can be implemented by means of hardware comprising several distinct elements and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means can be embodied by the same hardware item. The use of the words first, second, and third does not indicate any order. These words can be interpreted as names.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分步骤可以通过程序来指令相关的硬件来完成,该程序可以存储于一计算机可读取存储介质中,比如ROM/RAM、磁碟、光盘等。One of ordinary skill in the art can understand that all or part of the steps of implementing the foregoing embodiments may be completed by a program to instruct related hardware, and the program may be stored in a computer readable storage medium, such as a ROM/RAM or a disk. , CD, etc.
以上所述的具体实施例,对本发明的目的、技术方案和有益效果进行了进一步详细说明,所应理解的是,以上所述仅为本发明的具体实施例而已,并不用于限定本发明的保护范围,凡在本发明的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。 The above described specific embodiments of the present invention are further described in detail, and are intended to be illustrative of the embodiments of the present invention. All modifications, equivalent substitutions, improvements, etc., made within the spirit and scope of the invention are intended to be included within the scope of the invention.

Claims (18)

  1. 一种利用寄生工具包实现的视频播放模式设置方法,其中,所述寄生工具包与主应用预先绑定,以提供在所述主应用的用户界面中播放视频以及设置视频播放模式的功能,所述方法包括:A video play mode setting method implemented by using a parasitic toolkit, wherein the parasitic toolkit is pre-bound with a main application to provide a function of playing a video and setting a video play mode in a user interface of the main application, The methods include:
    根据用户触发的视频播放模式的设置行为,创建第一悬浮窗和第二悬浮窗,并设置所述第一悬浮窗和第二悬浮窗的布局参数,以及,在第一悬浮窗内嵌入视频播放器;Forming a first floating window and a second floating window according to a setting behavior of the video playing mode triggered by the user, and setting layout parameters of the first floating window and the second floating window, and embedding the video playing in the first floating window Device
    依据所述第一悬浮窗和第二悬浮窗的布局参数对第一悬浮窗和第二悬浮窗进行布局及展现;Arranging and displaying the first floating window and the second floating window according to layout parameters of the first floating window and the second floating window;
    在呈现所述主应用的用户界面的同时在所述第一悬浮窗内播放视频服务器提供的视频流,以及在所述第二悬浮窗内呈现用户交互界面。Playing a video stream provided by the video server in the first floating window while presenting the user interface of the main application, and presenting a user interaction interface in the second floating window.
  2. 根据权利要求1所述的方法,其中,所述方法还包括:The method of claim 1 wherein the method further comprises:
    根据用户触发的移动第一悬浮窗和第二悬浮窗的行为,修改所述第一悬浮窗和第二悬浮窗的窗口位置参数,根据修改后的窗口位置参数对所述第一悬浮窗和第二悬浮窗进行布局及展现。Modifying the window position parameters of the first floating window and the second floating window according to the behavior of the first floating window and the second floating window triggered by the user, and the first floating window and the first window according to the modified window position parameter Two floating windows for layout and presentation.
  3. 根据权利要求1或2所述的方法,其中,所述视频播放器通过窗口视图来实现;The method of claim 1 or 2, wherein the video player is implemented by a window view;
    所述在第一悬浮窗内嵌入视频播放器包括:在第一悬浮窗内嵌入窗口视图,创建窗口视图的绘图表面。The embedding the video player in the first floating window includes embedding a window view in the first floating window to create a drawing surface of the window view.
  4. 根据权利要求3所述的方法,其中,所述在第一悬浮窗内播放视频服务器提供的视频流包括:控制所述窗口视图在绘图表面绘制所述视频流对应的视频界面。The method of claim 3, wherein the playing the video stream provided by the video server in the first floating window comprises: controlling the window view to draw a video interface corresponding to the video stream on the drawing surface.
  5. 根据权利要求3或4所述的方法,其中,所述窗口视图为surfaceview视图。The method of claim 3 or 4, wherein the window view is a surfaceview view.
  6. 根据权利要求1-5任一项所述的方法,其中,所述根据用户触发的视频播放模式的设置行为,创建第一悬浮窗,包括:The method according to any one of claims 1-5, wherein the creating a first floating window according to a setting behavior of a user-triggered video playing mode comprises:
    根据用户触发的视频播放模式的设置行为,创建具有控制面板的第一悬浮窗。 A first floating window having a control panel is created according to a setting behavior of a video playback mode triggered by the user.
  7. 根据权利要求6所述的方法,其中,所述方法还包括:The method of claim 6 wherein the method further comprises:
    监测用户是否在第一悬浮窗上触发关闭所述第二悬浮窗;Monitoring whether the user triggers closing the second floating window on the first floating window;
    若是,则关闭所述第二悬浮窗。If so, the second floating window is closed.
  8. 根据权利要求1-7任一项所述的方法,其中,第一悬浮窗为视频播放悬浮窗,第二悬浮窗为聊天悬浮窗。The method according to any one of claims 1 to 7, wherein the first floating window is a video playback floating window and the second floating window is a chat floating window.
  9. 一种利用寄生工具包实现的视频播放模式设置装置,其中,所述寄生工具包与主应用预先绑定,以提供在所述主应用的用户界面中播放视频以及设置视频播放模式的功能,所述装置包括:A video play mode setting apparatus implemented by using a parasitic toolkit, wherein the parasitic toolkit is pre-bound with a main application to provide a function of playing a video and setting a video play mode in a user interface of the main application, The device includes:
    创建模块,适于根据用户触发的视频播放模式的设置行为,创建第一悬浮窗和第二悬浮窗,并设置所述第一悬浮窗和第二悬浮窗的布局参数;a creating module, configured to create a first floating window and a second floating window according to a setting behavior of a video playing mode triggered by the user, and set layout parameters of the first floating window and the second floating window;
    嵌入模块,适于在第一悬浮窗内嵌入视频播放器;An embedded module adapted to embed a video player in the first floating window;
    布局展现模块,适于依据所述第一悬浮窗和第二悬浮窗的布局参数对第一悬浮窗和第二悬浮窗进行布局及展现;The layout display module is adapted to layout and display the first floating window and the second floating window according to the layout parameters of the first floating window and the second floating window;
    呈现模块,适于在呈现所述主应用的用户界面的同时在所述第一悬浮窗内播放视频服务器提供的视频流,以及在所述第二悬浮窗内呈现用户交互界面。And a presentation module adapted to play the video stream provided by the video server in the first floating window while presenting the user interface of the main application, and present a user interaction interface in the second floating window.
  10. 根据权利要求9所述的装置,其中,所述装置还包括:修改模块,适于根据用户触发的移动第一悬浮窗和第二悬浮窗的行为,修改所述第一悬浮窗和第二悬浮窗的窗口位置参数;The apparatus of claim 9, wherein the apparatus further comprises: a modification module adapted to modify the first floating window and the second suspension according to a behavior of the user-triggered movement of the first floating window and the second floating window Window position parameter of the window;
    所述布局展现模块适于:根据修改后的窗口位置参数对所述第一悬浮窗和第二悬浮窗进行布局及展现。The layout presentation module is adapted to: layout and display the first floating window and the second floating window according to the modified window position parameter.
  11. 根据权利要求9或10所述的装置,其中,所述视频播放器通过窗口视图来实现;The apparatus according to claim 9 or 10, wherein said video player is implemented by a window view;
    所述嵌入模块适于:在第一悬浮窗内嵌入窗口视图,创建窗口视图的绘图表面。The embedding module is adapted to: embed a window view in the first floating window to create a drawing surface of the window view.
  12. 根据权利要求11所述的装置,其中,所述呈现模块适于:控制所述窗口视图在绘图表面绘制所述视频流对应的视频界面。The apparatus of claim 11, wherein the rendering module is adapted to: control the window view to render a video interface corresponding to the video stream on a drawing surface.
  13. 根据权利要求11或12所述的装置,其中,所述窗口视图为surfaceview 视图。The apparatus according to claim 11 or 12, wherein said window view is a surfaceview view.
  14. 根据权利要求9-13任一项所述的装置,其中,所述创建模块适于:根据用户触发的视频播放模式的设置行为,创建具有控制面板的第一悬浮窗。The apparatus according to any one of claims 9 to 13, wherein the creation module is adapted to: create a first floating window having a control panel according to a setting behavior of a user-triggered video playback mode.
  15. 根据权利要求14所述的装置,其中,所述装置还包括:监测模块,适于监测用户是否在第一悬浮窗上触发关闭所述第二悬浮窗;The apparatus of claim 14, wherein the apparatus further comprises: a monitoring module adapted to monitor whether the user triggers the closing of the second floating window on the first floating window;
    关闭模块,适于在监测出用户在所述第一悬浮窗上触发关闭所述第二悬浮窗的情况下,关闭所述第二悬浮窗。The closing module is adapted to close the second floating window in case the user is monitored to trigger the closing of the second floating window on the first floating window.
  16. 根据权利要求9-15任一项所述的装置,其中,第一悬浮窗为视频播放悬浮窗,第二悬浮窗为聊天悬浮窗。The apparatus according to any one of claims 9-15, wherein the first floating window is a video playback floating window and the second floating window is a chat floating window.
  17. 一种计算机程序,包括计算机可读代码,当所述可读代码在计算设备上运行时,导致所述计算设备执行根据权利要求1-8中的任一个所述的利用寄生工具包实现的视频播放模式设置方法。A computer program comprising computer readable code causing the computing device to perform a video implemented using a parasitic toolkit according to any one of claims 1-8 when the readable code is run on a computing device Play mode setting method.
  18. 一种计算机可读介质,其中存储了如权利要求17所述的程序。 A computer readable medium storing the program of claim 17.
PCT/CN2017/090365 2016-06-27 2017-06-27 Video play mode setting method, device, program and medium WO2018001246A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610482856.6A CN105915993B (en) 2016-06-27 2016-06-27 The video play mode setting method and device realized using parasitic kit
CN201610482856.6 2016-06-27

Publications (1)

Publication Number Publication Date
WO2018001246A1 true WO2018001246A1 (en) 2018-01-04

Family

ID=56759775

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/090365 WO2018001246A1 (en) 2016-06-27 2017-06-27 Video play mode setting method, device, program and medium

Country Status (2)

Country Link
CN (1) CN105915993B (en)
WO (1) WO2018001246A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116708900A (en) * 2022-11-17 2023-09-05 荣耀终端有限公司 Video playing method and electronic equipment

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105915993B (en) * 2016-06-27 2019-03-01 北京奇虎科技有限公司 The video play mode setting method and device realized using parasitic kit
CN106502540B (en) * 2016-10-26 2020-02-25 北京奇虎科技有限公司 Method and device for customizing functions in main application interface by using floating window
CN106604104A (en) * 2016-12-22 2017-04-26 惠州Tcl移动通信有限公司 Method and system for controlling moving of video on comment exchange interface based on mobile terminal
CN109246466B (en) * 2018-10-30 2021-06-11 北京达佳互联信息技术有限公司 Video playing method and device and electronic equipment
CN109348278A (en) * 2018-12-05 2019-02-15 未来电视有限公司 Interface display control method and interface display control equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
WO2016035926A1 (en) * 2014-09-02 2016-03-10 Lg Electronics Inc. Digital device for copying digital contents by screen overlap and controlling method thereof
CN105554553A (en) * 2015-12-15 2016-05-04 腾讯科技(深圳)有限公司 Method and device for playing video through floating window
CN105554424A (en) * 2015-12-24 2016-05-04 北京奇虎科技有限公司 Method and apparatus for video playing in application
CN105915993A (en) * 2016-06-27 2016-08-31 北京奇虎科技有限公司 Method and device for setting video playing mode by using parasitic toolkit

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103049258A (en) * 2012-12-10 2013-04-17 乐视网信息技术(北京)股份有限公司 Method and system for controlling video playing based on android operating system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016035926A1 (en) * 2014-09-02 2016-03-10 Lg Electronics Inc. Digital device for copying digital contents by screen overlap and controlling method thereof
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
CN105554553A (en) * 2015-12-15 2016-05-04 腾讯科技(深圳)有限公司 Method and device for playing video through floating window
CN105554424A (en) * 2015-12-24 2016-05-04 北京奇虎科技有限公司 Method and apparatus for video playing in application
CN105915993A (en) * 2016-06-27 2016-08-31 北京奇虎科技有限公司 Method and device for setting video playing mode by using parasitic toolkit

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116708900A (en) * 2022-11-17 2023-09-05 荣耀终端有限公司 Video playing method and electronic equipment
CN116708900B (en) * 2022-11-17 2024-03-22 荣耀终端有限公司 Video playing method and electronic equipment

Also Published As

Publication number Publication date
CN105915993B (en) 2019-03-01
CN105915993A (en) 2016-08-31

Similar Documents

Publication Publication Date Title
WO2018001246A1 (en) Video play mode setting method, device, program and medium
WO2018001218A1 (en) Video playing method, device, program and medium
WO2018001202A1 (en) Video playback mode switching method, device, program and medium
US10908703B2 (en) User terminal device and method for controlling the user terminal device thereof
WO2018001201A1 (en) Video push method, device, program and medium
TWI601128B (en) Computer-implemented method and system of speech recognition for context switching
US9851862B2 (en) Display apparatus and displaying method for changing a cursor based on a user change of manipulation mode
WO2017041557A1 (en) Display control method and apparatus
US20200099960A1 (en) Video Stream Based Live Stream Interaction Method And Corresponding Device
US9619019B2 (en) Display apparatus with a plurality of screens and method of controlling the same
US10067666B2 (en) User terminal device and method for controlling the same
KR102318610B1 (en) Mobile device and displaying method thereof
WO2019015643A1 (en) Display control method and apparatus for game picture, and electronic device and storage medium
JP2015515039A5 (en) Power efficient application notification system
RU2619089C2 (en) Method and device for multiple videos reproduction
CN105573484B (en) A kind of projecting method and terminal
KR20170035502A (en) Display apparatus and Method for controlling the display apparatus thereof
JP6434197B1 (en) Controller and method for controlling light source
CN109726539B (en) Application starting method, device, terminal and storage medium
KR20140055486A (en) Display apparatus and method for controlling display apparatus thereof
EP3760009B1 (en) Resuming a dynamic light effect in dependence on an effect type and/or user preference
CN107870672A (en) Virtual reality scenario realizes the method, apparatus and readable storage medium storing program for executing of menuboard
KR20180028320A (en) Display apparatus and controlling method thereof
WO2021128929A1 (en) Image rendering method for panorama application, and terminal device
EP2821910A1 (en) Method for disabling a locking screen by selecting colors and rotation directions and electronic device using the method

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17819243

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17819243

Country of ref document: EP

Kind code of ref document: A1