Video playing method, electronic equipment and storage medium
By using the same video adapter to play videos on different interfaces of electronic devices, the problem of discontinuous video progress is solved, improving the user experience and enhancing advertising effectiveness.
Patent Information
- Application Number
- CN202411048373.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-31
- Publication Date
- 2026-02-10
AI Technical Summary
After switching video playback interfaces on electronic devices, the video progress becomes discontinuous, affecting user experience and causing a decrease in the exposure and completion rate of advertising videos.
By using the same video adapter to play the same video in different interfaces, the continuity of video progress is ensured, memory usage is reduced, and playback latency is decreased.
It improves user experience, avoids repeated ad viewing, increases ad exposure and completion rates, and saves memory on electronic devices.
Smart Images

Figure CN121509720A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of terminal technology, and in particular to a video playback method, electronic device, and storage medium. Background Technology
[0002] With the development of terminal technology, electronic devices are becoming increasingly feature-rich, allowing users to play videos.
[0003] Currently, electronic devices can play the same video on different video playback interfaces by switching between them. However, after switching video playback interfaces, the playback progress of the same video on different interfaces is not continuous, which affects the user experience. Summary of the Invention
[0004] This application provides a video playback method, an electronic device, and a storage medium. In this method, after the electronic device switches to display a video playback interface, the electronic device plays the same video at the same video progress, thereby improving the user experience.
[0005] To achieve the above objectives, the embodiments of this application adopt the following technical solutions:
[0006] Firstly, a video playback method is provided, applicable to electronic devices such as mobile phones and tablets. The method includes the electronic device displaying a first interface of a first application, the first interface including a first video currently playing. Next, when the first video reaches a first progress point, the electronic device receives a trigger operation on the first video. Subsequently, in response to the trigger operation on the first video, a second interface is displayed, the second interface including the first video that has started playing at the first progress point.
[0007] In the above method, after the electronic device switches video playback interfaces—for example, from displaying a first interface to displaying a second interface—the electronic device can still play the first video at the same progress. This way, the user can see the first video at the same playback progress on different interfaces. In other words, the user can see the first video with continuous playback progress on different interfaces, which improves the user experience.
[0008] In one possible design of the first aspect, the second interface further includes a return control, and the method further includes: when the first video plays to a second progress level, the electronic device receives a trigger operation on the return control. In response to the trigger operation on the return control, the electronic device displays the first interface, which includes the first video that has started playing at the second progress level.
[0009] In another possible design of the first aspect, the method further includes: when the electronic device displays a first interface, a first view plays a first video on the first interface via a video adapter; when the electronic device displays a second interface, a second view plays the first video on the second interface via a video adapter. That is, the first view and the second view use the same video adapter to play the video.
[0010] In this design, the first and second views each use the same video adapter, playing the same video on different screens. Compared to some solutions where the electronic device plays the same video through different video adapters, using the same video adapter saves the device's memory. Furthermore, by using the same video adapter, the device doesn't need to record playback progress or perform navigation, reducing playback latency.
[0011] In another possible design of the first aspect, the aforementioned first view plays the first video on the first interface through a video adapter, including: the first view calls a texture view located on the first handle to play the first video on the first interface; the texture view located on the first handle is obtained by the video adapter through the video file of the first video; the second view plays the first video on the second interface through the video adapter, including: the second view calls a texture view located on the first handle to play the first video on the first interface. Here, the texture view can also be referred to as textureview.
[0012] In this design, the first view and the second view can use the same video adapter by calling a texture view located in the same position.
[0013] In another possible design of the first aspect, the method further includes: in response to the operation of launching the first application, the electronic device launches a first view. Then, the first view acquires a video adapter. And, the first view is bound to the video adapter. Wherein, when the electronic device displays a first interface, the first view is used to play a first video on the first interface.
[0014] In response to the operation of launching the first application, the electronic device launching the first view may include, in response to the operation of launching the first application, the electronic device launching the first activity, and the first activity launching the first view. The electronic device can display a first interface through the first activity.
[0015] In one possible design of the first aspect, the electronic device displays a second interface in response to a trigger operation on the first video, including: the electronic device launches a second view in response to the trigger operation on the first video. Next, the second view unbinds the first view from the video adapter. Then, the second view binds to the video adapter. Wherein, when the electronic device displays the second interface, the second view is used to play the first video on the second interface.
[0016] In another possible design of the first aspect, the second view releases the first view from the video adapter by instructing the first view through the video adapter to release the first view's call to the texture view located on the first handle.
[0017] In another possible design of the first aspect, the aforementioned electronic device operates an adapter management module; the first view obtaining the video adapter includes: the first view sending an identifier of the first video to the adapter management module. Then, the adapter management module obtains the video adapter that loads the video file of the first video based on the identifier of the first video. Next, the adapter management module sends the address of the video adapter that loads the video file of the first video to the first view.
[0018] In this design, the adapter management module determines whether the electronic device has a video adapter that has loaded the video file of the first video based on the identifier of the first video. If the electronic device has a video adapter that has loaded the video file of the first video, the electronic device can send the address of the video adapter to the aforementioned first view.
[0019] In another possible design of the first aspect, the adapter management module obtains the video adapter for the video file loaded with the first video based on the identifier of the first video, including: the adapter management module obtains the video file of the first video based on the identifier of the first video. Then, the adapter management module selects the video adapter corresponding to the video file from a preset pool of video adapters. Next, the adapter management module loads the video file into the video adapter corresponding to the video file.
[0020] Secondly, a video playback method is provided, applicable to electronic devices such as mobile phones and tablets. The method includes: the electronic device displaying a third interface of a second application, the third interface including a playing advertisement video. When the advertisement video reaches a third playback progress, the electronic device receives a trigger operation on the advertisement video. Subsequently, in response to the trigger operation on the advertisement video, a fourth interface is displayed, the fourth interface including the advertisement video that has started playing at the third playback progress.
[0021] In one possible design of the second aspect, the aforementioned fourth interface also includes a return control, and the method further includes: when the advertisement video plays to the fourth progress level, the electronic device receives a trigger operation on the return control. Next, in response to the trigger operation on the advertisement video, the electronic device displays a third interface, which includes the advertisement video that has started playing at the fourth progress level.
[0022] In one possible design of the second aspect, the above method further includes: when the electronic device displays a third interface, the advertising page view plays an advertising video on the third interface via a video adapter; when the electronic device displays a fourth interface, the landing page view plays an advertising video on the fourth interface via a video adapter.
[0023] In this design, the first and second views each use the same video adapter, playing the same video on different screens. Compared to some solutions where the electronic device plays the same video through different video adapters, using the same video adapter saves the device's memory. Furthermore, using the same video adapter eliminates the need for the device to record playback progress or perform navigation, reducing latency when playing advertising videos.
[0024] Furthermore, for ad playback, reducing the delay of ad videos on electronic devices can increase ad exposure and completion rates, thereby increasing ad revenue.
[0025] Thirdly, an electronic device is provided, the electronic device including a memory and one or more processors, the memory being coupled to the processors; wherein the memory stores computer program code, the computer program code including computer instructions; when the computer instructions are executed by the processor, the electronic device performs the method provided by the first aspect and any possible design of the first aspect.
[0026] Fourthly, a computer-readable storage medium is provided, including computer instructions that, when executed on an electronic device, cause the electronic device to perform the methods provided by the first aspect and any possible design of the first aspect.
[0027] Fifthly, a computer program product containing instructions is provided, which, when run on an electronic device, enables the electronic device to perform the methods provided by the first aspect and any possible design of the first aspect.
[0028] In a sixth aspect, a chip system is provided for use in an electronic device, the chip system including one or more processors for invoking computer instructions to cause the electronic device to perform the methods provided by the first aspect and any possible design of the first aspect.
[0029] The technical effects of any of the design methods in aspects two through six can be found in the technical effects of different design methods in aspect one, and will not be repeated here. Attached Figure Description
[0030] Figure 1 A schematic diagram of a set of user graphical interfaces provided in the embodiments of this application;
[0031] Figure 2 A schematic diagram of the structure of an electronic device provided in an embodiment of this application;
[0032] Figure 3 A schematic diagram of the architecture of an electronic device provided in an embodiment of this application;
[0033] Figure 4 A flowchart illustrating a video playback method provided in an embodiment of this application;
[0034] Figure 5 A flowchart illustrating another video playback method provided in an embodiment of this application;
[0035] Figure 6 A flowchart and timing diagram illustrating a video playback method provided in an embodiment of this application;
[0036] Figure 7 A schematic diagram of a texture view provided for an embodiment of this application;
[0037] Figure 8 A schematic diagram of a landing page view and an advertising page view provided for embodiments of this application;
[0038] Figure 9 A flowchart and timing diagram illustrating another video playback method provided in an embodiment of this application;
[0039] Figure 10 A flowchart illustrating the adapter management module provided in an embodiment of this application;
[0040] Figure 11 A schematic diagram of another set of user graphical interfaces provided in the embodiments of this application;
[0041] Figure 12 A schematic diagram of yet another set of user graphical interfaces provided in the embodiments of this application;
[0042] Figure 13 A schematic diagram of another set of user graphical interfaces provided in the embodiments of this application;
[0043] Figure 14 A schematic diagram illustrating the structure of another electronic device provided in an embodiment of this application;
[0044] Figure 15 This is a schematic diagram of the structure of the chip system provided in an embodiment of this application. Detailed Implementation
[0045] The technical solutions of the embodiments of this application will be described below with reference to the accompanying drawings. In the description of this application, unless otherwise stated, " / " indicates that the objects before and after are in an "or" relationship. For example, A / B can represent A or B. "And / or" in this application is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, and B alone, where A and B can be singular or plural. Furthermore, in the description of the embodiments of this application, unless otherwise stated, "multiple" refers to two or more. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or multiple. Furthermore, to facilitate a clear description of the technical solutions in the embodiments of this application, the terms "first" and "second" are used in the embodiments of this application to distinguish identical or similar items with substantially the same function and effect. Those skilled in the art will understand that the terms "first" and "second" do not limit the quantity or execution order, and the terms "first" and "second" are not necessarily different.
[0046] In this application, the terms "exemplary" or "for example" are used to indicate that something is an example, illustration, or description. Any embodiment or design described as "exemplary" or "for example" in this application should not be construed as being better or more advantageous than other embodiments or designs. Specifically, the use of terms such as "exemplary" or "for example" is intended to present the relevant concepts in a specific manner to facilitate understanding.
[0047] The technical solutions disclosed in this application involve the collection, storage, use, processing, transmission, provision, and disclosure of users' personal information, all of which comply with relevant laws and regulations and do not violate public order and good morals.
[0048] With the development of terminal technology, electronic devices are becoming increasingly feature-rich, allowing users to play videos.
[0049] Currently, electronic devices can play the same video on different video playback interfaces by switching between them. However, after switching video playback interfaces, the playback progress of the same video on different interfaces is not continuous, which affects the user experience.
[0050] For example, consider a scenario where the electronic device is a mobile phone and the phone is playing a video advertisement. The phone displays an e-book reading interface 200, which includes a first advertisement video 201. The first advertisement video 201 is in playback mode, and its playback progress is an initial progress, such as 0 seconds. Next, the phone displays an e-book reading interface 210, which includes a first advertisement video 211. The playback progress of the first advertisement video 211 is progress A, such as 5 seconds. Then, in response to a trigger operation on the first advertisement video 211, the phone displays an advertisement details interface 220. The advertisement details interface 220 includes the first advertisement video 221. The playback progress of the first advertisement video 221 is the aforementioned initial progress.
[0051] It should be noted that the above Figure 1 The example described uses a mobile phone as an example of an electronic device. In actual use, the electronic device can be any electronic device with video playback capabilities. This application does not impose any limitations on the product form of the electronic device. Furthermore, the above... Figure 1 The example described uses a mobile phone playing video advertisements. In actual use, the mobile phone can also play other videos, and this application does not impose any restrictions on this.
[0052] from Figure 1 As can be seen in the corresponding process, the same video will play on different interfaces on the phone. For example, the phone can play the first advertisement video (e.g., first advertisement video 201, first advertisement video 211, first advertisement video 221) on both the e-book reading interface and the advertisement details interface. However, after the phone switches from the e-book reading interface to the advertisement details interface, the playback progress of the first advertisement video is different. For example, the playback progress of the first advertisement video 211 is progress A, while the playback progress of the first advertisement video 221 is the initial progress. In other words, after the phone switches to the advertisement details interface, the user will repeatedly watch the advertisement video on the advertisement details interface. For example, the user will repeatedly watch the portion of the first advertisement video from the initial progress to progress A. For users, repeatedly watching the advertisement video on the advertisement details interface leads to a monotonous user experience and affects the user experience. For advertisers, users repeatedly watching the advertisement video on the advertisement details interface wastes the time that the advertisement video is displayed to the user, affecting the exposure rate and completion rate of the advertisement video, and thus affecting the advertising effect.
[0053] In view of this, embodiments of this application provide a video playback method, an electronic device, and a storage medium. In this method, after the electronic device switches to display a video playback interface, the electronic device plays the same video at the same video progress, thereby improving the user experience.
[0054] For example, in scenarios where advertisements are played on electronic devices, the video playback method provided in this application can prevent users from repeatedly watching advertisement videos, thus improving the user experience. For advertisers, it can alleviate the waste of advertisement video display time, increase the exposure rate and completion rate of advertisement videos, and increase advertising revenue.
[0055] It is understood that the technical solutions provided in this application can be applied to electronic devices with video playback capabilities. These electronic devices can also be referred to as terminals, terminal devices, user equipment (UE), mobile stations (MS), mobile terminals (MT), etc. These electronic devices can be mobile phones, tablets, wearable devices, smart screens, augmented reality (AR) / virtual reality (VR) devices, laptops, ultra-mobile personal computers (UMPCs), netbooks, personal digital assistants (PDAs), and other electronic devices with video playback capabilities. This application does not impose any limitations on the product form of the electronic devices.
[0056] The structure and architecture of electronic devices will be introduced below.
[0057] First, let's introduce the structure of electronic devices.
[0058] Figure 2 A schematic diagram of the structure of an electronic device 100 is shown. The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a display screen 194, and a sensor module 180, etc. The sensor module 180 may include a pressure sensor 180A, a touch sensor 180K, etc.
[0059] It is understood that the structures illustrated in the embodiments of the present invention do not constitute a specific limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0060] Processor 110 may include one or more processing units, such as: application processor (AP), modem processor, graphics processing unit (GPU), image signal processor (ISP), controller, memory, video codec, digital signal processor (DSP), baseband processor, and / or neural network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.
[0061] The controller can be the nerve center and command center of the electronic device 100. The controller can generate operation control signals according to the instruction opcode and timing signals to complete the control of fetching and executing instructions.
[0062] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can retrieve it directly from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0063] In some embodiments, the processor 110 may include one or more interfaces. Interfaces may include inter-integrated circuit (I2C) interfaces, mobile industry processor interfaces (MIPI), general-purpose input / output (GPIO) interfaces, and / or universal serial bus (USB) interfaces, etc.
[0064] The I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may include multiple I2C buses. The processor 110 can couple the touch sensor 180K through different I2C bus interfaces. For example, the processor 110 can couple the touch sensor 180K through the I2C interface, enabling the processor 110 and the touch sensor 180K to communicate through the I2C bus interface, thereby realizing the touch function of the electronic device 100.
[0065] The MIPI interface can be used to connect the processor 110 to peripheral devices such as the display screen 194 and the camera 193. The MIPI interface includes a camera serial interface (CSI) and a display serial interface (DSI). In some embodiments, the processor 110 and the display screen 194 communicate via the DSI interface to realize the display function of the electronic device 100.
[0066] USB interface 130 is an interface that conforms to the USB standard specification, specifically it can be a Mini USB interface, Micro USB interface, USB Type C interface, etc. USB interface 130 can be used to connect a charger to charge electronic device 100, and it can also be used for data transfer between electronic device 100 and peripheral devices.
[0067] It is understood that the interface connection relationships between the modules illustrated in the embodiments of the present invention are merely illustrative and do not constitute a structural limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may also employ different interface connection methods or combinations of multiple interface connection methods as described in the above embodiments.
[0068] Electronic device 100 implements display functions through a GPU, a display screen 194, and an application processor. 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 and for graphics rendering. Processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.
[0069] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. In some embodiments, the electronic device 100 may include one or N display screens 194, where N is a positive integer greater than 1.
[0070] Video codecs are used to compress or decompress digital video. Electronic device 100 may support one or more video codecs. Thus, electronic device 100 can play or record videos in various encoding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
[0071] The external storage interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external storage interface 120 to perform data storage functions. For example, music, video, and other files can be saved on the external memory card.
[0072] Internal memory 121 can be used to store computer executable program code, which includes instructions. Processor 110 executes various functional applications and data processing of electronic device 100 by running the instructions stored in internal memory 121. Internal memory 121 may include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback, image playback, etc.), etc. The data storage area may store data created during the use of electronic device 100 (such as audio data, phonebook, etc.). Furthermore, internal memory 121 may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc.
[0073] Pressure sensor 180A is used to sense pressure signals and convert them into electrical signals. In some embodiments, pressure sensor 180A can be disposed on display screen 194. There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, and capacitive pressure sensors. A capacitive pressure sensor may include at least two parallel plates with conductive material. When force is applied to pressure sensor 180A, the capacitance between the electrodes changes. Electronic device 100 determines the pressure intensity based on the change in capacitance. When a touch operation is applied to display screen 194, electronic device 100 detects the intensity of the touch operation based on pressure sensor 180A. Electronic device 100 can also calculate the touch position based on the detection signal from pressure sensor 180A. In some embodiments, touch operations applied to the same touch position but with different touch operation intensities can correspond to different operation commands.
[0074] Touch sensor 180K, also known as a "touch panel," can be located on display screen 194. The touch sensor 180K and display screen 194 together form a touchscreen, also known as a "touchscreen." Touch sensor 180K detects touch operations applied to or near it. The touch sensor can then transmit the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through display screen 194.
[0075] Next, we will introduce the architecture of electronic device 100.
[0076] The architecture of the electronic device 100 can adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture. This embodiment of the invention uses a layered architecture based on Android. TM Taking a system as an example, the architecture of electronic device 100 is illustrated. A layered architecture divides the software into several layers, each with a clear role and function. Layers communicate with each other through software interfaces. For an example, see [link to example]. Figure 3 Android TM The system is divided into four layers, from top to bottom: application layer, framework layer (FWK), hardware abstraction layer (HAL), and kernel layer.
[0077] Understandable Figure 3 The software architecture shown does not constitute a specific limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may include more or fewer architectural layers than shown, or combine certain architectural layers, or split certain architectural layers, etc. For Android... TM The system can also be divided into other layers, such as: application layer, application framework layer, native layer, and kernel layer. Furthermore, different operating systems may have different layer divisions. Specifically, the operating system can be divided into different layers based on the actual usage scenario.
[0078] The application layer can include a series of application packages. For example... Figure 3 As shown, the application package can include applications such as advertising applications and e-book applications. Among them, advertising applications can be referred to as ad push applications, ad push services, etc.
[0079] The application framework layer provides application programming interfaces (APIs) and a programming framework for applications in the application layer. The application framework layer includes some predefined functions.
[0080] like Figure 3 As shown, the application framework layer can be divided into two parts: system services and media services.
[0081] A system server is a process that provides many subsystem services. Each subsystem service runs as a thread, waiting for requests from applications, processing the requests, and then returning the results to the applications. These subsystem services include, for example, the Window Manager Service (WMS), the Notification Manager Service (NMS), the Activity Manager Service (AMS), and the Input Manager Service (IMS).
[0082] WMS can be used for window management, window animation management, surface management, and as a relay station for input systems. NMS enables applications to display notification information in the status bar, which can be used to convey informative messages and can disappear automatically after a short pause without user interaction. AMS can be used for the startup, switching, and scheduling of system components (e.g., activities, services, content providers, and broadcast receivers), as well as the management and scheduling of application processes. IMS can be used to manage system input, such as touchscreen input, keypad input, and sensor input. IMS retrieves events from input device nodes (e.g., sensor modules, keypad modules, etc.) and, through interaction with WMS, distributes the events to windows in WMS.
[0083] Media servers are responsible for playing audio and video, as well as drawing and rendering the graphical interfaces displayed on electronic devices.
[0084] The Hardware Abstraction Layer (HAL) is an abstraction layer that sits between the kernel layer and upper layers. It encapsulates kernel-level drivers to provide a unified interface to upper layers. This allows upper-layer applications to abstract away the underlying hardware implementation details without needing to know the specifics of how the lower-level hardware works.
[0085] The Hardware Abstraction Layer (HAL) provides a standard interface to expose device hardware functionality to higher-level application framework layers. The HAL contains multiple library modules, each implementing an interface for a specific type of hardware component. These library modules might include sensor abstraction modules, such as pressure sensor abstraction modules. When the application framework layer requests access to the device hardware, the system loads the corresponding library module for that hardware component. Manufacturers can define interfaces within the HAL.
[0086] The kernel layer is the layer between hardware and software. The kernel layer includes at least display drivers, sensor drivers, and so on.
[0087] For example, an advertising application can be structured using a layered architecture. A layered architecture divides the software into several layers, each with a clear role and function. Layers communicate with each other through software interfaces.
[0088] For example, see again Figure 3 The architecture of an advertising application can be divided into three layers, from top to bottom: the access layer, the business layer, and the functional layer.
[0089] The access layer, also known as the access media layer, provides a software development kit (SDK) that allows other applications to call the SDK and use the functions provided by the advertising application. For example, the access layer may include the advertising application SDK.
[0090] The business layer can also be called the advertising business layer, video advertising business layer, etc. The business layer is used to generate advertisements, such as video ads, text ads, etc. The business layer can include ad page views, landing page views, etc.
[0091] The functional layer can be called the video functional layer, business functional layer, basic business layer, etc. The functional layer provides the players, decoders, etc., required for video playback. For example, the functional layer may include an adapter management module (playeradapter manager). The adapter management module manages video playback adapters. Video playback adapters can be called video players, etc. For ease of description, they will be collectively referred to as video adapters below. Video adapters can generate videos based on video files.
[0092] It should be understood that the above-described architecture for advertising applications is merely an example. In practical applications, advertising applications can also have other architectures, and this application embodiment does not impose any limitations on this.
[0093] Below, taking the scenario of an electronic device playing advertisements as an example, we will introduce the workflow of the modules in the architecture of the aforementioned electronic device.
[0094] After the e-book application launches, it creates a reading interface activity. This activity calls the advertising application's SDK to launch the advertising page view. The advertising page view then binds a video adapter to itself via the adapter management module. The video adapter loads the video file corresponding to the advertising video, enabling the advertising page view to play the video on the reading interface. In other words, the electronic device plays the advertising video on the reading interface. Following this, in response to the triggering operation of the advertising video, the sensor abstraction module generates a touch event based on data sent by the sensor driver. The IMS sends the touch event to the advertising page view, which launches the advertising details interface activity and then the landing page view. After the landing page view launches, it unbinds the video adapter from the advertising page view via the adapter management module, and the adapter management module then binds the video adapter back to the landing page view. Finally, the landing page view plays the advertising video via the video adapter. In this context, the video adapter is bound to a view (e.g., a landing page view or an ad page view). This can be understood as establishing a reference relationship between the video adapter and the view. The view can access the resources of the video adapter and use the video adapter to display the ad video corresponding to the video file loaded by the video adapter on the electronic device's screen. For a detailed explanation of video adapters and views, please refer to the following text; it will not be elaborated upon here.
[0095] It should be noted that in the above process, the landing page view and the ad page view use the same video adapter. For example, the video adapter used by the electronic device when displaying the reading interface is the same as the video adapter used when displaying the ad details interface. Similarly, the handle of the video adapter used by the landing page view is the same as the handle of the video adapter used by the ad page view.
[0096] For example, see Figure 4 After the ad page view is launched, it plays the ad video through video adapter A. Next, in response to a touch event, the ad page view launches the landing page view. After the landing page view launches, it plays the ad video through video adapter A. The touch event mentioned above is generated based on a triggering operation on the ad video.
[0097] In some other solutions to the video playback method provided in this application embodiment, the landing page view and the advertising page view can also use different video adapters. For example, see... Figure 5After the ad page view is launched, it plays the ad video through video adapter B. Then, in response to a touch event, the ad page view records the current playback progress of video adapter B. Next, the ad page view launches the landing page view. After the landing page view launches, it plays the ad video through video adapter C and the recorded playback progress.
[0098] It should be understood that during the playback of the ad video via video adapter C and the aforementioned playback progress on the landing page view, video adapter C needs to load the video file. After the video file is loaded, a seek operation is performed based on the recorded playback progress to ensure that the ad video's playback progress matches the recorded progress. This process takes some time, which will cause a delay in the ad video playback.
[0099] contrast Figure 4 Corresponding solutions and Figure 5 The corresponding solution is in Figure 5 In the corresponding solution, the ad page view and the landing page view use different video adapters to achieve a unified playback progress across different interfaces. This results in a delay in ad video playback, impacting the user experience. However, in Figure 4 In the corresponding solution, only one video adapter is needed to achieve consistent playback progress across different interfaces. Meanwhile, because in Figure 4 In the corresponding solution, there is only one video adapter. After the landing page view starts, the ad video can play directly without loading a video file. This reduces the latency of ad video playback and improves the user experience. Furthermore, because in Figure 5 The corresponding solution requires two video adapters, and Figure 4 Compared to using a single video adapter, using two video adapters will consume more phone memory than using a single video adapter, which may lead to memory shortages on the phone.
[0100] Next, taking a mobile phone as an example of an electronic device, a mobile phone has the above-mentioned features. Figure 2 The structure shown and the above Figure 3 The illustrated architecture, taking a mobile phone in an advertising playback scenario as an example, will be used to introduce the video playback method provided in this application embodiment.
[0101] For example, see Figure 6 The video playback method provided in this application embodiment may include steps S600-S610.
[0102] S600. In response to the operation of opening the e-book reading interface, the phone launches an advertising page view.
[0103] The aforementioned e-book reading interface refers to the e-book reading interface of an e-book application. The operation of opening the e-book reading interface can be an operation to launch the e-book application, such as triggering an operation on the e-book application icon displayed on the desktop. Furthermore, the operation of opening the e-book reading interface can also be a return operation after the phone displays the previous level interface of the e-book reading interface. Additionally, the operation of opening the e-book reading interface can also be a trigger operation on a control that allows navigation to the e-book reading interface; such a control could be an e-book application card, an e-book application notification message, etc. It should be understood that in practical applications, the operation of opening the e-book reading interface can have many variations. Specifically, the operation of opening the first interface can be designed according to actual usage requirements, and this application embodiment does not impose any limitations on this.
[0104] As one possible implementation, in response to the operation of opening the e-book reading interface, the mobile phone launches the first activity, and then the first activity launches the advertising page view.
[0105] The first activity can be the activity for the e-book reading interface. It should be understood that the activity is used to generate the interface, and the view is used to generate the interface elements included in the interface. For example, the first activity can call a drawing function to draw the e-book reading interface. Then, the first activity sends the drawn e-book reading interface to the display so that the phone's screen shows the e-book reading interface. For some interface elements included in the first interface, such as those related to video playback, the first activity can launch the first view, which will then draw these interface elements.
[0106] For example, the first activity can call the advertising application SDK to launch the advertising page view.
[0107] The user graphical interface displayed on the phone during this process is described below, but will not be detailed here.
[0108] S601. The ad page view requests a video adapter from the player adapter manager module.
[0109] Understandably, the ad page view can request a video adapter from the player adapter manager by sending relevant information about the ad video to the adapter management module.
[0110] The relevant information of the aforementioned advertising video may be one or more of the following: the bitrate of the advertising video, the resolution of the advertising video, the encoding format of the advertising video, the name of the advertising video, and the identity document (ID) of the advertising video.
[0111] As one possible implementation, the ad page view sends the ad video ID to the adapter management module. For ease of description below, the ad video ID can be abbreviated as ADID.
[0112] S602. The adapter management module sends the video adapter address to the ad page view.
[0113] The address of the aforementioned video adapter can be the address of the video adapter's texture view, such as a handle to the texture view. This handle indicates the location of the texture view stored in the phone's internal memory. The texture view can be abbreviated as textureview.
[0114] As one possible implementation, after the adapter management module receives the aforementioned ADID, it determines whether a video adapter for the advertisement video exists based on the ADID. Here, a video adapter for the advertisement video can be understood as a video adapter that has loaded the advertisement video corresponding to the aforementioned ADID.
[0115] If no adapter exists for the ad video, the adapter management module creates a video adapter for the ad video and sends the address of the video adapter to the ad page view after the video adapter for the ad video is created.
[0116] The adapter management module can obtain the bitrate, resolution, encoding format, and other information of the video file for the advertisement video based on the aforementioned ADID. Then, based on the bitrate, resolution, and encoding format of the advertisement video, it selects the appropriate video adapter from a set of preset video adapters. The video file of the advertisement video is then loaded into the corresponding video adapter. In this way, the adapter management module completes the creation of a video adapter for the advertisement video.
[0117] If a video adapter for the ad video exists, the adapter management module will send the address of the video adapter for the ad video to the ad page view.
[0118] As a possible example, the adapter management module can record the mapping between video adapter handles and ADIDs. For instance, the adapter management module can record the mapping between ADIDs and handles using key-value pairs, obtaining a list of key-value pairs. After receiving the aforementioned ADID, the adapter management module queries the key-value pair list for the received ADID. If a handle corresponding to the ADID is found, the handle is sent to the ad page view. If a handle corresponding to the ADID is not found, a video adapter for the ad video is created based on the ADID, and the handle of the video adapter for the ad video is sent to the ad page view.
[0119] S603. The ad page view is bound to the video adapter via the video adapter's address.
[0120] Understandably, binding an ad page view to a video adapter means establishing a link between them, allowing for data interaction. The ad page view can call the video adapter, and the video adapter can hold the ad page view. In some implementations, this binding can be described as the ad page view gaining focus.
[0121] As one possible implementation, the ad page view can set the video adapter's player view as its own to bind the ad page view to the video adapter. For example, the ad page view can set the video adapter's default player view as its identifier to bind the ad page view to the video adapter. Here, the default player view can be understood as a parameter value related to binding the video adapter to the ad page view.
[0122] S604. The ad page view plays the ad video based on this video adapter.
[0123] Understandably, once the ad page view is bound to the video adapter, the ad page view can call the video adapter's resources to play ad videos on the e-book reading interface.
[0124] As one possible implementation, the ad page view can obtain a texture view from the video adapter; then, the ad page view calls the texture view to play the ad video on the e-book reading interface.
[0125] In this context, the process of the ad page view obtaining the texture view can be understood as the ad page view establishing a calling relationship with the texture view. After establishing the calling relationship, the ad page view can use the resources carried by the texture view.
[0126] For example, see Figure 7 After the media player native of the video adapter decodes the video file, it transmits the decoded video file to the texture view. The texture view then draws and renders the corresponding video frames based on the decoded video file. In other words, the texture view carries the video frame of the advertisement video corresponding to the video file. After the advertisement page view obtains the texture view, it can perform operations such as cropping and adding playback controls. Next, the advertisement page view plays the advertisement video on the e-book reading interface. It should be noted that... Figure 7 In the text, the boundaries of the texture view are shown with dashed lines, but this does not limit the boundaries of the texture view to be composed of dashed lines. The boundaries of the texture view can also have other variations in actual use, and this application embodiment does not impose any restrictions on this.
[0127] It should be understood that after loading a video file, the video adapter can perform operations such as decoding, rendering, and drawing on the video file; during the process of drawing and rendering the video file, the video adapter can obtain a texture view through the decoded video file.
[0128] S605. In response to the operation of opening the advertisement details interface, the advertisement page view launches the landing page view.
[0129] Understandably, the phone can transmit the operation of opening the advertisement details page through touch events.
[0130] The aforementioned touch event can be sent by IMS to the ad page view. IMS generates the touch event based on the user's triggering action on the ad video within the e-book reading interface. This triggering action can be a click on the ad video. In other words, in response to a click on the ad video, IMS sends a touch event to the ad page view.
[0131] For example, the ad page view registers a listener with IMS, and in response to a touch event generated by IMS, the ad page view obtains the touch event through a callback function.
[0132] The user graphical interface displayed on the phone during this process is described below, but will not be detailed here.
[0133] As one possible implementation, the ad page view can launch the landing page view via an intent.
[0134] For example, the ad page view can launch the ad details page activity via an intent. Next, the ad details page activity launches the landing page view.
[0135] Understandably, the activity is used to draw the interface, and the view is used to draw the interface elements included in the interface. Since both the ad details interface and the e-book reading interface include the same ad video, the same video adapter can be used for both the ad page view and the landing page view. It should be understood that because the two interfaces display the ad video in different positions, and because the playback controls and cropping of the ad video differ, the two interfaces include different views; for example, the e-book reading interface includes the ad page view, and the ad details interface includes the landing page view.
[0136] For example, see Figure 8 Since the advertising page view and the landing page view have similar functions, such as playing advertising videos on the interface, their types can be the same, for example, both being player views. For instance, they could be base player views; that is, both the advertising page view and the landing page view inherit from base player views. The landing page view can be displayed at (A, B) with a right-angled rectangle clipping, while the advertising page view can be displayed at (C, D) with a rounded rectangle clipping. Here, (A, B) represents the coordinates on the mobile phone screen, for example, in pixels.
[0137] It should be noted that the inclusion of the same advertising video in both the ad details page and the e-book reading interface can be understood as meaning that every frame of the advertising video played in the ad details page and the advertising video played in the e-book reading interface is identical. Alternatively, in some cases, the advertising video played in the ad details page and the advertising video played in the e-book reading interface may have some different video frames. For example, the advertising video played in the ad details page may include 90% of the same video frames as the advertising video played in the e-book reading interface, and so on.
[0138] from Figure 8As can be seen, in the method provided in this application embodiment, the landing page view and the advertising page view use the same texture view. This saves mobile phone storage space.
[0139] S606. The landing page view requests a video adapter from the adapter management module.
[0140] As one possible implementation, the landing page view can send its ADID to the adapter management module. Since both the landing page view and the advertising page view play the same advertising video, the ADID sent in step S606 will be the same as the ADID sent in step S601. Based on this, the adapter management module will send the video adapter address to the landing page view, which is the same address sent in step S602.
[0141] S607. The adapter management module sends the video adapter address to the landing page view.
[0142] The descriptions of steps S606 and S607 are similar to those of steps S601 and S602. Please refer to the previous descriptions of steps S601 and S602. They will not be repeated here.
[0143] S608. Unbind the landing page view from the advertising page view and the video adapter.
[0144] As one possible implementation, after the landing page view receives the video adapter's address, it can determine whether the video adapter corresponding to that address already has a binding relationship. If the video adapter corresponding to the address already has a binding relationship, the landing page view instructs that the binding relationship be released.
[0145] For example, the landing page view is bound to the ad page view based on the video adapter, and the landing page view unbinds the ad page view from the video adapter. For instance, the landing page view, bound to the ad page view based on the video adapter, calls the `defaultpalyer.disconnect` function; in response to `defaultpalyer.disconnect`, the ad page view calls the `removeTextureView` function. It should be understood that after the ad page view calls the `removeTextureView` function, the ebook details page stops (pauses) playing the ad video.
[0146] In this context, unbinding the ad page view from the video adapter can also be referred to as the ad page view losing focus.
[0147] Understandably, before the phone executes step S608, the ad page view is bound to the video adapter. Afterwards, the landing page view receives the address of the video adapter. Based on this, the ad page view and the landing page view can exchange information through the video adapter as a relay. For example, the landing page view sends a message to the video adapter instructing it to unbind itself from the video adapter. Then, the video adapter sends this message back to the ad page view. Thus, upon receiving this message, the ad page view unbinds itself from the video adapter.
[0148] S609. The landing page view is bound to the video adapter via the video adapter's address.
[0149] As one possible implementation, the landing page view can set the video adapter's player view to bind the landing page view to the video adapter. For example, the landing page view can set the video adapter's detail player view as its identifier to bind the landing page view to the video adapter. Here, the detail player view can be understood as parameter values related to binding the video adapter to the landing page view.
[0150] S610. The landing page view plays advertising videos based on this video adapter.
[0151] As one possible implementation, the ad page view can obtain a texture view from the video adapter; then, the ad page view plays the ad video based on the texture view. For example, after obtaining the texture view, the ad page view can cancel the pause on the video adapter, meaning the ad page view continues playing the ad video.
[0152] The descriptions of steps S609 and S610 are similar to those of steps S601 and S602. Please refer to the descriptions of steps S604 and S605 above, and they will not be repeated here.
[0153] As can be seen from steps S600-S610 above, both the advertising page view and the landing page view use the same video adapter. Therefore, the video progress of the advertising video played on the advertising details page will be the same as the video progress of the advertising video played on the e-book reading page; this improves the user experience. Furthermore, for mobile phones, compared to the above... Figure 5 The corresponding solution is to use a video adapter, which can save memory on electronic devices.
[0154] At the same time, for advertisers, the fact that the video playback progress on the e-book reading interface is the same as that on the ad details interface can increase the completion rate of the ad video, increase its exposure, and improve the effectiveness of the ad.
[0155] Optionally, after step S610 above, the video playback method provided in this application embodiment may further include steps S611-S613.
[0156] S611. In response to the back operation, the landing page view is destroyed.
[0157] It is understood that the aforementioned return operation can be a trigger operation on the return control included in the advertisement page details interface. Alternatively, it can be a user-triggered gesture return operation. Or, it can be a voice return operation, etc. Specifically, it can be designed according to actual usage needs, and this application embodiment does not limit this. After the user triggers the aforementioned return operation, the mobile phone displays the previous level interface of the advertisement details interface, such as the aforementioned e-book reading interface. That is to say, the mobile phone returns to display the aforementioned e-book reading interface.
[0158] The destruction of the landing page view can be understood as the destruction of the activity on the ad details page, the destruction of the activity based on the ad details page, and the destruction of the landing page view.
[0159] As one possible implementation, the destruction of the landing page view includes at least the following: removing the landing page view from the video adapter. For example, removing the detail player view from the landing page view, and releasing the landing page view from the texture view. In other words, the landing page view stops using the texture view's resources and releases its usage of the texture view.
[0160] It should be understood that the removal of the detail player view from the landing page view and the unbinding of the landing page view from the video adapter can also be described as the landing page view losing focus.
[0161] The user graphical interface displayed on the phone during this process is described below, but will not be detailed here.
[0162] It is understood that the detailed player view and default player view described in the embodiments of this application are used to carry reference relationships. For example, the detailed player view is used to carry the reference of the landing page view to the video adapter, and the default player view is used to carry the reference of the advertising page view to the video adapter. In some other embodiments, the above-mentioned reference relationships can also be adapted to other carriers. The specific replacement method can be set according to actual usage requirements, and the embodiments of this application do not limit this.
[0163] S612. Ad page view is bound to video adapter.
[0164] It should be understood that after the landing page view is destroyed, the ad page view will be in a running state. The ad page view can call the `defaultpalyerview.connect` function to gain focus.
[0165] It should be noted that at least two processes for a view to lose focus are provided in the embodiments of this application. For a view that will be destroyed after losing focus, it loses focus by removing (destroying) the playerview and releasing the call to the textureview. For a view that will not be destroyed after losing focus, it loses focus by disconnecting from the playerview and releasing the call to the textureview. Subsequently, for a view that will not be destroyed after losing focus, it can quickly regain focus by connecting to the playerview, that is, it can quickly bind to the video adapter. This can shorten the mobile phone's interface response time to a certain extent and improve the user experience.
[0166] S613. The ad page view plays ad videos based on the video adapter.
[0167] As one possible implementation, the ad page view video adapter obtains a texture view and plays the ad video based on the texture view.
[0168] It should be understood that the detailed description of step S613 above is similar to that of step S604 above, please refer to the above text, and will not be repeated here.
[0169] Understandably, the above... Figure 6The corresponding description is an introduction to the video playback method provided in the embodiments of this application in the context of advertising playback. Of course, the video playback method provided in the embodiments of this application is not only applicable to advertising playback scenarios, but also to other scenarios that require video playback. The embodiments of this application do not impose any limitations on the application scenarios of the video playback method.
[0170] For example, in a video playback scenario, the execution entities in steps S601-S610 can be replaced. For instance, the aforementioned advertising page view can be replaced with a first video view, and the aforementioned landing page view can be replaced with a second video view. Here, the first video view corresponds to the first activity, and the second video view corresponds to the second activity. The first activity corresponds to the first video playback interface. When the phone displays the first video playback interface, in response to a trigger operation on a preset video, the phone displays the second video playback interface. This trigger operation on the preset video can also be referred to as: opening the second video playback interface. The user graphical interface displayed on the phone during this process will be described below, but will not be detailed here.
[0171] For example, see Figure 9 The video playback method provided in this application embodiment may include steps S900-S910.
[0172] S900. In response to the operation of opening the first video playback interface, the phone launches the first video view.
[0173] S901. The first video view requests a video adapter from the player adapter manager module.
[0174] The first video view can send the identifier of a preset video to the adapter management module to request a video adapter.
[0175] S902. The adapter management module sends the address of the video adapter to the first video view.
[0176] S903. The first video view is bound to the video adapter via the address of the video adapter.
[0177] S904. The first video view plays a preset video based on the video adapter.
[0178] S905. In response to the operation of opening the second video playback interface, the first video view starts the second video view.
[0179] S906. The second video view requests a video adapter from the adapter management module.
[0180] S907. The adapter management module sends the address of the video adapter to the second video view.
[0181] S908. The second video view unbinds the first video view from the video adapter.
[0182] S909. The second video view is bound to the video adapter via the address of the video adapter.
[0183] S910. The second video view plays a preset video based on the video adapter.
[0184] Understandably, steps S900-S910 are similar to steps S600-S610, as described above, and will not be repeated here.
[0185] Optionally, after step S910 above, the video playback method provided in this application embodiment may further include steps S911-S913.
[0186] S911. In response to the return operation, the second video view is destroyed.
[0187] S912. The first video view is bound to the video adapter.
[0188] S913. The first video view plays a preset video based on the video adapter.
[0189] Understandably, steps S911-S913 above are similar to steps S611-S613 above, please refer to the previous description, and will not be repeated here.
[0190] Next, combined Figure 10 The video playback method provided in the embodiments of this application will be further described.
[0191] For example, see Figure 10 The first type of view can be, as mentioned above, an ad page view, a first video view, etc., and this type includes views containing a specified video. The second type of view is obtained as mentioned above, such as a landing page view, a second video view, which can be triggered by the first type of view and also includes views containing a specified video. The specified video can be a pre-set video played on the phone's screen.
[0192] After the first type of view is started, it can request a video adapter from the adapter management module based on the identifier of the specified video.
[0193] Next, the adapter management module determines whether the phone has a corresponding video adapter based on the identifier of the specified video. If the phone does not have a corresponding video adapter, the adapter loading strategy module creates the corresponding video adapter based on the identifier of the specified video. For example, the adapter loading strategy module can obtain the parameters of the specified video based on the identifier, such as the bitrate, resolution, and encoding format of the specified video, and create the corresponding video adapter based on these parameters. If the phone has a corresponding video adapter, the adapter management module determines whether the video adapter has a binding relationship. When the adapter management module determines that the video adapter has a binding relationship, it cancels the binding relationship. The adapter management module can determine whether a video adapter has a binding relationship through the video adapter's player view, such as the detailplayer view or the default player view.
[0194] Next, the first type of view gains focus.
[0195] Subsequently, based on the operation of launching the second type of view, the second type of view requests a video adapter from the adapter management module based on the identifier of the specified video.
[0196] Then, the first type of view loses focus, and the second type of view gains focus.
[0197] The video playback method provided in this application embodiment will be described below in conjunction with the user's experience of using the mobile phone.
[0198] Usage Process 1
[0199] For example, see Figure 11 The phone displays desktop 1100, which includes an icon 1101 for an e-book application.
[0200] Next, in response to a trigger operation on the e-book application icon 1101, the mobile phone displays an e-book reading interface 1110; the e-book reading interface 1110 includes an advertising video 1111. The advertising video 1111 may be in a playing state, meaning that the advertising video 1111 begins playing when the mobile phone starts displaying the e-book reading interface 1110. Optionally, the mobile phone may execute the above steps S600-S604 to play the advertising video 1111 on the e-book reading interface 1110.
[0201] The aforementioned triggering operation can be a user's touch (click) operation on the display screen, and it can also be other operations, which are not limited in this application embodiment. For a detailed description of the triggering operation in this application embodiment, please refer to this document.
[0202] Afterwards, the advertisement video plays to the first progress bar. For example, the phone displays the e-book reading interface 1120; the e-book reading interface 1120 includes the advertisement video 1121, which is in the first progress bar.
[0203] Subsequently, in response to the triggering operation of the first-stage advertisement video 1121, the mobile phone displays the advertisement details interface 1130; the advertisement details interface 1130 includes the first-stage advertisement video 1131, and the advertisement video included in the advertisement details interface 1130 is the same advertisement video as the advertisement video included in the e-book reading interface. Optionally, the mobile phone can perform the above steps S605-S610 to play the first-stage advertisement video 1131 in the advertisement details interface 1130.
[0204] As described above, the mobile phone can play the first-stage advertisement video on the e-book reading interface, and it can also play the first-stage advertisement video on the advertisement details interface. It should be noted that, in practical applications, the two scenarios—playing the first-stage advertisement video on the e-book reading interface and on the advertisement details interface—can be identical. For example, the last frame of the advertisement video played on the e-book reading interface might be the frame preceding the first frame of the advertisement video played on the advertisement details interface. Alternatively, in actual use, there might be some discrepancies; for example, there might be a gap of 1 to 2 video frames between the last frame of the advertisement video played on the e-book reading interface and the first frame of the advertisement video played on the advertisement details interface. The specific implementation should be based on actual usage.
[0205] Optionally, after the mobile phone plays the first stage of the ad video 1131 on the ad details page 1130; see also Figure 12 The mobile phone displays the advertisement details interface 1200, which includes the second-stage advertisement video 1201 and the return control 1202.
[0206] Next, in response to the triggering operation of the return control 1202, the mobile phone displays an e-book reading interface 1210; the e-book reading interface 1210 includes a second-stage advertising video 1211, and the advertising video included in the e-book reading interface 1210 is the same advertising video included in the aforementioned advertising details interface. Optionally, the mobile phone can perform the above steps S611-S613 to play the second-stage advertising video 1211 in the e-book reading interface 1210.
[0207] Usage Process 2
[0208] For example, see Figure 13 The mobile phone displays a video application interface 1300, which includes a first video 1301. The first video 1301 is in playback mode; that is, when the mobile phone starts displaying the video application interface 1300, the first video 1301 begins playing. Optionally, S900-S904 configures the playback of the first video 1301 within the video application interface 1300.
[0209] Then, the first video plays to the third progress level. For example, the phone displays the video application interface 1310; the video application interface 1310 includes the first video 1311, which is in the third progress level.
[0210] Next, in response to the trigger operation on the first video 1311, the phone displays a video details interface 1320. The video details interface 1320 includes the first video 1321 in a third progress bar, and the first video included in the video details interface 1320 is the same video as the first video included in the aforementioned video application interface 1300. Optionally, the phone can execute the above-described S905-S910 steps to play the first video 1321 in the third progress bar on the video details interface 1320.
[0211] Optionally, after the phone plays the first video 1321 in the third progress stage on the video details interface 1320, the phone displays the video details interface 1330; the video details interface 1330 includes the first video 1331 in the fourth progress stage and a return control 1332.
[0212] Next, in response to the triggering operation of the return control 1332, the mobile phone displays the video application interface 1340; the video application interface 1340 includes the first video 1341 in the fourth progress, and the first video 1341 included in the video application interface 1340 is the same video as the first video 1331 included in the aforementioned video details interface 1330. Optionally, the mobile phone can perform the above steps S911-S913 to play the first video 1341 in the fourth progress on the video application interface 1340.
[0213] It should be noted that the personal information used in the technical solution of this application is limited to information for which individual consent has been obtained, including but not limited to notifying and reminding users to read the relevant user agreement (notification) and sign the agreement (authorization) which includes authorization of relevant user information before users use the function.
[0214] Based on the algorithmic steps of the various examples described in the embodiments disclosed herein, this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed in hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application in conjunction with the embodiments, but such implementations should not be considered beyond the scope of this application.
[0215] This embodiment can divide the electronic device into functional modules according to the above method example. For example, each function can be divided into its own functional modules, or two or more functions can be integrated into one processing module. The integrated modules can be implemented in hardware. It should be noted that the module division in this embodiment is illustrative and only represents one logical functional division. In actual implementation, there may be other division methods.
[0216] This application also provides an electronic device, such as... Figure 14 As shown, the electronic device may include one or more processors 1801, memory 1802, and communication interfaces 1803.
[0217] The memory 1802, communication interface 1803, and processor 1801 are coupled together. For example, the memory 1802, communication interface 1803, and processor 1801 can be coupled together via bus 1804.
[0218] The communication interface 1803 is used for data transmission with other devices. The memory 1802 stores computer program code. The computer program code includes computer instructions, which, when executed by the processor 1801, cause the electronic device to perform the relevant method steps in the above-described method embodiments of this application.
[0219] The processor 1801 may be a processor or controller, such as a central processing unit (CPU), a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It can implement or execute the various exemplary logic blocks, modules, and circuits described in connection with this disclosure. The processor may also be a combination that implements computational functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.
[0220] The bus 1804 can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The aforementioned bus 1804 can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 14 The symbol is represented by only one line, but this does not mean that there is only one bus or one type of bus.
[0221] This application also provides a chip system, such as... Figure 15 As shown, the chip system 2000 includes at least one processor 2001 and at least one interface circuit 2002. The processor 2001 and the interface circuit 2002 are interconnected via lines. For example, the interface circuit 2002 can be used to receive signals from other devices (e.g., the memory of an electronic device). As another example, the interface circuit 2002 can be used to send signals to other devices (e.g., the processor 2001). Exemplarily, the interface circuit 2002 can read instructions stored in the memory and send those instructions to the processor 2001. When the instructions are executed by the processor 2001, the electronic device can perform the steps in the above embodiments. Of course, the chip system may also include other discrete devices, which are not specifically limited in this application embodiment.
[0222] This application also provides a computer-readable storage medium storing computer program code. When the processor executes the computer program code, the electronic device executes the relevant method steps in the above method embodiments.
[0223] This application also provides a computer program product that, when run on a computer, causes the computer to execute the relevant method steps described in the above method embodiments.
[0224] The electronic devices, computer-readable storage media, or computer program products provided in this application are all used to perform the corresponding methods provided above. Therefore, the beneficial effects they can achieve can be referred to the beneficial effects in the corresponding methods provided above, and will not be repeated here.
[0225] Through the above description of the embodiments, those skilled in the art can clearly understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0226] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0227] The units described as separate components may or may not be physically separate. A component shown as a unit can be one or more physical units; that is, it can be located in one place or distributed in multiple different locations. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0228] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0229] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiments of this application, in essence, or the part that contributes, or all or part of the technical solution, can be embodied in the form of a software product. This software product is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0230] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A video playback method, characterized in that, The method is applied to an electronic device, and the method includes: Displays a first interface of a first application, the first interface including a first video that is being played; When the first video is played to the first progress, the electronic device receives a trigger operation on the first video; In response to a triggering operation on the first video, a second interface is displayed, the second interface including the first video that has started playing at the first progress.
2. The method according to claim 1, characterized in that, The second interface also includes a return control, and the method further includes: When the first video reaches the second progress, the electronic device receives a trigger operation on the return control; In response to a triggering operation on the return control, the first interface is displayed, the first interface including the first video that has started playing at the second progress.
3. The method according to claim 1 or 2, characterized in that, The method further includes: When the electronic device displays a first interface, the first view plays the first video on the first interface via a video adapter; When the electronic device displays a second interface, the second view plays the first video on the second interface through the video adapter.
4. The method according to claim 3, characterized in that, The first view plays the first video on the first interface through a video adapter, including: the first view calls a textureview located at the first handle to play the first video on the first interface; the textureview is obtained by the video adapter through the video file of the first video. The second view plays the first video on the second interface through the video adapter, including: the second view calls the textureview located at the first handle to play the first video on the first interface.
5. The method according to claim 3 or 4, characterized in that, The method further includes: In response to the operation of launching the first application, launch the first view; The first view acquires the video adapter; The first view is bound to the video adapter; When the electronic device displays the first interface, the first view is used to play the first video on the first interface.
6. The method according to claim 5, characterized in that, The method further includes: In response to a trigger operation on the first video, a second view is launched; The second view unbinds the first view from the video adapter; The second view is bound to the video adapter; When the electronic device displays the second interface, the second view is used to play the first video on the second interface.
7. The method according to claim 6, characterized in that, The second view unbinds the first view from the video adapter, including: The second view instructs the first view through the video adapter to release the first view's call to the texture view located in the first handle.
8. The method according to any one of claims 5-7, characterized in that, The electronic device is equipped with an adapter management module; The first view obtains the video adapter including: The first view sends the identifier of the first video to the adapter management module; The adapter management module obtains the video adapter for the video file loaded with the first video based on the identifier of the first video; The adapter management module sends the address of the video adapter that has loaded the video file of the first video to the first view.
9. The method according to claim 8, characterized in that, The adapter management module obtains a video adapter for the video file loaded with the first video based on the identifier of the first video, including: The adapter management module obtains the video file of the first video based on the identifier of the first video; The adapter management module selects the video adapter corresponding to the video file from a variety of preset video adapters; The adapter management module loads the video file into the video adapter corresponding to the video file.
10. A video playback method, characterized in that, The method is applied to an electronic device, and the method includes: Display a third interface of the second application, the third interface including a playing advertisement video; When the advertisement video reaches the third progress level, the electronic device receives a trigger operation on the advertisement video; In response to a triggering operation on the advertising video, a fourth interface is displayed, the fourth interface including the advertising video that has started playing at the third progress level.
11. The method according to claim 10, characterized in that, The fourth interface also includes a return control, and the method further includes: When the advertisement video reaches the fourth progress level, the electronic device receives a trigger operation on the return control; In response to a triggering operation on the advertising video, the third interface is displayed, the third interface including the advertising video that has started playing at the fourth progress.
12. An electronic device, characterized in that, The electronic device includes a processor and a memory; the processor is coupled to the memory; the memory is used to store computer program code; the computer program code includes computer instructions, which, when executed by the processor, cause the electronic device to perform the method as described in any one of claims 1-11.
13. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes computer instructions that, when executed on an electronic device, cause the electronic device to perform the method as described in any one of claims 1-11.
14. A computer program product, characterized in that, The computer program product includes instructions that, when the computer program product is run on an electronic device, cause the electronic device to perform the method as described in any one of claims 1-11 according to the instructions.
Citation Information
Patent Citations
Video playing method and apparatus
CN105847996A
Video playing method and device and storage medium
CN110149544A
Video playing method and device, terminal and storage medium
CN110582017A
Control method and device for player in application, and video playing device
CN110611844A
Playing algorithm based on playing equipment and media qualification type matching optimal player
CN111447499A