Video playing method and device, equipment, storage medium and program product

By synchronously starting the video player in the background of the system and moving it to the floating window when the floating window playback function is triggered, the problem of long startup time and interruption of the video floating window playback is solved, and a smoother video playback experience is achieved.

CN119342288APending Publication Date: 2025-01-21TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202310877699.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-07-18
Publication Date
2025-01-21

AI Technical Summary

Technical Problem

In the prior art, video floating window playback has problems with long startup time and interruption when the video application retreats to the backend of the system, which affects the playback effect of the video floating window playback function.

Method used

When the target video playback is activated in the application player, the synchronous video playback is activated in the system player running in the background of the system, and the system player moves from the background to the suspended window when the suspension window playback function trigger is detected. Show, and replace the playback of synchronous video as the target video playback.

Benefits of technology

It reduces the startup time of floating window playback, avoids playback interruption when the video application retreats to the system background, and improves the playback effect of the video floating window playback function.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119342288A_ABST
    Figure CN119342288A_ABST
Patent Text Reader

Abstract

The invention provides a video playing method and device, equipment, a storage medium and a program product. The embodiment of the invention can be applied to video playing scenes of video application, live broadcast application and the like; the method comprises the following steps: in response to starting of playing of a target playing video in an application player, starting playing of a synchronous playing video corresponding to the target playing video in a system player running in a system background; wherein the application player is a player provided by a video application, and the system player is a player provided by an operating system; in response to the floating window playing function pulled up for the target playing video, carrying out floating display on a system player; and replacing the playing of the synchronous playing video by the system player with the playing of the target playing video to finish the floating window playing of the target playing video. According to the invention, the playing effect of the floating window playing function of the video can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to video processing technology, and in particular to a video playback method, device, equipment, storage medium and program product. Background Art

[0002] With the development of video applications, more and more video applications can provide users with floating window playback functions, that is, playing in the floating window of the display interface to achieve a "picture-in-picture" effect, so that users can watch videos while operating other application software. However, in the related art, when playing videos in floating windows, there are problems such as long startup time of floating window playback and interruption of floating window playback when the video application exits to the system background, thereby affecting the playback effect of the video floating window playback function. Summary of the invention

[0003] Embodiments of the present application provide a video playback method, device, electronic device, computer-readable storage medium, and computer program product, which can improve the playback effect of a floating window playback function of a video.

[0004] The technical solution of the embodiment of the present application is implemented as follows:

[0005] The present application provides a video playback method, including:

[0006] In response to starting the playback of the target playback video in the application player, starting the playback of the synchronous playback video corresponding to the target playback video in the system player running in the system background;

[0007] The application player refers to a player provided by a video application, and the system player refers to a player provided by an operating system;

[0008] In response to pulling up a floating window playback function for the target playback video, the system player is suspended and displayed;

[0009] The system player's playback of the synchronous playback video is replaced by the playback of the target playback video, completing the floating window playback of the target playback video.

[0010] The embodiment of the present application provides a video playback device, including:

[0011] A start control module is used to start playing the synchronous play video corresponding to the target play video in the system player running in the system background in response to starting the play of the target play video in the application player; wherein the application player refers to the player provided by the video application, and the system player refers to the player provided by the operating system;

[0012] A display processing module, configured to perform floating display on the system player in response to pulling up a floating window playback function for the target playback video;

[0013] The playback control module is used to replace the playback of the synchronous playback video by the system player with the playback of the target playback video, thereby completing the floating window playback of the target playback video.

[0014] In some embodiments of the present application, the playback control module is also used to decode the encoded data of the target playback video through the application player to obtain the video frame to be played of the target playback video; replace the video frame of the synchronous playback video of the system player with the video frame to be played of the target playback video; and render and play the video frame to be played through the system player.

[0015] In some embodiments of the present application, the floating window playback function is pulled up for the target playback video, and is determined by the following processing: in response to a triggering operation of a floating window playback identifier in a player interface of the application player, determining to pull up the floating window playback function for the target playback video;

[0016] The display processing module is also used to create a floating window in the player interface in response to pulling up the floating window playback function for the target playback video, and complete the floating display of the system player by displaying the system player in the floating window.

[0017] In some embodiments of the present application, the floating window playback function is pulled up for the target playback video, and is determined by the following processing: in response to a triggering operation of switching the application player to the system background for running, determining to pull up the floating window playback function for the target playback video;

[0018] The display processing module is also used to create a floating window in the application interface currently in the foreground of the operating system in response to pulling up the floating window playback function for the target playback video, and complete the floating display of the system player by displaying the system player in the floating window.

[0019] In some embodiments of the present application, the video playback device also includes: a video construction module, which is used to start the system player in the system background in response to the start of the target playback video in the application player; and use the default playback video of the system player to construct the synchronous playback video corresponding to the target playback video.

[0020] In some embodiments of the present application, the video construction module is also used to determine the number of spliced ​​default playback videos based on the ratio of the duration information of the target playback video to the duration information of the default playback video; wherein the duration information of the target playback video is greater than the duration information of the default playback video; splicing the spliced ​​number of default playback videos to obtain an initial spliced ​​video corresponding to the target playback video; and adjusting the aspect ratio of the initial spliced ​​video based on the picture ratio information of the target playback video to obtain the synchronized playback video corresponding to the target playback video.

[0021] In some embodiments of the present application, the playback control module is further used to stop playing the synchronous playback video in the system player in response to stopping playing the target playback video in the application player.

[0022] In some embodiments of the present application, the playback control module is also used to synchronously adjust the playback parameters of the synchronized playback video in the system player in response to adjusting the playback parameters of the target playback video in the application player; wherein the playback parameters include at least one of the playback progress and the playback speed.

[0023] In some embodiments of the present application, the playback control module is further used to synchronously adjust the playback parameters of the target playback video in the application player in response to adjusting the playback parameters of the target playback video in the system player.

[0024] In some embodiments of the present application, the playback control module is further used to respond to exiting the floating window playback function for the target playback video and continue to play the target playback video using the application player.

[0025] An embodiment of the present application provides an electronic device, including:

[0026] A memory for storing computer executable instructions;

[0027] The processor is used to implement the video playback method provided in the embodiment of the present application when executing the computer executable instructions stored in the memory.

[0028] An embodiment of the present application provides a computer-readable storage medium storing computer-executable instructions for causing a processor to execute and implement the video playback method provided in the embodiment of the present application.

[0029] An embodiment of the present application provides a computer program product, including a computer program or computer executable instructions, which, when executed by a processor, can implement the video playback method provided in the embodiment of the present application.

[0030] The embodiments of the present application have the following beneficial effects: when the electronic device starts video playback in the application player, the video playback of the system player running in the system background will be synchronized, that is, the application player and the system player start video playback synchronously. In this way, when the electronic device pulls up the floating window playback function for the target video, the floating window playback is directly performed using the system player that has been created and is in a normal playback state, which reduces the startup time of the floating window playback and can quickly enter the floating window playback. At the same time, because the system player is provided by the operating system and can run in the system background, even when the video application retreats to the system background, the uninterrupted playback of the target video can be guaranteed. It can be seen that the embodiments of the present application reduce the startup time of the floating window playback, eliminate the interruption problem of the floating window playback when the video application retreats to the system background, and improve the playback effect of the floating window function of the video. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] Figure 1 It is a schematic diagram of the architecture of the video playback system provided in an embodiment of the present application;

[0032] Figure 2 The embodiment of this application provides Figure 1 A schematic diagram of the structure of the terminal in FIG.

[0033] Figure 3 This is a schematic diagram of the process of the video playback method provided in the embodiment of the present application. Figure 1 ;

[0034] Figure 4 This is a schematic diagram of the process of the video playback method provided in the embodiment of the present application. Figure 2 ;

[0035] Figure 5 This is a schematic diagram of the process of the video playback method provided in the embodiment of the present application. Figure 3 ;

[0036] Figure 6 It is a schematic diagram of the implementation process of picture-in-picture playback provided in an embodiment of the present application;

[0037] Figure 7 is a schematic diagram illustrating the decoding and rendering separation technology provided in an embodiment of the present application;

[0038] Figure 8 is a schematic diagram of a method for keeping the playback progress of a system player the same as that of a private player provided in an embodiment of the present application;

[0039] Fig. 9 It is a schematic diagram of a method for keeping the playback progress of a private player the same as that of a system player, provided in an embodiment of the present application. DETAILED DESCRIPTION

[0040] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings. The described embodiments should not be regarded as limiting the present application. All other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of this application.

[0041] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it can be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0042] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.

[0043] Before further describing the embodiments of the present application in detail, the nouns and terms involved in the embodiments of the present application are explained. The nouns and terms involved in the embodiments of the present application are subject to the following interpretations.

[0044] 1) A floating window refers to a window that can float on the display interface to open another application different from the current application. The floating window can move on the display interface in response to a user's dragging operation.

[0045] 2) The floating window playback function refers to playing a video in a displayed floating window. In this way, the electronic device can support playing a video while providing the user with operation responses about other applications.

[0046] 3) System background refers to the background of the operating system of the electronic device. It can be understood that the programs running in the system background are usually invisible to the user.

[0047] 4) Playback parameters refer to parameters for adjusting the playback process of the video, such as parameters for adjusting the playback speed, parameters for adjusting the playback progress, etc.

[0048] 5) In response to a condition or state on which the executed operation depends, when the dependent condition or state is met, one or more operations executed may be in real time or may have a set delay; unless otherwise specified, there is no restriction on the order of execution of the multiple operations executed.

[0049] With the development of video applications, more and more video applications can provide users with a floating window playback function, that is, playing in a floating window of the display interface to achieve a "picture-in-picture" effect, so that users can watch videos while operating other application software.

[0050] In the related art, the floating window playback function provided by the video application can be implemented through the following three solutions. The first is to implement the floating window playback function of the video through a custom floating window, that is, when the user clicks the floating window playback button, the electronic device creates a floating window and plays the video in the floating window. At this time, the floating window floats on the top layer of the display interface, and the position of the floating window can be adjusted by dragging, and the size of the floating window can be adjusted by stretching conditions. However, in this way, when the video application retreats to the system background, for example, when the user returns to the system main interface from the video application interface, the floating window can no longer be retained. Therefore, the floating window playback function implemented based on this method can only be used when the video application is in the system foreground.

[0051] The second is to implement the floating window interface provided by the operating system. At this time, when the user clicks the floating window play button or retreats the video application to the background, the electronic device will use the floating window interface provided by the operating system to implement the floating window play function. However, the floating window interface provided by the operating system is limited to being called by the system player provided by the operator. For other players, such as the application player provided by the video application installed by the user, the floating window interface cannot be called, and thus the floating window play function cannot be entered.

[0052] The third is to use the application player provided by the video application (the application player can only be available after the video application is installed in the operating system, and can be understood as the private player of the video application) to play the video. When the electronic device detects that the user clicks the floating window play button, it will immediately create a system player and call the floating window interface provided by the operating system to enter the floating window play state. At this time, the electronic device will pause the application player. When the user exits the floating window play function and returns to the normal play mode, the electronic device will turn off the system player and adjust the progress of the application player to the current play position to start playing. However, the creation and start-up loading of the system player both require a certain amount of time to be realized. Therefore, when the user clicks the floating window play button, it takes a certain amount of time to wait for the creation and start-up loading of the system player, that is, the floating window playback function cannot be quickly realized. At the same time, in this way, when the user returns the video application to the system background, because the pulled-up floating window does not support calling when the video application is in the system background, the electronic device needs to re-create the system player when the user returns the video application to the background, and then call the floating window interface to re-suspend the display for the system player, so that the video playback will be interrupted.

[0053] To sum up, although the third method in the related technology solves the problems existing in the first and second methods, the third method still has the problem of long startup time of floating window playback and interruption of floating window playback when the video application exits to the system background, thereby affecting the playback effect of the floating window playback function of the video.

[0054] The embodiments of the present application provide a video playback method, device, electronic device, computer-readable storage medium, and computer program product, which can improve the playback effect of the floating window playback function of the video. The following describes an exemplary application of the electronic device provided by the embodiments of the present application. The electronic device provided by the embodiments of the present application can be implemented as a terminal or as a server. The following describes an exemplary application when the electronic device is implemented as a terminal.

[0055] See also Figure 1 , Figure 1 1 is a schematic diagram of the architecture of the video playback system provided in the embodiment of the present application. To realize supporting a video playback application, in the video playback system 100, the terminal 400 (exemplarily showing the terminal 400-1 and the terminal 400-2) is connected to the server 200 via the network 300, and the network 300 can be a wide area network or a local area network, or a combination of the two. In the video playback system 100, a database 500 is also provided for providing data support to the server 200. Among them, the database 500 can be independent of the server 200, and can also be configured in the server 200. Figure 1The illustrated case is that the database 500 is independent of the server 200 .

[0056] Terminal 400-1 and terminal 400-2 are respectively used to obtain the target playback video from server 200 through network 300; in response to the user starting the playback of the target playback video in the application player of graphical interface 410-1 and graphical interface 410-2, in the system player running in the system background, the playback of the synchronous playback video corresponding to the target playback video is started; wherein, the application player refers to the player provided by the video application, and the system player refers to the player provided by the operating system; in response to pulling up the floating window playback function for the target playback video, the system player is displayed in a floating manner; the playback of the synchronous playback video by the system player is replaced by the playback of the target playback video, thereby completing the floating playback of the target playback video.

[0057] The server 200 is used to send the target playback video to the terminal 400 - 1 and the terminal 400 - 2 through the network 300 .

[0058] The embodiments of the present application can be implemented with the help of cloud technology. Cloud technology refers to a hosting technology that unifies a series of resources such as hardware, software, and network in a wide area network or a local area network to achieve data computing, storage, processing, and sharing.

[0059] Cloud computing is a general term for network technology, information technology, integration technology, management platform, and application technology based on the cloud computing business model. It can form a resource pool, which is used on demand and flexible and convenient. Cloud computing technology will become an important support. The system background services of the technical network require a large amount of computing and storage resources, which need to be realized through cloud computing.

[0060] Exemplarily, the server 200 may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The terminal 400 may be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, a smart home appliance, a car terminal, etc., but is not limited thereto. The terminal and the server may be directly or indirectly connected via wired or wireless communication, which is not limited in the embodiments of the present application.

[0061] See also Figure 2 , Figure 2 The embodiment of this application provides Figure 1 A schematic diagram of the structure of a terminal (an implementation of an electronic device) in FIG. Figure 2The terminal 400 shown includes: at least one processor 410, a memory 450, at least one network interface 420 and a user interface 430. The various components in the terminal 400 are coupled together via a bus system 440. It is understood that the bus system 440 is used to achieve connection and communication between these components. In addition to the data bus, the bus system 440 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, the bus system 440 is not shown in FIG. Figure 2 Various buses are labeled as bus system 440 .

[0062] Processor 410 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc., where the general-purpose processor can be a microprocessor or any conventional processor, etc.

[0063] The user interface 430 includes one or more output devices 431 that enable presentation of media content, including one or more speakers and / or one or more visual display screens. The user interface 430 also includes one or more input devices 432, including user interface components that facilitate user input, such as a keyboard, mouse, microphone, touch screen display, camera, other input buttons and controls.

[0064] The memory 450 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state memory, hard disk drives, optical disk drives, etc. The memory 450 may optionally include one or more storage devices that are physically remote from the processor 410.

[0065] The memory 450 includes a volatile memory or a non-volatile memory, and may also include both volatile and non-volatile memories. The non-volatile memory may be a read-only memory (ROM), and the volatile memory may be a random access memory (RAM). The memory 450 described in the embodiments of the present application is intended to include any suitable type of memory.

[0066] In some embodiments, memory 450 can store data to support various operations, examples of which include programs, modules, and data structures, or a subset or superset thereof, as exemplarily described below.

[0067] Operating system 451, including system programs for processing various basic system services and performing hardware-related tasks, such as a framework layer, a core library layer, a driver layer, etc., for implementing various basic services and processing hardware-based tasks;

[0068] A network communication module 452, for reaching other computing devices via one or more (wired or wireless) network interfaces 420, exemplary network interfaces 420 include: Bluetooth, Wireless Compatibility Authentication (WiFi), and Universal Serial Bus (USB);

[0069] a presentation module 453 for enabling presentation of information via one or more output devices 431 (e.g., display screen, speaker, etc.) associated with the user interface 430 (e.g., a user interface for operating peripherals and displaying content and information);

[0070] The input processing module 454 is used to detect one or more user inputs or interactions from one of the one or more input devices 432 and translate the detected inputs or interactions.

[0071] In some embodiments, the video playback device provided in the embodiments of the present application can be implemented in software. Figure 2 The video playback device 455 stored in the memory 450 is shown, which can be software in the form of a program and a plug-in, etc., including the following software modules: a startup control module 4551, a display processing module 4552, a playback control module 4553 and a video construction module 4554. These modules are logical, so they can be arbitrarily combined or further split according to the functions implemented. The functions of each module will be described below.

[0072] In other embodiments, the video playback device provided in the embodiments of the present application can be implemented in hardware. As an example, the video playback device provided in the embodiments of the present application can be a processor in the form of a hardware decoding processor, which is programmed to execute the video playback method provided in the embodiments of the present application. For example, the processor in the form of a hardware decoding processor can adopt one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field programmable gate arrays (FPGAs), or other electronic components.

[0073] In some embodiments, a terminal or a server (both are possible implementations of electronic devices) can implement the video playback method provided in the embodiments of the present application by running a computer program. For example, the computer program can be a native program or software module in the operating system; it can be a native application (APP, Application), that is, a program that needs to be installed in the operating system to run, such as a live broadcast APP or a video APP; it can also be a small program, that is, a program that can be run only by downloading it to a browser environment; it can also be a small program that can be embedded in any APP. In short, the above-mentioned computer program can be an application, module or plug-in in any form.

[0074] The embodiment of the present application can be applied to video playback scenarios of video applications, live broadcast applications, etc. The following describes the video playback method provided by the embodiment of the present application. As mentioned above, the electronic device implementing the video playback method of the embodiment of the present application can be a terminal, a server, or a combination of the two.

[0075] See also Figure 3 , Figure 3 This is a schematic diagram of the process of the video playback method provided in the embodiment of the present application. Figure 1 , will combine Figure 3 The steps shown are explained.

[0076] S101. In response to starting the playback of a target playback video in an application player, starting the playback of a synchronous playback video corresponding to the target playback video in a system player running in the system background.

[0077] The embodiment of the present application is implemented in the scenario of realizing the floating window playback function for the target playback video. In the embodiment of the present application, the electronic device first detects whether the user starts the playback of the target playback video in the application player. When the electronic device detects that the user starts the playback process of the target playback video in the application player, it will not only present the target playback video in the application player, but also synchronously start the playback of the synchronous playback video corresponding to the target playback video in the system player, wherein the system player runs in the system background, that is, the system player is currently invisible to the user.

[0078] That is to say, when the electronic device determines that the user starts playing the target video in the application player, it will use the system server embedded in the system background to start playing the synchronous video corresponding to the target video, but the synchronous video is not visible to the user.

[0079] It should be noted that the application player refers to the player provided by the video application, and the system player refers to the player provided by the operating system. Therefore, when the user exits the video application, the application player can no longer continue to run, while the system player can continue to run in the system background.

[0080] The target playback video refers to any video that the user needs to play, and the length of the target playback video can be known or unknown. For example, the target playback video can be a video of known length such as a variety show video or a movie video provided on a video application, or a video of unknown length such as a live stream provided on a video application, which is not limited in the embodiments of the present application.

[0081] Synchronous playback video is used to keep the system player in normal playback state. That is, when the target video is played in the application player, in order to provide the system player to the user at any time and avoid the time required for the system player to start, it is necessary to ensure that the system player is in normal playback state during this period, that is, the system player can be pulled up to the system foreground at any time, that is, the application interface. Therefore, it is necessary to use synchronous playback video to ensure the playback state of the system player.

[0082] In the embodiment of the present application, the parameters of the synchronously played video can be the same as those of the target played video, such as the same duration and size, or different from the target played video, such as the duration is longer than the target played video, the size is smaller than the target played video, etc., which is not limited in the embodiment of the present application. The screen of the synchronously played video can be a video with a pure black screen, so that the user has no perception of its playback, or it can be other videos, such as videos recorded by the user, etc., which is not limited in the embodiment of the present application.

[0083] In an embodiment of the present application, the electronic device can determine that it is necessary to start playing the target video in the application player when the user selects to load and play the target video in the application player, or it can determine that it is necessary to start playing the target video in the application player when the target video is first selected through a long press, double click, etc., and the application player is selected from different players.

[0084] S102: In response to pulling up a floating window playback function for a target playback video, a system player is displayed in a floating manner.

[0085] After the electronic device starts playing the target video in the application player and starts playing the synchronized video in the system player, it will detect whether the user triggers the floating window playback function for the target video. When the electronic device detects the trigger operation, it will determine that the user needs to enter the floating window playback function to play the target video. At this time, the electronic device will respond to the trigger operation, that is, in response to pulling up the floating window playback function for the target video, it will create a floating window on the display interface and move the system player from the system background to the floating window, thereby realizing the floating display of the system player.

[0086] It should be noted that the display interface for creating the floating window is associated with the method of pulling up the floating window play function. That is, the display interface for creating the floating window is different depending on the method of pulling up the floating window play function.

[0087] In some embodiments of the present application, the function of pulling up a floating window to play the target video can be determined by the following processing: in response to a trigger operation of a floating window playback identifier in a player interface of an application player, determining to pull up a floating window to play the target video.

[0088] That is to say, when the electronic device detects that the user has triggered the floating window playback identifier set in the player interface of the application player, it will determine that the user needs to enter the floating window playback function, and will also determine to pull up the floating window playback function for the target video.

[0089] In this case, Figure 3 S102, i.e., in response to pulling up the floating window playback function for the target video, the system player is displayed in a floating manner, which can be achieved by the following processing: in response to pulling up the floating window playback function for the target video, a floating window is created in the player interface, and the system player is displayed in the floating window to complete the floating display of the system player.

[0090] That is, the display interface currently used to create the floating window is the player interface of the application player itself. The electronic device creates a floating window in the player interface by calling the floating window interface, and moves the system player from the system background to the floating window for display, so that the system player changes from an invisible state to a visible state, thereby realizing the floating display of the system player.

[0091] In other embodiments of the present application, whether to pull up a floating window playback function for a target video can also be determined through the following processing: in response to a triggering operation of switching an application player to the system background for running, determining to pull up a floating window playback function for the target video.

[0092] Among them, the trigger operation of switching the application player to the system background for running may refer to a trigger operation of returning to the main interface of the operating system (for example, pressing the Home button), or it may refer to a trigger operation of switching other applications to the foreground for running (for example, clicking other applications in the list of applications running in the system background). The embodiments of the present application are not limited here.

[0093] In this case, Figure 3 S102, i.e., in response to pulling up the floating window playback function for the target video, the system player is displayed in a floating manner, can also be achieved by the following processing: in response to pulling up the floating window playback function for the target video, a floating window is created in the application interface currently in the foreground of the operating system, and the system player is displayed in the floating window to complete the floating display of the system player.

[0094] That is to say, when the electronic device switches the application player to the system background for operation, it will call the floating window interface, create a floating window on the upper layer of the application interface of the application currently in the foreground of the operating system, and then move the system player to the created floating window for display, thereby realizing the floating display of the system player. Among them, the application currently in the foreground of the operating system is determined according to the user's selection, which can be the desktop interface of the operating system or the interface of an application such as social software specified by the user, which is not limited in the embodiments of the present application.

[0095] It can be understood that in the embodiments of the present application, the electronic device can determine to pull up the floating window playback function for the target video in two different ways, and can display the system player in a floating manner on the corresponding display interface, so that the floating window playback function can be realized regardless of whether the video application is in the foreground of the operating system or the video application is running in the background of the system, which increases the usage scenarios of the floating window playback function.

[0096] S103: Replace the playback of the synchronously played video by the system player with the playback of the target played video, thereby completing the suspended playback of the target played video.

[0097] After the electronic device completes the floating display of the system player, it will use the target playback video to replace the synchronized playback video currently being played by the system player, thereby realizing the use of the system player to continue playing the target playback video. In this way, the target playback video can be played in a floating window.

[0098] See also Figure 4 , Figure 4 This is a schematic diagram of the process of the video playback method provided in the embodiment of the present application. Figure 2 In some embodiments of the present application, Figure 3 In S103, replacing the playing of the synchronously played video by the system player with the playing of the target played video can also be achieved by the following processing:

[0099] S1031. Decode the encoded data of the target video by applying a player to obtain a to-be-played video frame of the target video.

[0100] In the embodiment of the present application, the electronic device replaces the playback of the synchronous playback video by the system player with the playback of the target playback video through a decoding and rendering separation scheme. In more detail, the electronic device will first use the application player to decode the video frames that need to be played later from the encoded data of the target playback video, that is, the video frames to be played (that is, the video frames that have not been played in the target playback video when the video frames to be played are played). It should be noted that in the embodiment of the present application, after the electronic device uses the application player to decode the video frames to be played of the target playback video, it will not continue to use the application player to render the obtained video frames to be played, but will render them through the system player.

[0101] S1032: Replace the video frames of the synchronously played video of the system player with the to-be-played video frames of the target played video.

[0102] When an electronic device uses a system player to play a synchronously played video, it actually uses the system player to decode the encoded data of the synchronously played video to obtain the video frame of the synchronously played video, and then uses the system player to render and play the decoded video frame of the synchronously played video. In the embodiment of the present application, in order to replace the playback of the synchronously played video in the system player with the playback of the target playback video, the electronic device will use the to-be-played video frame of the target playback video to replace the video frame of the synchronously played video, that is, the to-be-played video frame of the target playback video is transferred from the application player to the system player, and the to-be-played video frame of the target playback video is used to overwrite the video frame of the synchronously played video waiting to be rendered in the application player. In this way, the subsequent rendering object of the application player will be changed from the video frame of the synchronously played video to the to-be-played video frame of the target playback video.

[0103] S1033: Render and play the video frame to be played through the system player.

[0104] The electronic device renders the to-be-played video frames of the transmitted target video through the system player, and displays them when the rendering is completed. In this way, the synchronously played video in the system player is replaced by the target video through the decoding and rendering separation of the target video. And because the process is replaced with the granularity of the video frame, the user can be unaware of the switching process of the target video. Moreover, the system player renders and plays the video frames of the target video that have not been played, but does not render and play the video frames that have been played, so that the system player starts from the current playback progress and continues to play the target video, thereby ensuring the uninterrupted playback of the target video.

[0105] In other embodiments of the present application, Figure 3 Replacing the playback of the synchronous playback video by the system player with the playback of the target playback video in S103 can also be achieved through the following processing: extracting an undecoded part from the encoded data of the target playback video; transmitting the undecoded part to the system player; decoding the undecoded part by the system player to obtain the to-be-played video frame of the target playback video, and rendering and playing the to-be-played video frame by the system player.

[0106] The undecoded part of the coded data corresponds to the video frame that has not been played in the target video. In other words, the electronic device can directly extract the undecoded part of the coded data and directly provide it to the system player, which is responsible for decoding, rendering and playing the undecoded part, thereby replacing the playback of the synchronously played video with the playback of the target video.

[0107] It is understandable that, compared with the related art, due to the long startup time of the floating window playback, there is a problem of interruption in the floating window playback, resulting in poor playback effect of the floating window playback function of the video. In the embodiment of the present application, when the electronic device starts the video playback in the application player, it will synchronize the video playback of the system player running in the system background, that is, the application player and the system player start the video playback synchronously. In this way, when the electronic device pulls up the floating window playback function for the target playback video, the floating window playback is directly performed using the system player that has been created and is in a normal playback state, which reduces the startup time of the floating window playback, and can quickly enter the floating window playback. At the same time, since the system player is provided by the operating system and can run in the system background, even when the video application retreats to the system background, it can ensure uninterrupted playback of the target playback video. It can be seen that the embodiment of the present application reduces the startup time of the floating window playback, eliminates the interruption problem of the floating window playback when the video application retreats to the system background, and improves the playback effect of the floating window function of the video.

[0108] based on Figure 3 , see Figure 5 , Figure 5 This is a schematic diagram of the process of the video playback method provided in the embodiment of the present application. Figure 3 In some embodiments of the present application, before S101, that is, in response to starting the playback of the target playback video in the application player, before starting the playback of the synchronous playback video corresponding to the target playback video in the system player running in the system background, the method may further include the following processing:

[0109] S104: In response to the start of loading of the target video in the application player, a system player is started in the system background.

[0110] When the electronic device starts playing and loading the target video in the application player, it will simultaneously create a system player in the system background and start the operation of the system player. The starting and loading of the target video may include a process of pulling the encoding data of the target video from the cloud, or a process of reading the encoding data of the target video from the storage space.

[0111] S105: Using the default playback video of the system player, construct a synchronous playback video corresponding to the target playback video.

[0112] The default playback video refers to the default video configured for the system player, that is, under normal circumstances, the system player should play the video by default after startup. In order to ensure that the system player is in a normal playback state while the application player is playing the target playback video, it is necessary to set a synchronous playback video corresponding to the target playback video. In the embodiment of the present application, the electronic device will use the default playback video set by the system player to construct a corresponding synchronous playback video for the target playback video.

[0113] In some embodiments of the present application, Figure 5 S105, i.e., using the default playback video of the system player to construct a synchronous playback video corresponding to the target playback video, can be achieved by the following processing: determining the number of spliced ​​default playback videos based on the ratio of the duration information of the target playback video to the duration information of the default playback video; splicing the spliced ​​number of default playback videos to obtain an initial spliced ​​video corresponding to the target playback video; adjusting the aspect ratio of the initial spliced ​​video based on the picture ratio information of the target playback video to obtain a synchronous playback video corresponding to the target playback video.

[0114] The electronic device will first obtain the duration information of the target playback video, and then compare the duration information of the target playback video with the duration information of the default playback video to obtain the ratio of the duration information of the two videos, and according to the ratio, determine how many default playback videos are needed, and can splice to obtain a video with the same duration as the duration of the target playback video, and this number is the number of splicing of the default playback video. After that, the electronic device will splice the default playback videos of the splicing number in the time dimension, so as to realize the use of multiple default playback videos with shorter durations, and the splicing is called a video with a longer duration. At this time, the video obtained is the initial splicing video. Finally, in order to keep the screen ratio of the target playback video unchanged during the floating window playback function, the electronic device will also obtain the screen ratio information (such as aspect ratio, screen size, etc.) of the target playback video itself, and then adjust the screen ratio of the obtained initial splicing video according to the screen ratio information, so that the adjusted video has the same screen ratio as the target playback video, and the adjusted video is the synchronous playback video. That is to say, in the embodiment of the present application, the synchronous playback video has the same duration as the target playback video and the same screen ratio.

[0115] It should be noted that, in order to facilitate video splicing, the duration information of the target playback video will be greater than the duration information of the default playback video, that is, the duration of the default playback video needs to be as short as possible and convenient for splicing. For example, a pure black silent video with a duration of 1 second can be selected as the default playback video, based on which target playback videos of various lengths can be spliced.

[0116] In some embodiments of the present application, Figure 3 After S101, that is, in response to starting the playback of the target playback video in the application player, after starting the playback of the synchronous playback video corresponding to the target playback video in the system player running in the system background, the method may also include the following processing: in response to stopping the playback of the target playback video in the application player, stopping the playback of the synchronous playback video in the system player.

[0117] In order to synchronize the playback state of the synchronized video with the playback state of the target video, when the electronic device detects that the user stops playing the target video in the application player, the playback of the synchronized video in the system player will be stopped synchronously. Stopping the playback of the target video in the application player may refer to pausing the playback of the target video or terminating, that is, exiting the playback of the target video.

[0118] In some embodiments of the present application, Figure 3After S101, that is, in response to starting the playback of the target playback video in the application player, after starting the playback of the synchronized playback video corresponding to the target playback video in the system player running in the system background, the method may also include the following processing: in response to adjusting the playback parameters of the target playback video in the application player, synchronously adjusting the playback parameters of the synchronized playback video in the system player.

[0119] That is, when the electronic device detects that the user adjusts the playback parameters of the target playback video in the application player, in order to synchronize the playback status of the synchronized playback video with the playback status of the target playback video, the electronic device will synchronously adjust the playback parameters of the system player so that the synchronized playback video and the target playback video are played with the same playback parameters.

[0120] It should be noted that in the embodiment of the present application, the playback parameter includes at least one of the playback progress and the playback speed. The electronic device can determine that the user needs to adjust the playback parameters of the target video when it detects that the user drags the playback progress bar of the target video in the application player, or triggers the fast forward, fast rewind, etc. buttons; the electronic device can determine that the user needs to adjust the playback speed of the target video when it detects that the user selects a certain speed provided by the speed menu in the application player.

[0121] It can be understood that in the embodiment of the present application, when the user operates the playback status of the target playback video in the application player, the electronic device can correspondingly operate the playback parameters of the synchronized playback video in the system player to keep the playback status of the synchronized playback video consistent with the playback status of the target playback video. In this way, if the system player is subsequently displayed in a floating manner, it can ensure that the progress bar of the system player is consistent with the progress bar of the application player, thereby helping to improve the playback effect of the floating window playback function.

[0122] In some embodiments of the present application, Figure 3 After S103, that is, after replacing the playback of the synchronous playback video by the system player with the playback of the target playback video and completing the floating window playback of the target playback video, the method may further include the following processing: in response to adjusting the playback parameters of the target playback video in the system player, synchronously adjusting the playback parameters of the target playback video in the application player.

[0123] After the electronic device replaces the playback of the synchronously played video by the system player with the playback of the target played video, if it detects that the user adjusts the playback parameters of the target played video in the system player, such as adjusting the playback progress of the target played video, or adjusting the playback speed of the target played video, not only the playback parameters of the target played video in the system player will be adjusted, but also the playback parameters of the target played video in the application player will be adjusted synchronously. In this way, the electronic device can ensure that the playback status of the target played video in the application player is the same as the playback status of the target played video in the system player, so that when the user exits the floating window playback function and returns to the application player using the video application to play the target played video, the original playback status can be kept unchanged, that is, when the user switches to the application player to play the target played video, playback interruption, playback progress change, etc. can be avoided.

[0124] In some embodiments of the present application, Figure 3 After S103, that is, after replacing the playback of the synchronously played video by the system player with the playback of the target played video and completing the floating window playback of the target played video, the method may further include the following processing: in response to exiting the floating window playback function for the target played video, using the application player to continue playing the target played video.

[0125] That is, when the electronic device determines that the user needs to play the target video and exit the floating window playback function, the electronic device will re-run the video application in the foreground of the operating system and continue to use the application player provided by the video application to play the target video. The electronic device can determine that the user needs to exit the floating window playback function when detecting that the user triggers the close button of the floating window.

[0126] The following is an explanation of an exemplary application of the embodiments of the present application in a practical application scenario.

[0127] The embodiment of the present application is implemented in a scenario where a terminal (referred to as an electronic device) performs picture-in-picture playback (referred to as a floating window playback function) on a video (referred to as a target playback video).

[0128] First, the principle of implementing picture-in-picture playback in the embodiment of the present application is explained.

[0129] In an embodiment of the present application, when the private player (called the application player) of the video playback APP starts playing, a system player will be started immediately, and a silent pure black video (called the synchronous playback video) will be silently played in the background through the system player, and the picture-in-picture controller in the operating system, such as AVPictureInPictureController, will be initialized. Based on the system player and the picture-in-picture controller, a small picture-in-picture window (called a floating window) can be pulled up through the interface provided by the operating system (called a floating window interface) or by exiting the background. The small picture-in-picture window is used to display the video rendered by the system player. In an embodiment of the present application, the frame data decoded by the private player (called the video frame to be played) can be replaced with the system player for rendering, thereby realizing the use of the picture-in-picture window of the operating system to play the picture played by the private player.

[0130] That is to say, after the private player starts playing, the embodiment of the present application can quickly pull up the picture-in-picture window by pre-embedding the system player in the background (for some operating systems, the picture-in-picture window is a system function and can only be pulled up by the system player provided by the operating system), and through the decoding and rendering separation scheme, the system player presents the frame data decoded by the private player in the picture-in-picture window to achieve a picture-in-picture effect.

[0131] Next, the picture-in-picture playback process implemented in the embodiment of the present application is described.

[0132] See also Figure 6 , Figure 6It is a schematic diagram of the implementation process of the picture-in-picture playback provided by the embodiment of the present application. First, before starting the picture-in-picture playback, it is necessary to store a 1s long, pure black silent video (called the default playback video) locally. When the private player completes the start-up loading 6-1 and reaches the playable state 6-2, the terminal will start a system player in the background, and use the locally stored 1s long silent black video to construct a new video with the same length and aspect ratio as the video played by the private player (called the application player), and enable the system player to start loading the constructed new video 6-3. At the same time, the terminal initializes the picture-in-picture controller 6-4. Afterwards, when the private player starts playing 6-5, the terminal will make the system player start playing synchronously 6-6; when the private player pauses playing 6-7, the terminal will make the system player pause playing synchronously 6-8; when the private player adjusts the playing progress 6-9, the terminal will make the system player adjust the playing progress synchronously 6-10; when the private player sets the playing speed 6-11, the terminal will also make the system player set the playing speed synchronously 6-12; when the private player stops playing 6-13, the terminal will also make the system player stop playing synchronously 6-14. It should be noted that when the user starts playing 6-6, pauses playing 6-8, and adjusts the playing progress 6-10 of the system player in the picture-in-picture window, the terminal will also start playing 6-5, pause playing 6-7, and adjust the playing progress 6-9 of the private player synchronously.

[0133] Continue to see Figure 6, when the user clicks the "enter picture-in-picture" button (called the floating window playback identifier) ​​6-15 on the player UI (player interface) of the private player, the terminal will call the method to start the picture-in-picture in the picture-in-picture controller (for example, the startPictureInpicture method) 6-16 to pull out the small picture-in-picture window; when the private player exits the background, as long as the "automatic picture-in-picture after exiting the background" function is turned on in the terminal 6-17, the terminal will call the method to start the picture-in-picture in the picture-in-picture controller (the startPictureInpicture method) 6-18 to pull out the small picture-in-picture window. When the small picture-in-picture window is about to appear, that is, when the picture-in-picture controller receives a message that the picture-in-picture function is about to be started (for example, the pictureInPictureControllerWillStartPictureInPicture message) 6-19, the private player will enter the decoding and rendering separation state 6-20, that is, the private player performs decoding, and the system player renders the frame data decoded by the private player. When the user clicks "Exit Picture-in-Picture" in the Picture-in-Picture window, that is, when the Picture-in-Picture controller receives a message to stop the Picture-in-Picture function (such as pictureInPictureControllerDidStopPictureInPicture message) 6-21, the terminal will exit the decoding and rendering separation state 6-22, call the Picture-in-Picture controller's method to stop the Picture-in-Picture (such as the stopPictureInpicture method), and close the Picture-in-Picture window.

[0134] It should be noted that in the decoding and rendering separation state, each frame of the system player will be replaced by the video frame decoded by the private player before rendering, and the video frame decoded by the system player itself (called the video frame of the synchronous playback video) will be discarded.

[0135] For example, Figure 7 is a schematic diagram illustrating the decoding and rendering separation technology provided in the embodiment of the present application. Figure 7In conventional technology, when playing a video, the private player 7-1 will decapsulate 7-12 the video source (called encoded data) 7-11, and then perform audio decoding 7-13 and audio frame rendering 7-14, as well as video decoding 7-15 and video frame rendering 7-16. In the decoding and rendering separation technology, the private player 7-2 will also decapsulate 7-22 the video source 7-21, and then perform audio decoding 7-23 and audio frame rendering 7-24, but after performing video decoding 7-25, the video frame rendering will no longer continue, and the system player 7-3 will perform video frame rendering 7-31. Before the video frame rendering 7-31, the system player 7-3 will decapsulate 7-33 and perform video decoding 7-34 on the video source 7-32, that is, the local pure black video, but the video frame data at this time will not participate in the video frame rendering 7-31.

[0136] It should also be noted that in order to make the aspect ratio of the picture-in-picture consistent with that of the private player, the terminal needs to obtain the aspect ratio of the video loaded by the private player (called the aspect ratio information) after the private player starts loading, and call the ratio reset interface to reset the aspect ratio of the locally stored video. At the same time, when the private player starts loading, the terminal will obtain the total duration of the video loaded by the private player (called duration information), call the video splicing interface, and use the locally stored silent black video with a duration of 1s to splice it into the above-mentioned video with the same total duration. In addition, it is also important to use a progress synchronization mechanism to ensure that the playback progress of the private player and the system player is always consistent.

[0137] For example, Figure 8 Schematic diagram of a method for keeping the playback progress of a system player the same as that of a private player provided by an embodiment of the present application. Figure 8 When the private player starts playing 8-1, the terminal will control the system player to start playing 8-2; when the private player pauses playing 8-3, the terminal will synchronously control the system player to pause playing 8-4; when the private player adjusts the playing progress 8-5, the terminal will synchronously control the system player to adjust the playing progress 8-6; when the private player sets the playing speed 8-7, the terminal will synchronously control the system player to set the playing speed 8-8; when the private player stops playing 8-9, the terminal will synchronously control the system player to stop playing 8-10.

[0138] In the embodiment of the present application, the picture-in-picture window is opened by the system player, so the buttons such as "start playing", "pause playing", "fast forward", and "fast rewind" in the picture-in-picture window directly control the system player instead of the private player. Therefore, in order to control the private player through the buttons in the picture-in-picture window, the terminal needs to detect the playing state and playing progress of the system player to adjust the playing state and playing progress of the private player accordingly.

[0139] For example, Fig. 9 It is a schematic diagram of a method for keeping the playback progress of a private player the same as that of a system player provided in an embodiment of the present application. When the terminal detects that the user clicks the "Start Play" button in the picture-in-picture window, causing the system player to start playback 9-1, the private player will be synchronously controlled to start playback 9-2; when the terminal detects that the user clicks the "Pause Play" button in the picture-in-picture window, causing the system player to pause playback 9-3, the private player will be synchronously controlled to pause playback 9-4; when the terminal detects that the user clicks the "Fast Forward" or "Fast Rewind" button in the picture-in-picture window to adjust the playback progress 9-5, the private player will be synchronously controlled to adjust the playback progress 9-6. In this way, it is possible to ensure that the playback progress of the private player is consistent with that of the system player.

[0140] It is understandable that in the embodiments of the present application, when user information is involved, such as target playback video and other related data, when the embodiments of the present application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of relevant countries and regions. In addition, in the embodiments of the present application, the implementation of the data capture technical solution involved, when the above embodiments of the present application are applied to specific products or technologies, the relevant data collection, use and processing process should comply with the requirements of national laws and regulations, comply with the principles of legality, legitimacy and necessity, do not involve the acquisition of data types prohibited or restricted by laws and regulations, and will not hinder the normal operation of related applications.

[0141] The following is a description of an exemplary structure of the video playback device 455 provided in the embodiment of the present application implemented as a software module. In some embodiments, Figure 2 As shown, the software modules stored in the video playback device 455 of the memory 450 may include:

[0142] The start control module 4551 is used for starting the playing of the synchronous playing video corresponding to the target playing video in the system player running in the system background in response to starting the playing of the target playing video in the application player; wherein the application player refers to the player provided by the video application, and the system player refers to the player provided by the operating system;

[0143] The display processing module 4552 is used for performing a floating display on the system player in response to pulling up a floating window playback function for the target playback video;

[0144] The playback control module 4553 is used to replace the playback of the synchronous playback video by the system player with the playback of the target playback video, thereby completing the floating window playback of the target playback video.

[0145] In some embodiments of the present application, the playback control module 4553 is also used to decode the encoded data of the target playback video through the application player to obtain the video frame to be played of the target playback video; replace the video frame of the synchronous playback video of the system player with the video frame to be played of the target playback video; and render and play the video frame to be played through the system player.

[0146] In some embodiments of the present application, the floating window playback function is pulled up for the target playback video, and is determined by the following processing: in response to a triggering operation of a floating window playback identifier in a player interface of the application player, determining to pull up the floating window playback function for the target playback video;

[0147] The display processing module 4552 is also used to create a floating window in the player interface in response to pulling up the floating window playback function for the target playback video, and complete the floating display of the system player by displaying the system player in the floating window.

[0148] In some embodiments of the present application, the floating window playback function is pulled up for the target playback video, and is determined by the following processing: in response to a triggering operation of switching the application player to the system background for running, determining to pull up the floating window playback function for the target playback video;

[0149] The display processing module 4552 is also used to create a floating window in the application interface currently in the foreground of the operating system in response to pulling up the floating window playback function for the target playback video, and complete the floating display of the system player by displaying the system player in the floating window.

[0150] In some embodiments of the present application, the video playback device 455 also includes: a video construction module 4554, which is used to start the system player in the system background in response to the start of the target playback video in the application player; and use the default playback video of the system player to construct the synchronous playback video corresponding to the target playback video.

[0151] In some embodiments of the present application, the video construction module 4554 is also used to determine the number of spliced ​​default playback videos based on the ratio of the duration information of the target playback video to the duration information of the default playback video; wherein the duration information of the target playback video is greater than the duration information of the default playback video; splicing the spliced ​​number of default playback videos to obtain an initial spliced ​​video corresponding to the target playback video; and adjusting the aspect ratio of the initial spliced ​​video based on the picture ratio information of the target playback video to obtain the synchronized playback video corresponding to the target playback video.

[0152] In some embodiments of the present application, the playback control module 4553 is further used to stop playing the synchronous playback video in the system player in response to stopping playing the target playback video in the application player.

[0153] In some embodiments of the present application, the playback control module 4553 is also used to synchronously adjust the playback parameters of the synchronized playback video in the system player in response to adjusting the playback parameters of the target playback video in the application player; wherein the playback parameters include at least one of the playback progress and the playback speed.

[0154] In some embodiments of the present application, the playback control module 4553 is further used to synchronously adjust the playback parameters of the target playback video in the application player in response to adjusting the playback parameters of the target playback video in the system player.

[0155] In some embodiments of the present application, the playback control module 4553 is further used to respond to exiting the floating window playback function for the target playback video and continue to play the target playback video using the application player.

[0156] The embodiment of the present application provides a computer program product, which includes a computer program or a computer executable instruction, and the computer program or the computer executable instruction is stored in a computer-readable storage medium. The processor of the electronic device reads the computer executable instruction from the computer-readable storage medium, and the processor executes the computer executable instruction, so that the electronic device executes the video playback method described in the embodiment of the present application.

[0157] The embodiment of the present application provides a computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, the processor will be caused to execute the video playback method provided by the embodiment of the present application, for example, Figure 3 The video playback method shown.

[0158] In some embodiments, the computer-readable storage medium may be a memory such as FRAM, ROM, PROM, EP ROM, EEPROM, flash memory, magnetic surface storage, optical disk, or CD-ROM; or it may be various devices including one or any combination of the above memories.

[0159] In some embodiments, computer executable instructions may be in the form of a program, software, software module, script or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine or other unit suitable for use in a computing environment.

[0160] As an example, computer-executable instructions may, but need not, correspond to a file in a file system, may be stored as part of a file storing other programs or data, such as in one or more scripts in a HyperText Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files storing one or more modules, subroutines, or code portions).

[0161] As an example, computer executable instructions may be deployed to be executed on one electronic device, or on multiple electronic devices located at one site, or on multiple electronic devices distributed at multiple sites and interconnected by a communication network.

[0162] To sum up, through the embodiments of the present application, when the electronic device pulls up the floating window playback function for the target video, the floating window playback is directly performed using the system player that has been created and is in a normal playback state, which reduces the startup time of the floating window playback and can quickly enter the floating window playback. At the same time, since the system player is provided by the operating system and can run in the system background, even when the video application is retreated to the system background, the uninterrupted playback of the target video can be guaranteed; the electronic device can ensure that the progress bar of the system player is consistent with the progress bar of the application player when the system player is displayed in a floating manner, which helps to improve the playback effect of the floating window playback function; the electronic device can keep the original playback state unchanged when exiting the floating window playback function and returning to using the application player of the video application to play the target video, that is, when the user switches to the application player to play the target video, playback interruption, playback progress change, etc. are avoided.

[0163] The above is only an embodiment of the present application and is not intended to limit the protection scope of the present application. Any modifications, equivalent substitutions and improvements made within the spirit and scope of the present application are included in the protection scope of the present application.

Claims

1. A video playback method, characterized in that: The method comprises: In response to starting the playback of the target playback video in the application player, starting the playback of the synchronous playback video corresponding to the target playback video in the system player running in the system background; The application player refers to a player provided by a video application, and the system player refers to a player provided by an operating system; In response to pulling up a floating window playback function for the target playback video, the system player is suspended and displayed; The system player's playback of the synchronous playback video is replaced by the playback of the target playback video, completing the floating window playback of the target playback video.

2. The method according to claim 1, characterized in that The step of replacing the playing of the synchronously played video by the system player with the playing of the target played video includes: Decoding the encoded data of the target video to obtain a to-be-played video frame of the target video through the application player; Replacing the video frame of the synchronously played video of the system player with the to-be-played video frame of the target played video; The video frame to be played is rendered and played through the system player.

3. The method according to claim 1 or 2, characterized in that: The floating window playback function is pulled up for the target playback video, and is determined by the following processing: In response to a triggering operation of a floating window play mark in a player interface of the application player, determining to pull up the floating window play function for the target play video; In response to pulling up a floating window playback function for the target playback video, the system player is suspended for display, including: In response to pulling up the floating window playback function for the target playback video, a floating window is created in the player interface, and the floating display of the system player is completed by displaying the system player in the floating window.

4. The method according to claim 1 or 2, characterized in that: The floating window playback function is pulled up for the target playback video, and is determined by the following processing: In response to a triggering operation of switching the application player to the system background for running, determining to pull up the floating window playback function for the target playback video; In response to pulling up a floating window playback function for the target playback video, the system player is suspended for display, including: In response to pulling up the floating window playback function for the target playback video, a floating window is created in the application interface currently in the foreground of the operating system, and the floating display of the system player is completed by displaying the system player in the floating window.

5. The method according to claim 1 or 2, characterized in that: In response to starting the playing of the target playing video in the application player, before starting the playing of the synchronous playing video corresponding to the target playing video in the system player running in the system background, the method further includes: In response to the start of loading of the target playback video in the application player, starting the system player in the system background; The default playback video of the system player is used to construct the synchronous playback video corresponding to the target playback video.

6. The method according to claim 5, characterized in that The step of utilizing the default playback video of the system player to construct the synchronous playback video corresponding to the target playback video includes: Determining the number of splicing of the default playback video according to the ratio of the duration information of the target playback video to the duration information of the default playback video; wherein the duration information of the target playback video is greater than the duration information of the default playback video; Splicing the spliced ​​number of default playback videos to obtain an initial spliced ​​video corresponding to the target playback video; According to the picture ratio information of the target playback video, the picture ratio of the initial spliced ​​video is adjusted to obtain the synchronous playback video corresponding to the target playback video.

7. The method according to claim 1 or 2, characterized in that: In response to starting the playing of the target playing video in the application player, after starting the playing of the synchronous playing video corresponding to the target playing video in the system player running in the system background, the method further includes: In response to stopping the playback of the target playback video in the application player, stopping the playback of the synchronous playback video in the system player.

8. The method according to claim 1 or 2, characterized in that: In response to starting the playing of the target playing video in the application player, after starting the playing of the synchronous playing video corresponding to the target playing video in the system player running in the system background, the method further includes: In response to adjusting the playback parameters of the target playback video in the application player, synchronously adjusting the playback parameters of the synchronous playback video in the system player; The playback parameters include at least one of playback progress and playback speed.

9. The method according to claim 1 or 2, characterized in that: After replacing the playing of the synchronously played video by the system player with the playing of the target played video and completing the floating window playing of the target played video, the method further includes: In response to adjusting the playback parameters of the target playback video in the system player, the playback parameters of the target playback video in the application player are synchronously adjusted.

10. The method according to claim 1 or 2, characterized in that: After replacing the playing of the synchronously played video by the system player with the playing of the target played video and completing the floating window playing of the target played video, the method further includes: In response to exiting the floating window playback function for the target playback video, the target playback video continues to be played using the application player.

11. A video playback device, characterized in that: The device comprises: A start control module is used to start playing the synchronous play video corresponding to the target play video in the system player running in the system background in response to starting the play of the target play video in the application player; wherein the application player refers to the player provided by the video application, and the system player refers to the player provided by the operating system; A display processing module, configured to perform floating display on the system player in response to pulling up a floating window playback function for the target playback video; The playback control module is used to replace the playback of the synchronous playback video by the system player with the playback of the target playback video, thereby completing the floating window playback of the target playback video.

12. An electronic device, characterized in that: The electronic device comprises: A memory for storing computer executable instructions; The processor is used to implement the video playback method according to any one of claims 1 to 10 when executing the computer executable instructions stored in the memory.

13. A computer-readable storage medium storing computer-executable instructions, characterized in that: When the computer executable instructions are executed by a processor, the video playback method according to any one of claims 1 to 10 is implemented.

14. A computer program product comprising a computer program or computer executable instructions, characterized in that: When the computer program or computer executable instruction is executed by a processor, the video playback method according to any one of claims 1 to 10 is implemented.

Citation Information

Cited By

  • Audio floating window playing control method and related device

    CN120144818A