Method for playing video based on fast application card, electronic equipment and storage medium
By introducing video playback function in the fast application card, using the VideoView component and player management module, the problem that fast application card can only display static images is solved, and rich video content display is realized, improving user experience.
Patent Information
- Application Number
- CN202510068797.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2023-09-27
- Filing Date
- 2024-03-14
- Publication Date
- 2025-05-27
AI Technical Summary
Existing fast application cards can only display static images, and the user application scenarios are limited, which cannot meet the needs of rich content display.
By introducing video playback function in the fast application card, using the VideoView component and the player management module, multiple display areas can play video content separately, and switch playing videos through user operations.
It realizes dynamic video display of fast application cards, enriches the content display form, improves user experience, and meets the needs of multimedia information display.
Smart Images

Figure CN120050458A_ABST
Abstract
Description
[0001] This application is a divisional application of a Chinese patent application submitted to the National Intellectual Property Administration on March 14, 2024, with the application number 202410294642.0 and the application title "Method, Electronic Device, and Storage Medium for Playing Videos Based on Quick Application Cards". Technical Field
[0002] This application relates to the field of terminal technologies, and in particular, to a method, an electronic device, and a storage medium for playing videos based on quick application cards. Background Art
[0003] Quick applications are a new type of mobile application form that can be used immediately without downloading and installing. Quick application cards can be embedded and displayed in native applications in various usage scenarios, such as: the negative first screen, the desktop, the quick service center, etc. Currently, quick application cards support displaying static images, and the user application scenarios are relatively limited. Summary of the Invention
[0004] This application provides a method, an electronic device, and a storage medium for playing videos based on quick application cards, which can display one or more video contents based on quick application cards, with richer display content and improved user experience.
[0005] In a first aspect, this application provides a method for playing videos based on quick application cards, which is applied to an electronic device. The method includes: displaying at least one card on the desktop, where the first card among the at least one card includes a first display area and a corresponding first VideoView component, and a second display area and a corresponding second VideoView component; receiving a first operation by the user on the second display area, where the first operation is an operation to trigger video playback; in response to the first operation, determining whether the second VideoView component is already associated with a player; in the case where it is determined that the second VideoView component is not associated with a player, determining whether other VideoView components in the first card are already associated with a player; in the case where it is determined that the first VideoView component is already associated with a first player, disassociating the first VideoView component from the first player and associating the second VideoView component with the first player; calling the first player through the second VideoView component to play a first video in the second display area.
[0006] Among them, the first card is a quick application card implemented by JavaScript, and such cards can be called JS cards.
[0007] The desktop supports displaying multiple video cards. Each card may include one or more display areas. Different display areas correspond to different VideoView components. Based on the VideoView component, the player may be called to display the video content in the corresponding display area.
[0008] It should be noted that the current Quick App Alliance limits the maximum number of videos (denoted as M) that can be played in the interface of the card host application such as the negative first screen / desktop / quick service center. For example, the maximum number of videos played M is 3. Since the current Quick App Alliance does not impose any restrictions on the playback of videos on the same card, in actual use, the same card may play multiple videos at the same time, affecting the user experience.
[0009] According to the method for playing videos based on quick application cards provided by the embodiment of the present application, the video card includes one or more display areas, which correspond to different VideoView components respectively. Based on the VideoView component, the player can be called to display the video content in the corresponding display area. When a user triggers a card to play a video, when it is determined that the VideoView component of the card is not associated with a player, it will be determined whether the card has occupied the player, so as to determine whether to reuse the player. In the case that a VideoView component of a card has occupied the player, the VideoView component is unbound from the player, and then another VideoView component of the card is bound to the player. In this way, the unbound VideoView component stops the original playback action, and the newly bound VideoView component uses the player to start a new playback of another video, thereby achieving the effect that a card can only play one video at a time, and the information display is more intuitive and controllable, thereby improving the user experience.
[0010] When the first video is played in the second display area, the first display area stops playing the video.
[0011] It should be noted that the current Quick App Alliance does not impose any restrictions on playing videos on the same card, and only controls the maximum number of videos played on one host (negative screen / desktop / quick service center) to 3. Through this application solution, for a quick app video card, only one video stream / live stream can be played at the same time, and the new video / live broadcast can be played directly, and the original content playback will be automatically stopped, making the video content display more intuitive and controllable.
[0012] Here, association can be understood as binding, and disassociation can be understood as unbinding or unbinding.
[0013] In the embodiments of the present application, each card may include one or more display areas, and each display area corresponds to a VideoView component, that is, each card may include one or more VideoView components. A VideoView component may be associated / bound to a player. The solution of the present application may include the following two application scenarios:
[0014] Scenario 1: The desktop includes multiple cards, and the multiple cards share three players. Since a VideoView component is associated / bound to a player, the VideoView components of each card will alternately occupy the players. In other words, the three players will be alternately associated and occupied by the VideoView components of different cards. It can be ensured that the maximum number of playing videos in the card host interfaces such as the negative first screen / desktop / quick service center is 3.
[0015] Scenario 2: For a card containing multiple display areas, each card may be bound to a player, and the player bound to the card can be reused by the VideoView components corresponding to different display areas.
[0016] In some embodiments, the present application determines whether a card has occupied a player through a HybridView object, so as to determine whether to reuse the player. Among them, the HybridView object may include multiple VideoView components, and the multiple VideoView components respectively correspond to different PlayerProxy.
[0017] In the embodiments of the present application, when performing the bind action through the PlayerProxy, the corresponding HybridView is obtained through the current Target (VideoView component), and whether there is a HybridView identical to the current Target is searched in the mInstances array. If the same exists, it is determined that the current card has been bound to a player.
[0018] In this case, the player bound to the current card is paused and the original PlayerProxy of the current card is set to be empty (i.e., the binding is released), and the current Target is pointed to the mTarget object of the original holder object (i.e., rebound), thereby realizing the reuse of the current card player and stopping the original playing content.
[0019] It can be understood that in the case where a VideoView component has been bound to a player, the bound player can be called through the VideoView component to play a video in the display area corresponding to the VideoView component.
[0020] In some possible implementation manners, the method provided by this application further includes: when it is determined that other VideoView components of the first card are not associated with a player, associating the second VideoView component with a second player that meets a preset condition; calling the second player through the second VideoView component to play the first video in the second display area.
[0021] Wherein, the first operation may be a click operation of the user on the second display area.
[0022] In some possible implementation manners, the above-mentioned second player is a player that has been associated and is in an idle state among the M players; or, when all the M players have been associated and are in an occupied state, the second player is the player that was associated earliest among the M players.
[0023] In some possible implementation manners, before associating the second VideoView component with a second player that meets a preset condition, the method provided by this application further includes: determining whether there is a player that has been associated and is in an idle state among the M players.
[0024] Case 1: When it is determined that there is a player that has been associated and is in an idle state among the M players, disassociating the associated and idle player, and determining the disassociated player as the second player.
[0025] Case 2: When it is determined that there is no player that has been associated and is in an idle state among the M players, determining whether the number of players that have been associated and are in an occupied state is equal to M; when it is determined that the number of players that have been associated and are in an occupied state is equal to M, disassociating and releasing the player that was associated earliest among the M players, and determining the released player as the second player that meets the preset condition.
[0026] In some possible implementation manners, the method provided by this application further includes: whenever a certain player among the M players is associated, updating the player association order; determining the player that was associated earliest among the M players according to the updated player association order.
[0027] For example, a possible player association order is: (Player 1, VideoView Component 1), (Player 2, VideoView Component 2), (Player 3, VideoView Component 3). Among them, the player that was associated earliest among the three players is Player 1. In this case, Player 1 can be released for reuse by other VideoView components (such as VideoView Component 4).
[0028] The updated player association order can be: (Player 2, VideoView Component 2), (Player 3, VideoView Component 3), (Player 1, VideoView Component 4). Among them, the earliest associated player among the three players becomes Player 2. In this case, Player 2 can be released for reuse by other VideoView components.
[0029] Through the above solution, in actual implementation, a VideoView component can be associated / bound to a player, and the three players will be alternately associated and occupied by different VideoView components. Record and update the sequence of association of the three players. Based on the updated player association order, the dissociation and re-association of the players can be completed in an orderly manner, avoiding conflicts.
[0030] In some other possible implementation manners, the method provided by this application further includes: whenever a certain player among the M players is occupied, update the player occupation order; determine the earliest occupied player among the M players according to the updated player occupation order. Record and update the sequence of occupation of the three players. Based on the updated player occupation order, the unbinding and re-binding of the players can be completed in an orderly manner, avoiding conflicts.
[0031] In some possible implementation manners, the at least one card further includes a second card, and the second card corresponds to a third VideoView component; the method provided by this application further includes: calling the associated player through the third VideoView component to play a second video in the display area of the second card; when the player associated with the third VideoView component is different from the player associated with the second VideoView component, when playing the first video in the second display area, keep playing the second video in the display area of the second card.
[0032] In some possible implementation manners, before displaying the at least one card on the desktop, the method provided by this application further includes: receiving a second operation by the user to add the first card to the desktop; in response to the second operation, calling a desktop application to load the first card onto the desktop; creating the first VideoView component for the first display area of the first card, and creating the second VideoView component for the second display area of the first card.
[0033] Among them, the second operation can be a click confirmation operation or a drag operation by the user to add the first card to the desktop.
[0034] In some possible implementation manners, the method provided by this application further includes: when calling a desktop application to load a first card onto the desktop, detecting whether the first card carries attribute information for automatic playback; when detecting that the first VideoView component carries the attribute information for automatic playback, associating the first VideoView component with a first player that meets a preset condition among M players.
[0035] In some possible implementation manners, the displaying at least one card on the desktop includes: displaying a first card on the desktop, and based on the fact that the first VideoView component carries the attribute information for automatic playback, calling a first player through the first VideoView component to play a second video in a first display area of the first card.
[0036] Through the above solution, in response to an operation by a user to add a card to the desktop, the card is loaded through a desktop application; the first card is drawn; a first VideoView component and a first player proxy of the first card are created; when the first card carries the attribute information for automatic playback, a player management module binds the first VideoView component to the first player and stores a mapping relationship between the first player and the first VideoView component; the first VideoView component can be called to play a video through the first player.
[0037] In some possible implementation manners, after associating the second VideoView component with the first player, the method provided by this application further includes: storing a first mapping relationship among a second display area, the second VideoView component, the first player, and a first video.
[0038] In some possible implementation manners, the calling the first player through the second VideoView component to play the first video in the second display area includes: based on the first mapping relationship, calling the first player through the second VideoView component to play the first video in the second display area.
[0039] In some possible implementation manners, the electronic device includes a player management module. The disassociating the first VideoView component from the first player and associating the second VideoView component with the first player when determining that the first VideoView component is already associated with the first player includes: when the player management module determines that the first VideoView component is already associated with the first player, the player management module disassociates the first VideoView component from the first player and associates the second VideoView component with the first player.
[0040] Through the solution of this application, quick application video cards are displayed on the desktop or the negative first screen interface, and the bound player is called to display videos in the quick application video cards. Various services are displayed and recommended for users through the quick application video cards, with more intuitive information display and more comprehensive service recommendation.
[0041] In a second aspect, this application provides a device for playing videos based on quick application cards. The device includes units for executing the method in the first aspect above. The device can correspond to executing the method described in the first aspect above. For the relevant descriptions of the units in the device, please refer to the description in the first aspect above. For the sake of brevity, they will not be repeated here.
[0042] Among them, the method described in the first aspect above can be implemented by hardware or by hardware executing corresponding software. The hardware or software includes one or more modules or units corresponding to the above functions. For example, a processing module or unit, a display module or unit, etc.
[0043] In a third aspect, this application provides an electronic device. The electronic device includes a processor, and a computer program or instruction stored in the memory. The processor is used to execute the computer program or instruction so that the method in the first aspect is executed.
[0044] In a fourth aspect, this application provides a computer-readable storage medium, on which a computer program (which can also be called an instruction or code) for implementing the method in the first aspect is stored. For example, when the computer program is executed by the computer, the computer can execute the method in the first aspect.
[0045] In a fifth aspect, this application provides a chip, including a processor. The processor is used to read and execute the computer program stored in the memory to execute the method in the first aspect and any possible implementation manners thereof. Optionally, the chip further includes a memory, and the memory is connected to the processor through a circuit or a wire.
[0046] In a sixth aspect, this application provides a chip system, including a processor. The processor is used to read and execute the computer program stored in the memory to execute the method in the first aspect and any possible implementation manners thereof. Optionally, the chip system further includes a memory, and the memory is connected to the processor through a circuit or a wire.
[0047] In a seventh aspect, this application provides a computer program product. The computer program product includes a computer program (which can also be called an instruction or code). When the computer program is executed by an electronic device, the electronic device is enabled to implement the method in the first aspect.
[0048] It can be understood that for the beneficial effects of the above-mentioned second aspect to seventh aspect, reference can be made to the relevant descriptions in the first aspect above, and details are not elaborated herein. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] Figure 1 Schematic diagram of the interface for displaying a quick application card on an electronic device provided by an embodiment of the present application;
[0050] Figure 2 Schematic diagram of the structure of an electronic device provided by an embodiment of the present application;
[0051] Figure 3 Schematic diagram of the software architecture of an electronic device provided by an embodiment of the present application;
[0052] Figure 4A Schematic diagram of the interface for adding a quick application card to the desktop provided by an embodiment of the present application;
[0053] Figure 4B Schematic diagram of the interface for adding a quick application card to the negative first screen provided by an embodiment of the present application;
[0054] Figure 5 Schematic diagram of the quick application video card provided by an embodiment of the present application;
[0055] Figure 6A Schematic diagram of the process for adding a video card in the method for playing a video based on a quick application card provided by an embodiment of the present application;
[0056] Figure 6B Based on an embodiment of the present application Figure 6A Schematic diagram of the interface for adding a video card;
[0057] Figure 7A Schematic diagram of the process for switching the video played for the same card in the method for playing a video based on a quick application card provided by an embodiment of the present application;
[0058] Figure 7B Based on an embodiment of the present application Figure 7A Schematic diagram of the interface for switching the video played for the same card;
[0059] Figure 8A Interaction schematic diagram of the method for playing a video based on a quick application card provided by an embodiment of the present application;
[0060] Figure 8B Based on an embodiment of the present application Figure 8A Schematic diagram of the process for controlling the playing of multiple cards in the method for playing a video based on a quick application card;
[0061] Figure 9ASchematic flow chart of multiple cards in the method for playing videos based on quick application cards provided by embodiments of this application binding players in sequence and occupying players;
[0062] Figure 9B For embodiments of this application based on Figure 9A Schematic interface diagram of multiple cards provided by embodiments of this application binding players in sequence and occupying players;
[0063] Figure 10A Schematic flow chart of players being cyclically occupied in the method for playing videos based on quick application cards provided by embodiments of this application;
[0064] Figure 10B For embodiments of this application based on Figure 10A Schematic interface diagram of players being cyclically bound and occupied provided by embodiments of this application. Detailed implementation manners
[0065] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the following will clearly and completely describe the technical solutions in the embodiments of this application with reference to the accompanying drawings in the embodiments of this application. Obviously, the described embodiments are some, but not all, of the embodiments of this application. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of this application without creative efforts shall fall within the scope of protection of this application.
[0066] The term "and / or" in this text is an association relationship describing associated objects, indicating that three relationships may exist. For example, A and / or B may represent: A exists alone, A and B exist simultaneously, and B exists alone. The symbol " / " in this text represents an "or" relationship between associated objects. For example, A / B represents A or B.
[0067] The terms "first" and "second" in the description and claims of this application are used to distinguish different objects, rather than to describe a specific order of objects. In the description of the embodiments of this application, unless otherwise stated, the meaning of "a plurality of" refers to two or more. For example, a plurality of processing units refers to two or more processing units, etc.; a plurality of elements refers to two or more elements, etc.
[0068] In the embodiments of this application, words such as "exemplary" or "for example" are used to indicate examples, illustrations, or explanations. Any embodiment or design solution described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or having more advantages than other embodiments or design solutions. Rather, the use of words such as "exemplary" or "for example" is intended to present relevant concepts in a specific manner.
[0069] Quick App is a new type of application form. In the past, there were mainly two ways for mobile applications: web pages and native applications. Web pages do not require installation, but the experience is not very good; native applications have a smooth experience, but they need to be downloaded and installed from the app store, making it difficult to directly reach users. The emergence of Quick App enables users to experience the application content smoothly without downloading and installation, and can be used immediately with a single click.
[0070] A Quick App card is a page defined in Quick App and is an information carrier for embedding and displaying in other applications. Quick App cards can be embedded and displayed in native applications in various usage scenarios, such as: the negative first screen, the desktop, the quick service center, global search, etc.
[0071] Exemplarily, Figure 1 Figure (a) in [reference] shows a schematic diagram of displaying the Quick App card "Headline Hot List" in the quick service center interface.
[0072] Exemplarily, Figure 1 Figure (b) in [reference] shows a schematic diagram of displaying the Quick App card "Travel Navigation" in the negative first screen interface.
[0073] Exemplarily, Figure 1 Figure (c) in [reference] shows a schematic diagram of displaying the Quick App card "Flight Schedule" in the desktop interface.
[0074] Currently, Quick App cards can only display static images, and the user application scenarios are relatively limited. There is an urgent need for a method to display videos through Quick App cards.
[0075] Based on this, the embodiments of the present application provide a method and an electronic device for playing videos based on Quick App cards, which improve the user experience by improving the underlying layer of the mobile phone system.
[0076] For the convenience of description, the card for playing videos based on Quick App cards is called a Quick App video card.
[0077] It should be noted that the current Quick App Alliance does not impose any restrictions on playing videos on the same card, and only controls the maximum number of videos played by a single host (negative first screen / desktop / quick service center) to be 3. In the embodiments of the present application, for a Quick App video card, only one video stream / live stream is supported for playing at the same time. When directly playing a new video / live broadcast, the original content playback will be automatically stopped.
[0078] In the embodiment of the present application, when performing the bind operation in PlayerProxy, the corresponding HyBridView is obtained through the current target, and it is searched in the mInstances array whether there is a HyBridView of the PlayerProxy object that is the same as the target. If they are the same, it proves that the player already exists in the current card. Then, the player in the current card is paused first, the original PlayerProxy in the current card is set to null, and the current target is pointed to the mTarget object of the original holder object, thereby realizing the reuse of the player in the current card and stopping the original playback effect. Specific details will be described in detail below.
[0079] Next, the electronic device to which the method for playing a video based on a quick application card provided in the embodiment of the present application is applied will be described with reference to the accompanying drawings.
[0080] Exemplarily, taking the electronic device as a mobile phone as an example, Figure 2 FIG. shows a schematic structural diagram of an electronic device provided in an embodiment of the present application. As Figure 2 shown, the mobile phone may include: a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver (i.e., a handset) 170B, a microphone 170C, a headphone interface 170D, a sensor module 180, a key 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc.
[0081] Exemplarily, the above sensor module may include sensors such as a pressure sensor, a gyroscope sensor, a barometric pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a proximity light sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, and a bone conduction sensor. In the embodiment of the present application, the electronic device may detect whether the user's ear is close to the vicinity of the handset through sensors such as a proximity light sensor (i.e., a light sensor) and a distance sensor. For example, the electronic device may detect whether there is an occlusion in front of the front panel (or the screen) of the mobile phone and the distance between the occluding object and the screen through the distance sensor to determine whether the current user's ear is close to the vicinity of the handset.
[0082] It can be understood that the structure illustrated in this embodiment does not constitute a specific limitation on the mobile phone. In other embodiments, the mobile phone may include more or fewer components than those shown in the figure, or combine certain components, or split certain components, or have different component arrangements. The components shown in the figure can be implemented in hardware, software, or a combination of software and hardware.
[0083] The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Among them, different processing units may be independent devices or integrated in one or more processors.
[0084] Through the method for playing a video based on a quick application card provided by the embodiments of this application, at least one card is displayed on the desktop. The first card among the at least one card includes a first display area and a corresponding first VideoView component, a second display area and a corresponding second VideoView component; a first operation of the user on the second display area is received, and the first operation is an operation for triggering video playback; in response to the first operation, it is determined whether the second VideoView component is already associated with a player; in the case where it is determined that the second VideoView component is not associated with a player, it is determined whether other VideoView components in the first card are already associated with a player; in the case where it is determined that the first VideoView component is already associated with a first player, the first VideoView component is dissociated from the first player, and the second VideoView component is associated with the first player; the first player is called through the second VideoView component to play the first video in the second display area.
[0085] The controller may be the nerve center and command center of the mobile phone. The controller can generate operation control signals according to the instruction operation code and timing signals to complete the control of fetching instructions and executing instructions.
[0086] A memory can also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can hold the instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to use the instruction or data again, it can be directly retrieved from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0087] In some embodiments, the processor 110 may include one or more interfaces. The interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.
[0088] It can be understood that the interface connection relationships between the modules illustrated in this embodiment are only illustrative and do not constitute a limitation on the structure of the mobile phone. In other embodiments, the mobile phone may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
[0089] The wireless communication function of the mobile phone can be implemented through antenna 1, antenna 2, the mobile communication module 150, the wireless communication module 160, the modulation and demodulation processor, and the baseband processor, etc.
[0090] The mobile phone can implement the display function through the GPU, the display screen 194, and the application processor, etc. The GPU is a microprocessor for image processing, connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs, which execute program instructions to generate or change the display information. The display screen 194 is used to display images, videos, etc.
[0091] In the embodiments of the present application, the display screen 194 is used to display instant application cards.
[0092] In the embodiments of the present application, the electronic device may set the entrance of the instant application card on different interfaces of the display screen, which may be preset by the system or customized by the user. For example, the instant application card may be displayed on the desktop of the display screen, or on the negative first screen of the display screen, or in the quick service center of the display screen, or may be displayed on the lock screen interface. For a foldable electronic device with a small screen, the instant application card may be displayed on the small screen.
[0093] The external memory interface 120 may be used to connect to an external memory card, such as a Micro SD card, to implement the storage capacity expansion of the mobile phone. The internal memory 121 may be used to store computer-executable program codes, and the executable program codes include instructions. The processor 110 executes various functional applications and data processing of the mobile phone by running the instructions stored in the internal memory 121. For example, in the embodiments of the present application, the processor 110 may execute the instructions stored in the internal memory 121, and the internal memory 121 may include a program storage area and a data storage area.
[0094] The mobile phone may implement audio functions through the audio module 170, the speaker 170A, the receiver (i.e., earpiece) 170B, the microphone 170C, the headphone interface 170D, and the application processor, etc. For example, music playback, recording, etc.
[0095] The above is a specific description of the embodiments of the present application by taking the electronic device as an example. It should be understood that the structure illustrated in the embodiments of the present application does not constitute a specific limitation on the electronic device. The electronic device may have more or fewer components than those shown in the figure, may combine two or more components, or may have different component configurations. The various components shown in the figure may be implemented in hardware, software, or a combination of hardware and software including one or more signal processing and / or application specific integrated circuits.
[0096] The electronic device provided in the embodiments of the present application may be a user equipment (UE), such as a mobile terminal (such as a user's mobile phone), a tablet computer, a desktop, a laptop computer, a handheld computer, a netbook, a personal digital assistant (PDA), etc.
[0097] In addition, an operating system runs on the above-mentioned hardware. The operating system at the operating system layer can be any one or more computer operating systems that implement business processing through processes. For example, Linux operating system, Unix operating system, Android operating system, iOS operating system, or Windows operating system, etc. Application programs can be installed and run on the operating system.
[0098] The operating system of the electronic device can adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservices architecture, or a cloud architecture. In this embodiment of the application, the Android system with a layered architecture is taken as an example to exemplarily illustrate the software structure of the electronic device.
[0099] Figure 3 It is a software structure block diagram of the electronic device in this embodiment of the application.
[0100] The layered architecture divides the software into several layers, and each layer has a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom are the application layer (applications), the application framework layer (application framework), Android Runtime (AndroidRuntime) and system libraries, and the kernel layer (kernel).
[0101] Among them, the application layer can include a series of application packages. For example, the application layer can include application programs such as the system desktop APP, the negative first screen APP, and the quick service center APP (application programs can be simply referred to as applications), and this embodiment of the application does not make any restrictions on this.
[0102] Exemplarily, the negative first screen APP can be the host of the quick application card.
[0103] Exemplarily, the system desktop APP can also be the host of the quick application card.
[0104] Exemplarily, the quick service center APP can also be the host of the quick application card.
[0105] For example, when the negative first screen APP is the host of the quick application card, the negative first screen APP contains a card software development kit (SDK), and the negative first screen APP can load, render, and display the quick application card on the negative first screen through this card SDK.
[0106] For example, for For an electronic device with an operating system, cards can be generated based on the JavaScript programming language and displayed on the screen. For example, flight information, train information, meeting information, or schedule information can be presented through the cards.
[0107] Among them, JavaScript, abbreviated as "JS", is a lightweight, interpreted or just-in-time compiled programming language with function priority. JavaScript is a dynamic scripting language based on prototype programming and multi-paradigm, and supports object-oriented, imperative, declarative, and functional programming paradigms. JavaScript can be widely used in devices such as servers, PCs, laptops, tablets, and smartphones, and is often used to add various dynamic functions to web pages to provide users with a smoother and more beautiful browsing experience.
[0108] The card SDK is a set of tool collections for software development. It includes various components, libraries, APIs, etc. required in the software development process. For example, the card SDK provides a complete application framework, including UI components, data storage, network communication, etc., enabling developers to build applications more conveniently. For another example, the card SDK provides a series of API interfaces to help developers implement various functions.
[0109] In the embodiments of the present application, the application layer may further include a quick application engine APP. The quick application engine APP includes a quick application RPK file, and the suffix of this file is.rpk.
[0110] Among them, the quick application engine APP is a pre-installed application in the electronic device, used to implement the download, installation, and update of quick application cards. The quick application engine APP is also used to create cards, load cards, and load pages. The process of creating a card includes creating a JS thread, binding a JS service, and binding V8. The quick application engine APP is also used to execute card rendering actions. The quick application engine APP is also used to request cards from the network.
[0111] In the embodiments of the present application, the application layer may further include a context awareness module, a business logic processing module, a business presentation module, etc. The context awareness module, the business logic processing module, and the business presentation module may be independent APPs, or may be integrated into different APPs respectively, or may be integrated into the same APP. The present application does not make a limitation.
[0112] Among them, the context awareness module runs permanently or in a low-power mode and has the ability to sense external facts or the environment. The context awareness module can detect relevant events and obtain the status of events from other applications in the application layer, the application framework layer, the system layer, or the kernel layer through an application programming interface (API), such as detecting Bluetooth connections, network connections, monitoring user text messages, setting timers, etc. In the embodiments of this application, the main function of the context awareness module is to monitor whether a quick application video card is added. The context awareness module can also be used to obtain the player occupancy information of the quick application video card. The context awareness module can notify the monitored quick application video card and the player occupancy information to the business logic processing module.
[0113] The business logic processing module (such as: computing engine) has the ability to process business logic and is used to perform data processing or logical judgment according to the quick application video card and the player occupancy information monitored by the context awareness module, and a preset logical algorithm, bind the VideoView component of the quick application video card to a suitable player, and instruct the business presentation module to implement the card display task.
[0114] The business presentation module (such as: YOYO suggestion) is used to display the quick application video card on the desktop or the negative first screen interface according to the instruction of the business logic processing module, and call the bound player to display the video in the quick application video card. Through the quick application video card, various services are displayed and recommended to users, and the information display is more intuitive and the service recommendation is more comprehensive.
[0115] The application framework layer provides application programming interfaces (APIs) and programming frameworks for the applications in the application layer. The application framework layer includes some predefined functions. As Figure 3 shown, the application framework layer can include a window manager, JS (JavaScript) services, a view system, a resource manager, etc., and the embodiments of this application do not make any restrictions on this.
[0116] The JS service is used to provide services such as card creation and card rendering for the quick application engine. The quick application card implemented through JavaScript can be called a JS card.
[0117] The window manager is used to manage window programs, for example, to manage the window programs provided by YOYO suggestions.
[0118] The resource manager provides various resources for the application, such as localized strings, icons, pictures, etc.
[0119] The view system includes visual controls, such as controls for displaying text, controls for displaying pictures, etc. The view system can be used to build applications. The display interface can be composed of one or more views.
[0120] For example, in the embodiments of the present application, the view system can be used to display quick application cards on the desktop.
[0121] Android Runtime includes a core library and a virtual machine. Android Runtime is responsible for the scheduling and management of the Android system.
[0122] The core library consists of two parts: one part is the functional functions that the Java language needs to call, and the other part is the core library of Android.
[0123] The application layer and the application framework layer run in the virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, security and exception management, and garbage collection.
[0124] The system library can include multiple functional modules. For example: surface manager, medialibraries, 3D graphics processing library (such as: openGL ES), 2D graphics engine (such as: SGL), etc. The surface manager is used to manage the display subsystem and provides the fusion of 2D layers and 3D layers for multiple applications.
[0125] The kernel layer is the layer between hardware and software. The kernel layer at least includes a display driver, a camera driver, an audio driver, and a sensor driver.
[0126] For the convenience of explanation, the hardware layer that interacts with the above software structure is also shown in the figure. For example, the hardware layer can include a display screen.
[0127] It should be noted that although the embodiments of the present application take the system as an example for illustration, its basic principle also applies to electronic devices based on operating systems such as
[0128] The execution subject of the method for playing a video based on a quick application card provided by an embodiment of the present application may be the above-mentioned electronic device, or a functional module and / or functional entity in the electronic device that can implement the method for playing a video based on a quick application card. Moreover, the solution of the present application can be implemented in a hardware and / or software manner, which can be specifically determined according to actual usage requirements, and the embodiments of the present application do not make any limitations. Hereinafter, taking the electronic device as an example, the method for playing a video based on a quick application card provided by an embodiment of the present application will be described by way of example with reference to the accompanying drawings.
[0129] Next, the application scenario of the solution of the present application will be described with reference to the accompanying drawings, and then the method for playing a video based on a quick application card provided by an embodiment of the present application will be introduced in combination with specific embodiments. Figure 2 as shown in Figure 3 shown, and the software structure block diagram of the electronic device can be as shown in Figure 2 shown, but the embodiments of the present application are not limited thereto. For the sake of convenience of description, in the embodiments of the present application, a mobile phone as shown in Figure 2 is taken as an example.
[0130] First, the application scenario of the solution of the present application will be described with reference to the accompanying drawings, and then the method for playing a video based on a quick application card provided by an embodiment of the present application will be introduced in combination with specific embodiments.
[0131] Figure 4A FIG. shows a schematic interface diagram of finding a quick application video card through the quick service center entry and adding the quick application video card to the desktop.
[0132] As shown in Figure 4A (a) of, the electronic device displays the interface of the negative first screen, and an entry control 41 of the quick service center is displayed on the interface of the negative first screen. The electronic device receives an operation of the user on the entry control 41. As shown in Figure 4A (b) of, in response to the user operation, the electronic device jumps from the interface of the negative first screen to the quick service center interface. In the quick service center interface, system-recommended quick application video cards and an "Add" control 42 are displayed. The system-recommended quick application video cards include one or more areas. When the quick application video card includes multiple areas, different video contents can be displayed in the multiple areas respectively. Here, an example is given by taking the system-recommended quick application video card including two areas as an example. The electronic device receives an operation of the user on the control 42. As shown in Figure 4A (c) of, in response to the user operation, the electronic device jumps from the quick service center interface to the add setting interface, and in the add setting interface, a quick application video card, an "Add to Desktop" control 43, and an "Add to Negative First Screen" control 44 are displayed.
[0133] Exemplarily, as shown in Figure 4AAs shown in (c) thereof, the electronic device receives an operation of the user on the control 43. As Figure 4A shown in (d) thereof, in response to the user operation, the electronic device jumps from the add settings interface to the desktop, and a quick application video card is newly displayed on the desktop. It should be noted that in this case, the quick application video card is displayed with the desktop as the host.
[0134] Figure 4B The schematic diagram of the interface shows finding the quick application video card through the quick service center entry and adding the quick application video card to the negative first screen. Exemplarily, as Figure 4B shown in (a) to (d) thereof, the quick application video card recommended by the system includes an area. The electronic device receives an operation of the user on the control 42, and in response to the user operation, the electronic device jumps from the quick service center interface to the add settings interface. The electronic device receives an operation of the user on the "add to negative first screen" control 44 in the add settings interface, and in response to the user operation, the electronic device jumps from the add settings interface to the negative first screen, and the quick application video card is newly displayed on the negative first screen. It should be noted that in this case, the quick application video card is displayed with the negative first screen as the host.
[0135] It should also be noted that the embodiments of the present application do not limit the size of the quick application video card. For example, the size of the quick application video card can be 2*4, where 2*4 represents 2 rows and 4 columns. For the convenience of description, the following embodiments will be exemplarily described by taking the size of the quick application video card as 2*4 as an example.
[0136] It should also be noted that when there are two or more partitions in the quick application video card, the arrangement of the two or more partitions is not limited. For example, as Figure 5 shown in (a) thereof, when there are two partitions in the quick application video card, the two partitions can be upper and lower partitions, and the size of each partition is 1*4; or, as Figure 5 shown in (b) thereof, the two partitions can be left and right partitions, and the size of each partition is 2*2.
[0137] The first embodiment
[0138] Figure 6A is a schematic diagram of the scenario of the method for playing a video based on a quick application card provided by the embodiments of the present application. Referring to Figure 6A shown, the method includes the following steps S101-S128.
[0139] The following will be exemplarily described by taking adding the quick application video card to the desktop as an example. This embodiment illustrates the process of adding and displaying the quick application video card on the desktop and switching the played video when clicking on different areas in the quick application video card.
[0140] S101. In response to the user's operation of adding the quick application video card 1 to the desktop, the desktop application downloads and installs the quick application video card.
[0141] Among them, the installation package of the quick application video card 1 (abbreviated as video card 1 or card 1) carries the attribute information of the video card 1.
[0142] In some embodiments, the attribute information of the video card 1 includes the attribute information of whether to play automatically.
[0143] In some embodiments, the video card 1 includes a card SDK module. The card SDK module contains various components, libraries, APIs, etc. required during the card development process, and can assist the desktop application to complete the task of adding the card to the desktop.
[0144] In some embodiments, the attribute information of the video card 1 includes the VideoView component information of the card 1. Among them, the electronic device can apply the VideoView component to the video card to implement a simple video playback function. In this way, the electronic device can dynamically present service content through the video card.
[0145] In some embodiments, the video card 1 may include one or more VideoView components. The present application does not limit the number of VideoView components of the card 1.
[0146] The present application exemplarily gives the following three possible situations:
[0147] Situation 1: The video card 1 may include one VideoView component. In this case, the electronic device dynamically or statically presents video content in the entire area of the video card 1 through the VideoView component.
[0148] Situation 2: The video card 1 may include two VideoView components, denoted as VideoView component 1 and VideoView component 2 respectively. In this case, the electronic device dynamically or statically presents two video contents in two areas of the video card 1 through VideoView component 1 and VideoView component 2 respectively. In some embodiments, these two VideoView components can play simultaneously. In other embodiments, these two VideoView components can switch and play alternately. For example, when playing a video through VideoView component 1, VideoView component 2 stops playing the video; or, when playing a video through VideoView component 2, VideoView component 1 stops playing the video.
[0149] Exemplarily, refer to Figure 6BIn (a) above, the operation of "the user adding the quick application video card to the desktop" can be the operation of the user clicking the "Add to Desktop" control. The video card includes two areas, namely display area 1 and display area 2. In display area 1, a type of video content (referred to as video A) can be displayed through VideoView component 1, and in display area 2, another type of video content (referred to as video B) can be displayed through VideoView component 2.
[0150] Case 3: Video card 1 can include three VideoView components. The electronic device presents three video contents in three areas of video card 1 through the three VideoView components respectively. In some embodiments, the three VideoView components can play simultaneously. In other embodiments, the three VideoView components can switch and play alternately. For example, when playing a video through one of the three VideoView components, the other two VideoView components stop playing the video.
[0151] Among them, the VideoView component can also be referred to as a video view class or a VideoView class.
[0152] S102, The desktop application sends message 1 to the card SDK module. This message 1 is used to indicate the drawing of video card 1, and this message 1 also carries the attribute information of video card 1.
[0153] S103, In response to message 1, the card SDK module draws the video card, for example, draws and creates VideoView component 1 and VideoView component 2. Among them, the attribute information of this video card 1 includes the attribute information that VideoView component 1 is for automatic playback.
[0154] This embodiment takes the creation of two VideoView components for video card 1 as an example for exemplary illustration. In actual implementation, three VideoView components can also be created. The implementation process of the three VideoView components is the same as that of the two VideoView components and will not be elaborated here.
[0155] S104, The card SDK module creates a player proxy 1 for VideoView component 1 according to the attribute information that VideoView component 1 is for automatic playback.
[0156] Among them, the player proxy 1 is used to proxy the video playback service of VideoView component 1.
[0157] Exemplarily, the player agent 1 is used to handle the binding / unbinding tasks between the VideoView component 1 and the player. For example, the player agent 1 is used to determine whether the VideoView component 1 has been bound to a player, and in the case of determining that it has been bound to a player, it instructs the bound player to complete the video playback service for the VideoView component 1, or, in the case of determining that it has not been bound to a player, it requests to bind a player for the VideoView component 1.
[0158] S105, the card SDK module instructs the player agent 1 to bind a player.
[0159] S106, the player agent 1 determines whether the VideoView component 1 has been bound to a player according to the instruction of the card SDK module.
[0160] S107A, if the player agent 1 determines that the VideoView component 1 has been bound to a player, the player agent 1 instructs the VideoView component 1 to play the video through the bound player. Accordingly, the VideoView component 1 plays the video through the bound player.
[0161] S107B, if the player agent 1 determines that the VideoView component 1 has not been bound to a player, then the player agent 1 sends message 2 to the player management module, and this message 2 is used to request to bind a player for the VideoView component 1 of the video card 1.
[0162] Among them, the player management module is used to manage the binding and unbinding (i.e., release) services between multiple players and the VideoView component.
[0163] Among them, the player management module is also used to record whether multiple players are occupied and the order of occupation.
[0164] For the sake of convenience of explanation, here it is taken as an example that the player management module manages a total of 3 players, and the 3 players are respectively called player 1, player 2, and player 3.
[0165] After S107B, S108 to S116 are continued to be executed. The following explains how the player management module binds the VideoView component 1 of the card 1 to a suitable player based on a preset logical judgment.
[0166] S108, the player management module determines whether the video card 1 has been bound to a player according to the instruction of the player agent 1.
[0167] S109, if the player management module determines that the video card 1 has not been bound to a player, then the player management module continues to determine whether there is a bound but idle player.
[0168] If the player is bound and currently in use, then the player management module can confirm that there is no bound but idle player.
[0169] If the player is bound but not currently in use, then the player management module can confirm that there is a bound but idle player. When the player management module determines that there is a bound but idle player, the player management module can release the mapping relationship of the player. Furthermore, the player management module can bind the VideoView component 1 to the released player.
[0170] S110, if the player management module determines that there is no bound but idle player, then the player management module continues to determine whether the number of bound players is less than 3.
[0171] When the number of bound players is less than 3, it means that there are unbound players among the 3 players. It may be that 1 player is unbound, or 2 players are unbound, or all 3 players are unbound.
[0172] S111, if the player management module determines that the number of bound players is less than 3, then the player management module binds the VideoView component 1 of the video card 1 to any unbound player (here, player 1 is taken as an example), and stores the mapping relationship between player 1 and the VideoView component 1.
[0173] It can be understood that when there is a mapping relationship between player 1 and the VideoView component 1, the VideoView component 1 can call player 1 to complete the video playback task.
[0174] It should be noted that player 1 is bound to the VideoView component 1 of video card 1, which means that player 1 is also bound to video card 1, that is, a mapping relationship is established.
[0175] For the sake of convenience of explanation, the mapping relationship between player 1 and the VideoView component 1 is denoted as (player 1, VideoView component 1).
[0176] S112, the player management module returns a message indicating successful binding to player proxy 1.
[0177] Among them, the message indicating successful binding contains the mapping relationship (player 1, VideoView component 1).
[0178] S113, player proxy 1 instructs the VideoView component 1 to play the video using player 1 according to the mapping relationship (player 1, VideoView component 1).
[0179] S114. After the VideoView component 1 receives the instruction from the player agent 1, it calls the player 1 to play the video in the display area 1.
[0180] S115. The video card 1 returns a message indicating that the video card has been successfully added to the desktop application through the card SDK module.
[0181] S116. The electronic device successfully adds and displays the video card 1 on the desktop. The video in the display area 1 of the video card 1 is played, and the video in the display area 2 of the video card 1 is not played.
[0182] Among them, the video card 1 includes two areas. Assume that the display area 1 corresponds to the VideoView component 1, and the display area 2 corresponds to the VideoView component 2. It should be noted that when the video card 1 is displayed on the desktop, the display area 1 corresponding to the VideoView component 1 automatically plays the video, and the display area 2 corresponding to the VideoView component 2 does not play the video.
[0183] Exemplarily, Figure 6B is a schematic diagram of the scenario of the method for playing videos based on quick application cards provided by the embodiments of the present application. Refer to Figure 6B In (a) and (b) therein, in response to the user's operation of adding the video card to the desktop, the desktop application downloads and installs the video card. The electronic device successfully adds the video card to the desktop and displays the video card, and the video card displays different video source contents through the display area 1 and the display area 2 respectively. For example, in the display area 1, a type of video content can be statically / dynamically displayed through the VideoView component 1, and in the display area 2, another type of video content can be statically / dynamically displayed through the VideoView component 2.
[0184] Exemplarily, assume that the VideoView component 1 carries the attribute information of automatic playback, and the VideoView component 2 does not carry the attribute information of automatic playback. In this case, when the video card is added to the desktop, the video will be automatically played in the display area 1, and the video will not be automatically played in the display area 2 at this time.
[0185] The above exemplarily illustrates the process of adding the video card 1 to the desktop and displaying the video card 1. Among them, video A is automatically played in the display area 1 of the video card 1, and video B is not played in the display area 2 of the video card 1. It should be noted that if the user hopes to watch the dynamic content in the display area 2, then the user can click on the display area 2 to trigger the dynamic display of video B in the display area 2.
[0186] Next, in combination with Figure 7ADescribe the process in which when the user clicks on display area 2, the electronic device controls VideoView component 2 to play video B in display area 2, and controls VideoView component 1 to stop playing video A in display area 1. In combination with Figure 6A , as Figure 7A shown, after S116, the method provided by this application further includes the following steps.
[0187] S117, The desktop application receives the operation of the user clicking on display area 2.
[0188] Exemplarily, as Figure 7B shown in (a) of , a video card is displayed on the desktop, and this video card includes display area 1 and display area 2. The user can trigger the playing of video B in display area 2 by clicking on display area 2.
[0189] Among them, display area 1 corresponds to VideoView component 1, and VideoView component 1 has created a player proxy 1 and has bound player 1.
[0190] Among them, display area 2 corresponds to VideoView component 2, and VideoView component 1 has not created a player proxy and has not bound a player.
[0191] S118, The desktop application sends message 3 to the card SDK module, instructing VideoView component 2 corresponding to display area 2 to start playing.
[0192] S119, The card SDK module creates a player proxy 2 for VideoView component 2 according to message 3.
[0193] Among them, the player proxy 2 is used to proxy the video playback service of VideoView component 2.
[0194] Exemplarily, the player proxy 2 is used to handle the binding / unbinding tasks of VideoView component 2 with the player. For example, the player proxy 2 is used to determine whether VideoView component 2 has bound a player, and in the case of determining that a player has been bound, it instructs to complete the video playback service for VideoView component 2 through the bound player, or, in the case of determining that no player has been bound, it requests to bind VideoView component 2 to a certain player.
[0195] S120, The card SDK module sends message 4 to the player proxy 2, and message 4 is used to instruct to bind a player to VideoView component 2.
[0196] S121, The player proxy 2 determines whether VideoView component 2 has bound a player according to the instruction of the card SDK module.
[0197] S122A. If the player agent 2 determines that the VideoView component 2 has been bound to a player, then the player agent 2 instructs the VideoView component 2 to play the video through the bound player. Accordingly, the VideoView component 2 plays the video by calling the bound player.
[0198] S122B. If the player agent 2 determines that the VideoView component 2 is not bound to a player, then the player agent 2 sends message 5 to the player management module, and this message 5 is used to request binding a player for the VideoView component 2.
[0199] After S122B, S123 to S130 are continued to be executed.
[0200] S123. The player management module determines, according to message 5, whether the video card 1 has been bound to a player.
[0201] It should be noted that referring to the above process, the video card 1 has been bound to the player 1, and the VideoView component 1 of the video card 1 has been bound to the player 1.
[0202] S124. In the case where the player management module determines that the video card 1 has been bound to the player 1, the player management module updates the mapping relationship between the player 1 and the VideoView component 1 (player 1, VideoView component 1) to the mapping relationship between the player 1 and the VideoView component 2 (player 1, VideoView component 2).
[0203] In this case, the player 1 is unbound from the VideoView component 1 of the video card 1 and is bound to the VideoView component 2 of the video card 1. After S124, S125 - S127 and S128 - S130 are executed respectively.
[0204] S125. The player management module sends an unbinding message to the player agent 1, and this unbinding message is used to notify that the player 1 and the VideoView component 1 have been successfully unbound.
[0205] S126. The player agent 1 instructs the VideoView component 1 to stop playing.
[0206] S127. After receiving the instruction from the player agent 1, the VideoView component 1 stops playing.
[0207] S128. The player management module sends a binding success message to the player agent 2, and this binding success message is used to notify that the player 1 and the VideoView component 2 have been successfully bound.
[0208] S129, the player agent 2 instructs the VideoView component 2 to start playing.
[0209] S130, after receiving the instruction from the player agent 2, the VideoView component 2 calls the player 1 to play the video in the display area 2.
[0210] It should be noted that this application does not limit the execution order of S125 - S127 and S128 - S130. For example, S125 - S127 can be executed first, and then S128 - S130; or S128 - S130 can be executed first, and then S125 - S127; or S125 - S127 and S128 - S130 can be executed simultaneously. Among them, Figure 7A an example is given by executing S125 - S127 first and then S128 - S130 for illustrative purposes.
[0211] For example, Figure 7B is a schematic diagram of the scenario of the method for playing a video based on a quick application card provided by an embodiment of this application. As Figure 7B shown in (a) therein, a video card is displayed on the desktop, where video A is played in the display area 1 and not played in the display area 2. When the user clicks on the display area 2, as Figure 7B shown in (b) therein, the electronic device controls to pause playing video A in the display area 1 and controls to start playing video B in the display area 2.
[0212] The above describes the process that when a video is being played in the display area 1 and the user clicks on the display area 2, it triggers the VideoView component 2 corresponding to the display area 2 to play the video and the VideoView component 1 corresponding to the display area 1 to stop playing the video.
[0213] Second Embodiment
[0214] The above - mentioned first embodiment introduced the process of completing video playback by alternately binding the VideoView components to the player when a card includes multiple VideoView components. The second embodiment will introduce the process of unbinding and binding the VideoView components to the player to complete video playback when there are multiple cards on the desktop.
[0215] The current quick application alliance limits the maximum number of videos that can be played on a host (negative first screen / desktop / quick service center). For example, the maximum number of videos that can be played is 3. In actual implementation, three players are set up. One VideoView component can be bound to one player, and the three players will be alternately occupied by different VideoView components. Since the current quick application alliance does not impose any restrictions on playing videos on the same card, it may occur that multiple videos are played on the same card simultaneously during actual use, affecting the user experience.
[0216] In this application, the HyBridView object is used to determine whether a card has occupied a player, so as to determine whether to reuse the player. When a certain VideoView component of a card has occupied a player, the VideoView component is unbound from the player, and then another VideoView component of the card is bound to the player. In this way, the unbound VideoView component stops the original playback action, and the newly bound VideoView component uses the player to start playing another video, thereby achieving the effect that only one video can be played on a card at the same time.
[0217] Figure 8A This is a schematic diagram of a scenario for the method of playing videos based on quick application cards provided by an embodiment of this application. As Figure 8A shown, the desktop includes three cards: Card 1, Card 2, and Card 3. These three cards are respectively bound to different players. Among them, Card 1 includes VideoView component 1, and VideoView component 1 is bound to Player 1 through Player Agent 1 (i.e., a mapping relationship is established). Card 2 includes VideoView component 2, and VideoView component 2 is bound to Player 2 through Player Agent 2. Card 3 includes VideoView component 3 and VideoView component 4, and VideoView component 3 is bound to Player 3 through Player Agent 3.
[0218] It should be noted that after the VideoView component is bound to the player, the VideoView component can call the bound player to play videos. After the VideoView component is unbound from the player, the VideoView component can no longer call the player to play videos.
[0219] In some embodiments, the player management module is responsible for managing the binding and unbinding between the VideoView component and the player.
[0220] In some embodiments, the player management module includes a play controller, which is responsible for receiving instructions such as binding, starting playback, pausing / stopping playback, or unbinding sent by the VideoView component, and controlling the player to complete tasks such as binding, starting playback, pausing / stopping playback, or unbinding according to the instructions.
[0221] It should be noted that the current technical problem is as follows: Referring to 8A, when the VideoView component 3 of the card 3 is already bound to the player 3 through the player proxy 3, if the VideoView component 4 of the card 3 needs to bind to a player, then which player should the VideoView component 4 bind to in order to meet the actual requirements.
[0222] In view of this situation, the embodiments of the present application provide a solution, which limits that a card can bind at most one player at a time. When the VideoView component 3 of the card 3 is already bound to the player 3 through the player proxy 3, the card 3 has occupied the player 3. If the VideoView component 4 of the card 3 needs to bind to a player, then in order to avoid the same card occupying multiple players at the same time, it is necessary to first unbind the VideoView component 3 from the player 3, and then bind the VideoView component 4 to the player 3. Thus, the effect of playing only one video on one card at a time is achieved.
[0223] The following will be combined with Figure 8B to illustrate the implementation methods of binding and unbinding between the card and the player. As Figure 8B shown, the card 1 is already bound to the player 1, the card 2 is already bound to the player 2, and the card 3 (specifically the VideoView component 3) is already bound to the player 3.
[0224] S201. In response to a play operation, the VideoView component 4 of the card 3 sends a request to bind a player to the player management module through the player proxy 4.
[0225] Among them, the play operation can be that the user clicks on the play control within the area corresponding to the VideoView component 4 in the card 3.
[0226] S202. After the player management module receives this request, the player management module first determines whether the card 3 is already bound to a player.
[0227] It should be noted that if the same card occupies multiple players simultaneously, there will be a scenario where the same card plays multiple videos simultaneously, which will result in a poor user experience. Therefore, when the VideoView component 3 of card 3 is already bound to player 3, this application will first unbind the VideoView component 3 from player 3, changing the occupied state of player 3 to the idle state, and then bind the VideoView component 4 to player 3.
[0228] S203. When it is determined that the VideoView component 3 of card 3 is already bound to player 3, the player management module instructs the VideoView component 3 to unbind.
[0229] S204. After the VideoView component 3 receives the instruction, the VideoView component 3 unbinds from player 3.
[0230] Among them, the unbinding of the VideoView component 3 from player 3 means deleting the mapping relationship between the VideoView component 3 and player 3.
[0231] S205. The VideoView component 3 returns an unbinding completion message to the player management module.
[0232] S206. The player management module instructs the VideoView component 4 to bind to player 3.
[0233] S207. After the VideoView component 4 receives the instruction, the VideoView component 4 binds to player 3.
[0234] Among them, the binding of the VideoView component 4 to player 3 means establishing the mapping relationship between the VideoView component 4 and player 3.
[0235] S208. The VideoView component 4 returns a binding completion message to the player management module.
[0236] S209. The player management module sends the parameters of player 3 to the VideoView component 4.
[0237] S210. The VideoView component 4 initializes based on player 3, such as setting the playback source, progress, mute, or listeners, etc.
[0238] S211. After completing the initialization, the VideoView component 4 sends a preloading / playback instruction to the player management module.
[0239] S212. Based on the preloading / playback instruction, the player management module starts playing the video using player 3.
[0240] In this way, video playback starts in the area of card 3 corresponding to VideoView component 4.
[0241] S213. The player management module updates the player occupancy information.
[0242] In some embodiments, the player occupancy information is information on which cards the players are occupied by. For example, the player occupancy information includes that player 1 is occupied by card 1, player 2 is occupied by card 2, and player 3 is occupied by card 3 (VideoView component 4).
[0243] In some embodiments, the player occupancy information is the player occupancy order, and the player occupancy order is: 1. (player 1, card 1), 2. (player 2, card 2), 3. (player 3, card 3 - VideoView component 4).
[0244] Here, taking the player occupancy information as the player occupancy order as an example for illustrative purposes, in actual implementation, the player occupancy information can also be the player association / binding order.
[0245] It should be noted that in this application, it is specified that each card can bind at most one player at a time. The VideoView component 3 is unbound from player 3, and then the VideoView component 4 is bound to player 3. That is to say, it is switched from the VideoView component 3 occupying player 3 to the VideoView component 4 occupying player 3. In this case, the VideoView component 4 can use player 3 to play video. While the VideoView component 12 is playing video, since the VideoView component 3 has been unbound from player 3, the VideoView component 3 does not play. Thus, the effect that only one video can be played on one card at the same time is achieved.
[0246] The above steps illustrate the possible implementation methods for playing video through a card. The following steps S214 and S215 illustrate the possible implementation methods for pausing the card's playback, and steps S216 - S218 illustrate the possible implementation methods for removing the card.
[0247] S214. In response to a stop / pause operation, the VideoView component 4 sends a stop / pause instruction to the player management module.
[0248] Among them, the stop / pause operation can be that the user clicks the stop / pause control in the area of card 3 corresponding to the VideoView component 4.
[0249] S215. Based on the stop / pause instruction, the player management module controls player 3 to stop / pause playback.
[0250] In this way, the playback has been stopped / paused in the area corresponding to the VideoView component 4 in the card 3.
[0251] S216. In response to the removal operation, the VideoView component 4 sends an unbinding and release instruction to the player management module.
[0252] S217. Based on the unbinding and release instruction, the player management module unbinds the VideoView component 4 from the player 3 and releases the player 3.
[0253] S218. The player management module returns a message indicating that the unbinding and release of the player have been completed to the VideoView component 4.
[0254] Third Embodiment
[0255] Hereinafter, an example will be given by taking multiple quick application video cards displayed on the desktop. Through this embodiment, the process of playing videos on each quick application video card when the user clicks on each quick application video card on the desktop in sequence will be described.
[0256] It should be noted that multiple quick application video cards can respectively interact with the player management module, and the player management module manages the mapping relationship between multiple players and multiple quick application video cards.
[0257] Exemplarily, multiple quick application video cards can include video card 1, video card 2, and video card 3.
[0258] Among them, video card 1 includes two display areas. The display area 11 corresponds to the VideoView component 11, and the display area 12 corresponds to the VideoView component 12. For the VideoView component 11, a player proxy 11 has been created. For the VideoView component 12, a player proxy 12 has been created.
[0259] Among them, video card 2 includes one display area, which corresponds to the VideoView component 2. For the VideoView component 2, a player proxy 2 has been created.
[0260] Among them, video card 3 includes one display area, which corresponds to the VideoView component 3. For the VideoView component 3, a player proxy 3 has been created.
[0261] Assume that the VideoView component 12 is bound to the player 1, the VideoView component 2 is bound to the player 2, and the VideoView component 3 is bound to the player 3.
[0262] Video cards 1, 2, and 3 are displayed on the desktop. The user can click on the three quick application video cards on the desktop in sequence. Here, an example is given where the user first clicks on video card 3, then clicks on video card 1, and then clicks on video card 2.
[0263] In the third embodiment, refer to Figure 9A As shown, the method provided by this application includes the following steps S301 - S321.
[0264] S301, The desktop application receives the operation of the user clicking on video card 3.
[0265] S302, The desktop application instructs video card 3 to start playing.
[0266] S303, The player agent 3 of video card 3 receives the instruction message, and the player agent 3 determines whether the VideoView component 3 has been bound to a player.
[0267] S304, When the player agent 3 determines that the VideoView component 3 has been bound to player 3, the player agent 3 instructs the VideoView component 3 to play the video through player 3.
[0268] S305, The VideoView component 3 plays the video through player 3.
[0269] S306, The player agent 3 also sends a message to the player management module that player 3 is occupied by the VideoView component 3.
[0270] S307, The player management module stores the player occupation order: 1. (Player 3, Card 3, VideoView component 3).
[0271] Through the above steps, in response to the user clicking on video card 3 on the desktop, the electronic device can display the video content corresponding to the video source of video card 3 on video card 3.
[0272] After the user clicks on video card 3 on the desktop and triggers video card 3 to start playing, the user then clicks on video card 1 on the desktop to trigger video card 1 to start playing.
[0273] S308, The desktop application receives the operation of the user clicking on area 12 of video card 1.
[0274] S309, The desktop application instructs area 12 of video card 1 to start playing.
[0275] S310, The player agent 12 corresponding to area 12 of video card 1 receives the instruction message, and the player agent 12 determines whether the VideoView component 12 has been bound to a player.
[0276] S311. When the player agent 12 determines that the VideoView component 12 has been bound to the player 1, the player agent 12 instructs the VideoView component 12 to play the video through the player 1.
[0277] S312. The VideoView component 12 calls the player 1 to play the video.
[0278] S313. The player agent 2 also sends a message to the player management module indicating that the player 1 is occupied by the VideoView component 12.
[0279] S314. The player management module stores the player occupation order:
[0280] 1. (Player 3, Card 3, VideoView component 3);
[0281] 2. (Player 1, Card 1, VideoView component 12).
[0282] Through the above steps, in response to the user clicking on the area 12 of the video card 1 on the desktop, the electronic device can display the video content corresponding to the video source of the area 12 of the video card 1 in the area 12 of the video card 1. It should be noted that at this time, the video is not played in the area 11 of the video card 1.
[0283] After the user clicks on the video card 1 on the desktop and triggers the video card 1 to start playing, the user then clicks on the card 2 on the desktop to trigger the card 2 to start playing.
[0284] S315. The desktop application receives the operation of the user clicking on the video card 2.
[0285] S316. The desktop application instructs the video card 2 to start playing.
[0286] S317. The player agent 2 of the video card 2 receives the instruction message, and the player agent 2 determines whether the VideoView component 2 has been bound to the player.
[0287] S318. When the player agent 2 determines that the VideoView component 2 has been bound to the player 2, the player agent 2 instructs the VideoView component 2 to play the video through the player 2.
[0288] S319. The VideoView component 2 calls the player 2 to play the video.
[0289] Through the above steps, in response to the user clicking on the video card 2 on the desktop, the electronic device can display the video content corresponding to the video source of the video card 2 in the video card 2.
[0290] S320, the player agent 2 also sends a message of "Player 2 is occupied by VideoView component 2" to the player management module.
[0291] S321, the player management module stores the player occupation order:
[0292] 1. (Player 3, Card 3, VideoView component 3);
[0293] 2. (Player 1, Card 1, VideoView component 12);
[0294] 3. (Player 2, Card 2, VideoView component 2).
[0295] For example, Figure 9B is a schematic diagram of the scenario of the method for playing videos based on quick application cards provided by the embodiments of the present application. As Figure 9B shown in (a) of, video card 1, video card 2, and video card 3 are displayed on the desktop. Among them, video card 1 corresponds to VideoView component 11 and VideoView component 12, video card 2 corresponds to VideoView component 2, and video card 3 corresponds to VideoView component 3. As Figure 9B shown in (a) to (d) of, when the user first clicks video card 3, then clicks video card 1, and then clicks video card 2, it will trigger video card 3, video card 1, and video card 2 to play video content in sequence, and the electronic device stores the player occupation order: (1) Card 3 occupies Player 3, (2) Card 1 occupies Player 1, (3) Card 2 occupies Player 2.
[0296] In Embodiment 3, taking a total of three players as an example for exemplary illustration, all three players are occupied, and the player management module stores the player occupation order. The following combines Figure 10A to illustrate the process of the player management module unbinding and re-binding the players according to the player occupation order.
[0297] In response to the user operation, the electronic device adds a new video card 4 on the desktop, and this video card 4 corresponds to VideoView component 4 and player agent 4. The user can click on video card 4 on the desktop to trigger video card 4 to start playing. The following illustrates the process of player unbinding and re-binding in this case. Referring to Figure 10A shown, the method includes the following steps S322 - S333.
[0298] S322, the desktop application receives the operation of the user clicking on video card 4.
[0299] S323, the desktop application instructs video card 4 to start playing.
[0300] S324, the player agent 4 of video card 4 receives the instruction message, and the player agent 4 determines whether the VideoView component 4 has been bound to a player.
[0301] S325, in the case where the player agent 4 determines that the VideoView component 4 is not bound to a player, the player agent 4 sends message 6 to the player management module, and this message 6 is used to request to bind a player to the VideoView component 4.
[0302] It should be noted that, in the case where the player agent 4 determines that the VideoView component 4 is bound to a player, the player agent 4 instructs the VideoView component 4 to call the bound player to start playing.
[0303] S326, the player management module determines whether video card 4 has been bound to a player according to message 6.
[0304] S327, in the case where the player management module determines that video card 4 is not bound to a player, the player management module continues to determine whether there is a bound but idle player.
[0305] In some embodiments, if a certain player is in an idle state and not bound, then the player management module can confirm that there is an idle player. Then the player management module can bind the VideoView component 4 to the idle player.
[0306] In some embodiments, if the player management module detects that a certain player is bound but not currently in use, then the player management module can confirm that there is a bound but idle player. In this case, the player management module can release the bound but idle player. Then the player management module can bind the VideoView component 4 to the released player.
[0307] In some embodiments, if all players are bound and currently in use, then the player management module can confirm that there is no bound but idle player. In this case, the following S228 is executed.
[0308] S328, in the case where the player management module determines that there is no bound but idle player, the player management module continues to determine whether the number of occupied players is equal to 3.
[0309] Among them, in the case where the number of occupied players is equal to 3, it means that all 3 players are bound / occupied, and one of the players needs to be released.
[0310] S329, when the player management module determines that the number of occupied players is equal to 3, the player management module releases the earliest bound player in the occupation order of the three players according to the occupation order of the three players.
[0311] The three players occupy the following order:
[0312] 1. (Player 3, Card 3, VideoView component 3);
[0313] 2. (Player 1, Card 1, VideoView component 12);
[0314] 3.(Player 2, Card 2, VideoView component 2).
[0315] Among them, player 3 is occupied first, and player 3 is released first.
[0316] The player management module releases the mapping relationship (player 3, VideoView component 3), and binds the released player 3 to the VideoView component 4.
[0317] S330, the player management module updates the player occupancy order.
[0318] The updated player occupancy order is:
[0319] 1 (Player 1, Card 1, VideoView component 12);
[0320] 2. (Player 2, Card 2, VideoView component 2);
[0321] 3.(Player 3, card 4, VideoView component 4).
[0322] S331, the player management module indicates to the player agent 4 that the player 3 and the VideoView component 4 have been successfully bound.
[0323] S332, the player agent 4 instructs the VideoView component 4 to call the player 3 to play the video.
[0324] S333, VideoView component 4 of card 4 calls player 3 to start playing the video.
[0325] For example, Figure 10B Schematic diagram of a scenario of a method for playing a video based on a quick application card provided in an embodiment of the present application. Figure 10BAs shown in (a) therein, four video cards are displayed on the desktop, and three of the video cards respectively occupy three players, and the occupation order is: (1) Video card 3 occupies Player 3, (2) Video card 1 occupies Player 1, (3) Video card 2 occupies Player 2. As Figure 10B As shown in (a) and (b) therein, when the user clicks on Video card 4, the three players are all occupied. The electronic device releases the earliest occupied Player 3, and Video card 4 occupies Player 3, and the occupation order is updated to: (1) Video card 1 occupies Player 1, (2) Video card 2 occupies Player 2, (3) Video card 4 occupies Player 3.
[0326] It should be noted that in the embodiments of the present application, "greater than" can be replaced by "greater than or equal to", "less than or equal to" can be replaced by "less than", or, "greater than or equal to" can be replaced by "greater than", "less than" can be replaced by "less than or equal to".
[0327] Each of the embodiments described herein can be an independent solution or can be combined according to the internal logic, and these solutions all fall within the protection scope of the present application.
[0328] The above mainly describes the solutions provided by the embodiments of the present application from the perspective of method steps. It can be understood that in order to implement the above functions, the electronic device implementing the method includes the corresponding hardware structure and / or software module for executing each function. Those skilled in the art should be able to realize that, combining the units and algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a certain function is executed in the way of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the protection scope of the present application.
[0329] The present application also provides a chip, which is coupled to a memory, and the chip is used to read and execute the computer program or instructions stored in the memory to execute the methods in the above embodiments.
[0330] The present application also provides an electronic device, which includes a chip, and the chip is used to read and execute the computer program or instructions stored in the memory, so that the methods in the embodiments are executed.
[0331] This embodiment also provides a computer-readable storage medium, in which computer instructions are stored. When the computer instructions run on an electronic device, the electronic device is enabled to execute the above relevant method steps to implement the method for playing videos based on quick application cards in the above embodiments.
[0332] This embodiment also provides a computer program product. The computer-readable storage medium stores program codes. When the computer program product runs on a computer, the computer is enabled to execute the above-related steps to implement the method for playing a video based on a quick application card in the above embodiment.
[0333] In addition, an embodiment of the present application also provides a device, which may specifically be a chip, a component or a module. The device may include a processor and a memory connected to each other. The memory is used to store computer execution instructions. When the device runs, the processor may execute the computer execution instructions stored in the memory to enable the chip to execute the method for playing a video based on a quick application card in each of the above method embodiments.
[0334] Among them, the electronic device, the computer-readable storage medium, the computer program product or the chip provided in this embodiment are all used to execute the corresponding method provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding method provided above, and will not be elaborated here.
[0335] In several embodiments provided by the present application, it should be understood that the disclosed device and method can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of modules or units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling or direct coupling or communication connection to each other can be through some interfaces. The indirect coupling or communication connection of the device or unit can be in an electrical, mechanical or other form.
[0336] As described above, only the specific implementation manners of the present application are provided, but the protection scope of the present application is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present application, and all should be covered by the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claimed rights.
Claims
1. A method for playing videos based on a quick application card, characterized in that: Applied to an electronic device, the electronic device includes M players, M is a preset value greater than 1; the method includes: Displaying at least one quick application card on the desktop, wherein the at least one quick application card includes a first card; the first card includes a first display area and a second display area; In response to a user operation on the first display area, playing a video in the first display area through a first player among the M players; When a user operation on the second display area is received, the video is played in the second display area through the first player, and the video playback in the first display area is stopped.
2. The method according to claim 1, characterized in that The at least one quick application card further includes a second card; and the method further includes: When the user's operation on the second card is received, the video is played at the second card through the second player among the M players.
3. The method according to claim 2, characterized in that M is 3, the at least one quick app card further includes a third card and a fourth card; and the method further includes: When receiving an operation of the user on the third card, playing the video at the third card through a third player among the M players; When receiving the user's operation on the fourth card, it is determined that the number of occupied players is equal to 3, and the video is played at the fourth card through the earliest occupied player among the M players.
4. The method according to claim 1, characterized in that: The first card includes a first VideoView component and a second VideoView component, the first display area corresponds to the first VideoView component, and the second display area corresponds to the second VideoView component; In response to the user's operation on the first display area, playing the video in the first display area through the first player among the M players includes: In response to a user operation on the first display area, determining whether the first VideoView component is associated with a player; When the first VideoView component is not associated with a player, determining whether the first card is associated with a player; When the first card is not associated with a player, the first VideoView component is associated with a first player that meets preset conditions; the first player is called through the first VideoView component to play the video in the first display area.
5. The method according to claim 4, characterized in that The step of playing the video in the second display area by using the first player when receiving an operation of the user on the second display area includes: Receiving a first operation of the user on the second display area, where the first operation is an operation of triggering video playback; In response to the first operation, determining whether the second VideoView component is associated with a player; When it is determined that the second VideoView component is not associated with a player, determining whether the first card is associated with a player; When it is determined that the first VideoView component in the first card is associated with the first player, the first VideoView component is disassociated from the first player, and the second VideoView component is associated with the first player; the first player is called through the second VideoView component, and the first video is played in the second display area.
6. The method according to claim 4 or 5, characterized in that: The first player that meets the preset condition is a player that is in an idle state among the M players; or, when the M players are all associated and in an occupied state, the first player is the player that is associated earliest among the M players.
7. The method according to any one of claims 4 to 6, characterized in that Before associating the first VideoView component with the first player that meets the preset condition, the method further includes: Determine whether there is a player that has been associated and is in an idle state among the M players; When it is determined that there is a player that has been associated and is in an idle state among the M players, disassociating the player that has been associated and is in an idle state, and determining the disassociated player as the first player; When it is determined that there is no associated player in the M players that is in an idle state, determine whether the number of associated players that is in an occupied state is equal to M; when it is determined that the number of associated players that is in an occupied state is equal to M, disassociate and release the earliest associated player among the M players, and determine the released player as the first player that meets the preset condition.
8. The method according to any one of claims 3 to 7, characterized in that The method further comprises: Whenever a player among the M players is associated, updating the player association order; The earliest associated player among the M players is determined according to the updated player association order.
9. The method according to any one of claims 1 to 8, characterized in that Before displaying at least one quick application card on the desktop, the method further includes: receiving a second operation of a user adding the first card to the desktop; In response to the second operation, calling a desktop application to load the first card to the desktop; A first VideoView component is created for a first display area of the first card, and a second VideoView component is created for a second display area of the first card.
10. The method according to claim 9, characterized in that The method further comprises: In the case of calling a desktop application to load the first card onto the desktop, detecting whether the first card carries automatic play attribute information; When it is detected that the first VideoView component carries the attribute information of automatic play, the first VideoView component is associated with a first player among the M players that meets a preset condition.
11. The method according to claim 10, characterized in that The displaying of at least one card on the desktop includes: The first card is displayed on the desktop, and based on the automatic play attribute information carried by the first VideoView component, the first player is called through the first VideoView component to play the second video in the first display area of the first card.
12. The method according to claim 5, characterized in that After associating the second VideoView component with the first player, the method further includes: A first mapping relationship between the second display area, the second VideoView component, the first player, and the first video is stored.
13. The method according to claim 12, characterized in that The calling the first player through the second VideoView component to play the first video in the second display area includes: Based on the first mapping relationship, the first player is called through the second VideoView component to play the first video in the second display area.
14. The method according to claim 5, 12 or 13, characterized in that The electronic device includes a player management module; The step of, when it is determined that the first VideoView component in the first card is associated with the first player, disassociating the first VideoView component from the first player and associating the second VideoView component with the first player includes: When the player management module determines that the first VideoView component is associated with the first player, the player management module disassociates the first VideoView component from the first player and associates the second VideoView component with the first player.
15. An electronic device, characterized in that: The electronic device comprises a processor, a memory, and a computer program stored in the memory, wherein the processor is configured to execute the computer program so that the electronic device implements the method according to any one of claims 1 to 14.
16. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed on an electronic device, the electronic device executes the method according to any one of claims 1 to 14.
17. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by an electronic device, the electronic device executes the method according to any one of claims 1 to 14.