Video playing method and device, computer equipment, computer readable storage medium and computer program product
By introducing the first control in the web application, allowing users to play videos from different applications through the web application and switching videos in response to user interaction operations, the problem of single video playback function and poor interactivity in the prior art is solved, and a more efficient and convenient video playback experience is achieved.
Patent Information
- Application Number
- CN202411778332.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-04
- Publication Date
- 2025-03-18
AI Technical Summary
In the prior art, web applications have single functions and poor interactiveness when playing videos, resulting in low video playback efficiency and cumbersome operation.
By displaying a first control in the display interface of the first application, the control is used to play videos from the second application through the web application, and in response to user interaction, determine and play the corresponding second video, thereby achieving convenient switching of the video.
It improves the interactivity and convenience of video playback, improves the playback efficiency of using web applications to play videos from other non-web applications, and enriches the video switching function.
Smart Images

Figure CN119653183A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of multimedia technology, and in particular to a video playback method, device, computer equipment, computer-readable storage medium, and computer program product. Background Art
[0002] With the development of Internet technology, using web applications to play videos has become the mainstream way to spread video content on the Internet due to the advantages of web applications such as cross-platform compatibility, no need for installation, instant updates, low development costs and lightweight.
[0003] In the related art, when playing videos using web pages, there are problems of single function and poor interactivity. Summary of the invention
[0004] Embodiments of the present application provide a video playback method, apparatus, computer equipment, computer-readable storage medium, and computer program product, which can improve the interactivity of video playback.
[0005] The technical solution of the embodiment of the present application is implemented as follows:
[0006] The present application provides a video playback method, the method comprising:
[0007] Displaying a first control in a display interface of a first application, wherein the first control is a control for playing a first video through a web application, the first video is from a second application, and both the first application and the second application are different from the web application;
[0008] Receiving a play instruction for the first video based on the first control, and playing the first video using the web application;
[0009] In response to a first interactive operation on the first video, determining a second video corresponding to the first interactive operation;
[0010] The second video is played using the web application.
[0011] The present application provides a video playback device, the device comprising:
[0012] A first display module is used to display a first control in a display interface of a first application, wherein the first control is a control for playing a first video through a web application, the first video comes from a second application, and both the first application and the second application are different from the web application;
[0013] A first playing module, configured to receive a play instruction for the first video based on the first control, and play the first video using the web application;
[0014] A first determining module, configured to determine, in response to a first interactive operation on the first video, a second video corresponding to the first interactive operation;
[0015] The second playing module is used to play the second video using the web application.
[0016] An embodiment of the present application provides a computer device, including:
[0017] A memory for storing computer executable instructions;
[0018] The processor is used to implement the video playback method provided in the embodiment of the present application when executing the computer executable instructions stored in the memory.
[0019] An embodiment of the present application provides a computer-readable storage medium storing computer-executable instructions for implementing the video playback method provided in the embodiment of the present application when executed by a processor.
[0020] An embodiment of the present application provides a computer program product, including a computer program or computer executable instructions. When the computer program or computer executable instructions are executed by a processor, the video playback method provided in the embodiment of the present application is implemented.
[0021] The embodiments of the present application have the following beneficial effects:
[0022] In an embodiment of the present application, a first control is displayed in a display interface of a first application, and the first control is a control for playing a first video through a web application, and the first video comes from a second application, and both the first application and the second application are different from the web application, and the first application is also different from the second application; when a play instruction for the first video is received based on the first control, the first video is played using the web application, and in the process of playing the first video, it is able to respond to a first interactive operation for the first video, determine the second video corresponding to the first interactive operation, and play the second video using the web application, that is, the switching of the played video is achieved through the first interactive operation, thereby improving the convenience of switching videos, thereby improving the playback efficiency of videos from other non-web applications played using the web application, enriching the video switching function, and improving the interactivity during video playback. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1 is a schematic diagram of a network architecture of an image processing system 100 provided in an embodiment of the present application;
[0024] Figure 2 is a schematic diagram of the structure of the terminal 400-2 provided in an embodiment of the present application;
[0025] Figure 3This is a schematic diagram of a first process of a video playback method provided in an embodiment of the present application;
[0026] Figure 4 It is a first display schematic diagram of the interface display provided in the embodiment of the present application;
[0027] Figure 5 It is a second display schematic diagram of the interface display provided in the embodiment of the present application;
[0028] Figure 6 is a schematic diagram of a first process for determining a second video provided in an embodiment of the present application;
[0029] Figure 7 This is a schematic diagram of a process for constructing a first cache list provided in an embodiment of the present application;
[0030] Figure 8 is a schematic diagram of a second process for determining a second video provided in an embodiment of the present application;
[0031] Fig. 9 is a schematic diagram of a third process for determining a second video provided in an embodiment of the present application;
[0032] Fig.10 is a second flow chart of the video playback method provided in an embodiment of the present application;
[0033] Fig.11A This is a first schematic diagram showing video playback on a web page provided in an embodiment of the present application;
[0034] Fig. 11B This is a second schematic diagram showing video playback on a web page provided in an embodiment of the present application;
[0035] Fig.12 This is a schematic diagram showing the structure of a video playback framework provided in an embodiment of the present application;
[0036] Fig.13 It is a call diagram of the calling relationship between components provided in the embodiment of the present application;
[0037] Fig.14 This is a flow chart for implementing the sliding effect provided in the embodiment of the present application;
[0038] Fig.15 It is a schematic diagram showing the recycling and creation of videos in a virtual list provided in an embodiment of the present application;
[0039] Fig.16 It is a flow chart of a video preloading method provided in an embodiment of the present application;
[0040] Fig.17 It is a schematic diagram of a framework structure of video positioning provided in an embodiment of the present application.
[0041] It should be pointed out that the above-mentioned "first" and "second" are only used to distinguish different solutions, and do not represent the degree of superiority or inferiority of the solutions or the priority in the implementation process. DETAILED DESCRIPTION
[0042] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings. The described embodiments should not be regarded as limiting the present application. All other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of this application.
[0043] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0044] In the following description, the terms "first\second\third" involved are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second\third" can be interchanged with a specific order or sequence where permitted, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.
[0045] In the embodiments of the present application, the term "module" or "unit" refers to a computer program or a part of a computer program with a predetermined function, and works together with other related parts to achieve a predetermined goal, and can be implemented in whole or in part by using software, hardware (such as processing circuits or memories) or a combination thereof. Similarly, a processor (or multiple processors or memories) can be used to implement one or more modules or units. In addition, each module or unit can be part of an overall module or unit that includes the function of the module or unit.
[0046] Unless otherwise defined, all technical and scientific terms used in the embodiments of the present application have the same meanings as those commonly understood by those skilled in the art. The terms used in the embodiments of the present application are only for the purpose of describing the embodiments of the present application and are not intended to limit the present application.
[0047] The relevant data collection and processing in the embodiments of this application should be strictly in accordance with the requirements of relevant laws and regulations when applied in examples, obtain the informed consent or separate consent of the personal information subject, and carry out subsequent data use and processing within the scope of authorization of laws and regulations and the personal information subject.
[0048] Before further describing the embodiments of the present application in detail, the nouns and terms involved in the embodiments of the present application are explained. The nouns and terms involved in the embodiments of the present application are subject to the following interpretations.
[0049] 1) Web Application, also known as Web Application for short, refers to an application built on Web technology. Web technology can be HyperText Markup Language (HTML), Cascading Style Sheets (CSS), JavaScript. Users access and use it through a browser or web view (WebView), and can run without being installed on a local device. Web Application is a lightweight, cross-platform application form with similar interactions and functions to desktop or mobile applications. Web Application is suitable for a variety of scenarios such as online services, e-commerce, and media.
[0050] 2) Immersive flow refers to a content display format that focuses on content and immersive experience. Usually through smooth interactive design and full-screen display, users can focus on a single content and gradually browse the next content by sliding, scrolling, etc. Immersive flow is a single-screen focused, linear browsing content flow presentation method.
[0051] Immersive flow is a user experience design pattern that aims to immerse users in a single content experience through full-screen, non-distracting content display and sliding switching. Immersive flow is commonly seen on short video platforms or in scenes such as graphics, news, and product displays that aim for deep engagement.
[0052] The display forms of immersive flow include: only one content unit (such as a video, an article or a picture) is displayed at a time; users naturally switch to the next content by sliding or scrolling; seamless animation and transition effects enhance the sense of immersion. Immersive flow has the characteristics of single-screen focus, smooth switching, emphasis on visual impact, and strong interactive design.
[0053] 3) Rich Media Content refers to content that contains multiple media forms, including text, pictures, audio, video, animation, interactive elements, etc. Rich media content aims to enhance user experience, attract user attention and increase participation through diverse expressions.
[0054] The characteristics of rich media content include: Characteristic 1, diversity: combining multimedia forms such as video, audio, animation and text to provide more vivid expressions. Characteristic 2, interactivity: allowing users to interact with content (such as clicking, sliding, playing, pausing). Characteristic 3, immersion: providing a more attractive and immersive content experience through rich media technology.
[0055] Application scenarios of rich media content include: Scenario 1, video ads: such as ads with interactive options when played. Scenario 2, e-commerce: including videos and pictures of 360° product displays. Scenario 3, dynamic news: news reports with videos, pictures, and animations.
[0056] 4) Web (World Wide Web, Web) components are independent functional modules that make up a web page or web application, used to encapsulate specific interaction or display logic. Components are usually reusable and customizable and can be used in different web pages or applications.
[0057] The characteristics of web page components include: Modularity: Components are usually encapsulated in independent HTML, CSS and JavaScript, which are easy to reuse; Flexibility: Behavior can be customized through parameters or events. Isolation: Component style and logic are independent to avoid conflicts with other components.
[0058] The application scenarios of web page components include: form components: input boxes, buttons, selection boxes; navigation bars: top navigation menus, sidebar menus; image carousels: automatic playback and user-interactive image switching components; data tables: tables with paging, sorting, and filtering functions.
[0059] 5) Player is a tool or component used to play audio, video or streaming media content. The player provides playback controls (such as play, pause, volume adjustment) and rendering of video or audio files.
[0060] The features of the player include: Media support: supports common media formats (such as MP4, MP3, WebM); Playback control: provides functions such as play, pause, drag progress bar, adjust volume, etc.; Extended functions: may include subtitle support, double-speed playback, advertising insertion, clarity switching, etc.
[0061] The application scenarios of the player include: online video playback: such as video websites; live streaming: supporting real-time video playback of protocols such as HTTP Live Streaming (HLS) and Dynamic Adaptive Streaming over HTTP (DASH); music playback: such as music platforms; embedded content: such as audio and video content in articles.
[0062] 6) Slider / Swiper is a user interface component that supports sliding interaction. It is often used to display a group of pictures, videos or content units, and users can switch to view them by sliding. The characteristics of the slider component include: interactivity: users can switch content by touching the screen or sliding the mouse; dynamic switching: supports automatic carousel or manual switching, with transition animation effects; flexible layout: the sliding direction can be horizontal or vertical.
[0063] The application scenarios of sliding components include: short video streaming, sliding up and down to switch videos; picture carousel: display of products or promotional pictures on the homepage of e-commerce platforms; picture and text cards: display of news, article summaries or data; product display: switching left and right to browse product pictures on e-commerce pages.
[0064] In order to better understand the video playback method provided in the embodiment of the present application, the video playback method in the related art and the existing technical problems are first explained.
[0065] In the related art, suppose that application 1 receives a video forwarding message, and the video to be played in the video forwarding message comes from application 2. Then, in application 1, by clicking on the video forwarding message, the web application interface is entered, and then the start play control in the web application interface is clicked to play the video to be played. During the playback process, only the video playback can be closed, and no other operations can be performed. And when using the web application to play the video to be played, the playback interface is limited and the video presentation effect is poor. If you need to play other videos, you need to slide the page to display the playback entrance of other videos, and then click the playback entrance to play other videos. The operation is cumbersome and the video playback efficiency is low.
[0066] Combining the above-mentioned related technologies, it can be known that the disadvantages of the related technologies include at least: first, weak interactivity and single function during video playback; second, low video playback efficiency.
[0067] The embodiments of the present application provide a video playback method, device, computer equipment, computer-readable storage medium, and computer program product, which can improve the interactivity of video playback. The following describes an exemplary application of the computer equipment provided by the embodiments of the present application. The computer equipment provided by the embodiments of the present application can be implemented as various types of terminals such as laptops, tablet computers, desktop computers, set-top boxes, smart phones, smart speakers, smart watches, smart TVs, vehicle-mounted terminals, robots, drones, medical equipment, and smart wearable devices. It can also be implemented as a server, or a combination of the two. Below, an exemplary application when the computer equipment is implemented as a terminal will be described.
[0068] See also Figure 1 , Figure 1It is a schematic diagram of the network architecture of the video playback system 100 provided in an embodiment of the present application. To support a video playback application, the server 200 and the terminal 400-1 are connected to the terminal 400-2 via the network 300. The network 300 can be a wide area network or a local area network, or a combination of the two.
[0069] Terminal 400-1 uses the second application to play the first video, and shares the first video to terminal 400-2 in the form of a first application message; terminal 400-2 is used to display a first control in the display interface of the first application, the first control is a control for playing the first video through a web application, the first video comes from the second application, and both the first application and the second application are different from the web application; based on the first control, a play instruction for the first video is received, a first play request carrying a first video identifier is generated, and the first play request is sent to the server 200; the server 200 application obtains the first video based on the first play request, and returns the first video to terminal 400-2; terminal 400-2 uses the web application to play the first video; in response to a first interactive operation for the first video, a second play request carrying a second video identifier is generated, and the second play request is sent to server 200; the server 200 application obtains the second video based on the second play request, and returns the second video to terminal 400-2; in this way, terminal 400-2 determines the second video corresponding to the first interactive operation; and uses the web application to play the second video.
[0070] In an embodiment of the present application, terminal 400-2 displays a first control in the display interface of the first application, and the first control is a control for playing a first video through a web application, and the first video comes from a second application, and both the first application and the second application are different from the web application, and the first application is also different from the second application; when a play instruction for the first video is received based on the first control, the first video is played using the web application, and in the process of playing the first video, it can respond to a first interactive operation for the first video, determine the second video corresponding to the first interactive operation, and play the second video using the web application, that is, the switching of the played video is achieved through the first interactive operation, thereby improving the convenience of switching videos, thereby improving the playback efficiency of videos from other non-web applications played using web applications, enriching the video switching function, and improving the interactivity during video playback.
[0071] In some embodiments, the server 200 may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms. The terminal and the server may be directly or indirectly connected via wired or wireless communication, which is not limited in the embodiments of the present application.
[0072] See also Figure 2 , Figure 2 is a schematic diagram of the structure of the terminal 400-2 provided in an embodiment of the present application, Figure 2 The terminal 400-2 shown includes: at least one processor 410, a memory 450, at least one network interface 420 and a user interface 430. The various components in the terminal 400-2 are coupled together via a bus system 440. It is understood that the bus system 440 is used to achieve connection and communication between these components. In addition to the data bus, the bus system 440 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, the bus system 440 is not shown in FIG. Figure 2 Various buses are labeled as bus system 440 .
[0073] The processor 410 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc., where the general-purpose processor can be a microprocessor or any conventional processor, etc.
[0074] The user interface 430 includes one or more output devices 431 that enable presentation of media content, including one or more speakers and / or one or more visual display screens. The user interface 430 also includes one or more input devices 432, including user interface components that facilitate user input, such as a keyboard, mouse, microphone, touch screen display, camera, other input buttons and controls.
[0075] The memory 450 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state memory, hard disk drives, optical disk drives, etc. The memory 450 may optionally include one or more storage devices that are physically remote from the processor 410.
[0076] The memory 450 includes a volatile memory or a non-volatile memory, and may also include both volatile and non-volatile memories. The non-volatile memory may be a read-only memory (ROM), and the volatile memory may be a random access memory (RAM). The memory 450 described in the embodiments of the present application is intended to include any suitable type of memory.
[0077] In some embodiments, memory 450 can store data to support various operations, examples of which include programs, modules, and data structures, or a subset or superset thereof, as exemplarily described below.
[0078] Operating system 451, including system programs for processing various basic system services and performing hardware-related tasks, such as a framework layer, a core library layer, a driver layer, etc., for implementing various basic services and processing hardware-based tasks;
[0079] A network communication module 452, used to reach other electronic devices via one or more (wired or wireless) network interfaces 420, exemplary network interfaces 420 include: Bluetooth, Wireless Compatibility Certification (WiFi), and Universal Serial Bus (USB), etc.;
[0080] a presentation module 453 for enabling presentation of information via one or more output devices 431 (e.g., display screen, speaker, etc.) associated with the user interface 430 (e.g., a user interface for operating peripherals and displaying content and information);
[0081] The input processing module 454 is used to detect one or more user inputs or interactions from one of the one or more input devices 432 and translate the detected inputs or interactions.
[0082] In some embodiments, the device provided in the embodiments of the present application can be implemented in software. Figure 2 The video playback device 455 stored in the memory 450 is shown, which can be software in the form of a program and a plug-in, etc., including the following software modules: a first display module 4551, a first playback module 4552, a first determination module 4553 and a second playback module 4554. These modules are logical, so they can be arbitrarily combined or further split according to the functions implemented. The functions of each module will be described below.
[0083] In other embodiments, the device provided in the embodiments of the present application can be implemented in hardware. As an example, the device provided in the embodiments of the present application can be a processor in the form of a hardware decoding processor, which is programmed to execute the video playback method provided in the embodiments of the present application. For example, the processor in the form of a hardware decoding processor can adopt one or more application specific integrated circuits (Application Specific Integrated Circuit, ASIC), DSP, programmable logic device (Programmable Logic Device, PLD), complex programmable logic device (Complex Programmable Logic Device, CPLD), field programmable gate array (Field-Programmable Gate Array, FPGA) or other electronic components.
[0084] In some embodiments, the terminal can implement the video playback method provided in the embodiment of the present application by running various computer executable instructions or computer programs. For example, computer executable instructions can be microprogram-level commands, machine instructions or software instructions. The computer program can be a native program or software module in the operating system; it can be a native application (APPlication, APP), that is, a program that needs to be installed in the operating system to run, such as an instant messaging APP, an information APP; it can also be a small program that can be embedded in any APP, that is, a program that can be run only by downloading it to a browser environment. In short, the above-mentioned computer executable instructions can be instructions in any form, and the above-mentioned computer program can be an application, module or plug-in in any form.
[0085] The video playback method provided in the embodiment of the present application will be described in conjunction with the exemplary application and implementation of the terminal provided in the embodiment of the present application.
[0086] It should be noted that in the example of the video playback method below, the first video is a short video. Based on the understanding of the following, those skilled in the art can apply the video playback method provided in the embodiment of the present application to the video playback of other types of videos including consulting videos, advertisements, film and television videos, live videos, promotional videos, etc. The embodiment of the present application can also be applied to various scenarios, including but not limited to digital media, social media, education and training, smart transportation, assisted driving, etc.
[0087] See also Figure 3 , Figure 3 This is a flow chart of a video playback method provided in an embodiment of the present application, which will be combined with Figure 3The steps shown illustrate the video playback method provided in the embodiment of the present application. The method can be executed by a computer device. In the embodiment of the present application, the computer device is used as a terminal for example.
[0088] In step S101, a first control is displayed in a display interface of a first application.
[0089] In an embodiment of the present application, the first control is an entry control for playing the first video through a web application. The first video comes from a second application. Both the first application and the second application are different from the web application, and the first application and the second application are also different.
[0090] In some embodiments, the first application and the second application may be two different applications of the same type, for example, the first application and the second application may be different instant messaging applications, or the first application and the second application may be different short video applications. The first application and the second application may also be two applications of different types, for example, the first application is an instant messaging application, and the second application is a short video application; or the first application is a short video application, and the second application is an instant messaging application.
[0091] In some embodiments, the first application can receive a sharing message (or link message) forwarded by the second application, and the sharing message can carry a thumbnail or text link of the first video. The area where the thumbnail or text link is located is the first control, and the first control supports at least one of the following operations: touch operation, voice operation, gesture operation, and posture operation. Taking touch operation as an example, the touch operation can be any operation such as single-click operation, long-press operation, and double-click operation. That is, the above step S101 is to display the first control in the display interface after the first application of the terminal receives the sharing message.
[0092] In step S102, a play instruction for a first video is received based on a first control, and the first video is played using a web application.
[0093] In some embodiments, taking touch operation as an example, when a touch operation is received for a first control, it can be considered that a video playback instruction for a first video is received, the web application is run, and the first video is played using the web application. In this case, the first video can be automatically played.
[0094] In other embodiments, when a touch operation is received on the first control, a web application is run and a thumbnail of the first video is displayed using the web application; then, when a touch operation is received on the thumbnail of the first video in the web application, it can be considered that a video play instruction for the first video is received, and the first video is played using the web application. In this case, touch playback of the first video can be achieved.
[0095] In some embodiments, the implementation process of "using a web application to play the first video" in the above step S102 may include: using a web application to call a preset player, displaying the playback interface of the preset player in the display interface, and the screen-to-body ratio of the playback interface is greater than a screen-to-body ratio threshold; using the preset player to play the first video on the playback interface.
[0096] In some embodiments, the preset player can be a third-party player outside the web application. For example, the preset player can be a player with strong compatibility, high playback quality, good stability, easy use, rich functions, low latency, scalability, high security, and low resource consumption.
[0097] Exemplarily, the preset player can support multiple audio and video formats, including but not limited to common video formats such as mp4, avi, mkv, and audio formats such as mp3, wav, g711. The preset player supports high-resolution playback to ensure the user's viewing experience. The preset player is not prone to freezes, crashes or crashes during playback. The preset player interface is intuitive and easy to operate, and users can use it without additional learning costs. The preset player has functions such as fast forward, fast rewind, screenshot, full screen, picture-in-picture, subtitle selection, and playback speed adjustment.
[0098] In some embodiments, while running a web application, a preset player is called. Calling the preset player means starting the preset player. The first video (or the first video link) can be passed to the preset player, and then parameters such as the start time and subtitle path are added to the control information of the preset player, thereby realizing the call to the preset player.
[0099] In some embodiments, see Figure 4 , the playback interface 1022 can be displayed in the display interface 1021. The screen ratio of the playback interface refers to the ratio of the playback interface to the screen, that is, the ratio of the first area of the playback interface to the second area of the screen. The ratio threshold is a value set in advance based on experience. In order to play the first video in the form of immersive streaming, that is, to play the first video on a large screen or in full screen, the ratio threshold can be 90%, 95%, 98%, etc.
[0100] For example, assuming that the percentage threshold is 95%, the ratio of the first area of the playback interface to the second area of the screen is greater than 95%. Based on this, when the first video is played in the playback interface, the first video can be played in full screen or large screen mode, thereby enhancing the visual effect of the first video, improving the visibility of the video content, and reducing the interference of interface elements.
[0101] In some embodiments, during the process of playing the first video using a web application, the first video can also be paused, continued, and replayed, that is, the following can be executed: in response to a pause instruction for the first video, pausing the first video; displaying at least one of the following in the playback interface: a playback control and a replay control; after pausing the first video, at least one of the following can be executed: in response to a trigger operation for the playback control, continuing to play the first video; in response to a trigger operation for the replay control, replaying the first video.
[0102] In some embodiments, the pause instruction may be at least one of the following: a touch instruction, a voice instruction, a gesture instruction, and a posture instruction. Taking the pause instruction as a touch instruction as an example, the pause instruction may be a single-click operation on the first video.
[0103] In other embodiments, a pause control may also be displayed in the playback interface, based on which the pause instruction may be a touch operation on the pause control, wherein the touch operation on the pause control may be a single-click operation, a long-press operation, or a double-click operation on the pause control.
[0104] Continuing with the above example, when a single-click operation is received for the first video, it is determined that a pause instruction for the first video is received, and the first video is paused.
[0105] In some embodiments, see Figure 5 After pausing the first video, the play control 501 and the replay control 502 may be displayed in the play interface 1022 .
[0106] In some embodiments, the trigger operation for the play control can be a single-click operation, a long-press operation, or a double-click operation on the play control. Similarly, the trigger operation for the replay control can be a single-click operation, a long-press operation, or a double-click operation on the replay control.
[0107] Exemplarily, taking the trigger operation for the playback control as a single-click operation for the playback control as an example, when the single-click operation for the playback control is received, it is determined that the trigger operation for the playback control is received, and the first video continues to be played, that is, the first video frame continues to be played, wherein the first video frame refers to the video frame displayed on the playback interface when the pause command is received.
[0108] Exemplarily, taking the trigger operation for the replay control as a single-click operation on the replay control as an example, when the single-click operation on the replay control is received, it is determined that the trigger operation on the replay control is received, and the first video is replayed, that is, the first video is played starting from the third video frame, wherein the third video frame refers to the video frame with the earliest time information in the first video, and the third video frame can also be considered as the first video frame of the first video.
[0109] In some embodiments, after the above-mentioned "pause playback of the first video", the following can also be performed: obtaining the first video frame, and displaying the first video frame on the playback interface until a trigger operation for the playback control or a trigger operation for the replay control is received, and the first video frame is the video frame displayed on the playback interface when the pause instruction is received.
[0110] In some embodiments, the display brightness of the playback interface may be lowered first, and then the first video frame may be displayed in the playback interface; a pause interface may also be displayed in the playback interface in the form of a floating layer or a pop-up window, and the first video frame may be displayed in the pause interface. For example, assuming that when the 50th video frame of the first video is played, a pause instruction for the first video is received, the 50th video frame is determined as the first video frame.
[0111] In some embodiments, when the first video frame is displayed in the playback interface, if a trigger operation for the playback control is received, the display brightness of the playback interface is restored, and the first video continues to be played using the playback interface, that is, the first video continues to be played with the first video frame as the starting frame.
[0112] In other embodiments, when the first video frame is displayed in the pause interface, if a trigger operation for the play control is received, the pause interface is canceled and the first video continues to be played in the play interface.
[0113] In other embodiments, after the above-mentioned "pause playing the first video", it can also be performed: obtaining a preset image, and displaying the preset image on the playback interface until a trigger operation for the playback control or a trigger operation for the replay control is received.
[0114] In some embodiments, the implementation process of "displaying a preset image on the playback interface" is similar to the implementation process of "displaying the first video frame on the playback interface" described above, with the difference being that one displays a preset image and the other displays the first video frame, that is, the contents displayed by the two are different, and the preset image is an image preset in advance. Exemplarily, the preset image can be a cover image of the first video, and the preset image can also be a user-defined image; therefore, the implementation process of "displaying a preset image on the playback interface" can refer to the implementation process of "displaying the first video frame on the playback interface" described above.
[0115] In some embodiments, in the process of playing the first video using a web application, the video playback speed can also be set, that is, in the process of playing the first video using a web application, the following can be performed: in response to a speed adjustment instruction for the first video, at least two candidate speeds are displayed; in response to a selection operation for a candidate speed, the selected candidate speed is determined as the target speed; and the first video is played at the target speed in the playback interface.
[0116] In some embodiments, similar to the above-mentioned pause instruction, the speed adjustment instruction can be at least one of the following: a touch instruction, a voice instruction, a gesture instruction, and a posture instruction. Taking the speed adjustment instruction as a touch instruction as an example, the speed adjustment instruction can be a two-point touch operation or a triple-click operation for the first video.
[0117] In other embodiments, a speed adjustment control may also be displayed in the playback interface, based on which the speed adjustment instruction may be a touch operation on the speed adjustment control, wherein the touch operation on the speed adjustment control may be a single-click operation, a long-press operation, or a double-click operation on the speed adjustment control.
[0118] Taking the speed adjustment instruction as a two-point touch operation for the first video as an example, when the two-point touch operation for the first video is received, it is determined that the speed adjustment instruction is received, and at least two candidate speeds are displayed in the playback interface, for example, the four candidate speeds of "0.5×", "1.0×", "1.5×" and "2.0×" are displayed; when a single-click operation for the candidate speed "1.5×" is received, it is determined that a selection operation for the candidate speed is received, and "1.5×" is determined as the target speed, that is, 1.5x speed is determined as the target speed; finally, the video frames in the first video are switched at 1.5 times the preset speed in the playback interface, that is, the first video is played at 1.5x speed.
[0119] In some embodiments, through the above-mentioned pause, play, replay and speed settings, users can freely control the playback progress and viewing speed, meet diverse needs, and achieve flexible playback control; speed settings improve efficiency, facilitate users to quickly obtain video content, and provide personalized viewing experience; basic functions are complete and operation is intuitive, thereby improving user experience.
[0120] Continue to see Figure 3 , and the description continues with step S102 above.
[0121] In step S103, in response to a first interactive operation on a first video, a second video corresponding to the first interactive operation is determined.
[0122] In some embodiments, the first interaction operation may be one of the following: a sliding operation, a dragging operation, a voice operation, and a gesture operation. When the first interaction operation is a sliding operation, the first interaction operation may be sliding up and down or sliding left and right; when the first interaction operation is a voice operation, the first interaction operation may be voice "switch to the previous one", "switch to the next one", etc.; when the first interaction operation is a gesture operation, the first interaction operation may be turning the head to the left or raising the hand upward.
[0123] In some embodiments, the first interaction operation corresponds to the second video, that is, different first interaction operations correspond to different second videos.
[0124] For example, when the first interactive operation is sliding up and down, when sliding up, the previous video of the first video is determined as the second video; when sliding down, the next video of the first video is determined as the second video. The previous video (or next video) of the first video refers to the video before the first video (or the video after the first video) in the first cache list.
[0125] In some embodiments, see Figure 6 The implementation process of "determining the second video corresponding to the first interactive operation" in the above step S103 may include the following steps S1031 to S1033, which are described in detail below.
[0126] In step S1031, a first cache list is obtained.
[0127] In the embodiment of the present application, the first cache list at least stores the first video, the third video to be recommended, and the fourth video. Exemplarily, the first cache list may store the first video, the third video to be recommended, and the fourth video; the first cache list may also store the first video, the third video to be recommended, the fourth video, and the tenth video.
[0128] In some embodiments, the first cache list stores videos that have been cached locally, and the first cache list stores at least the first video, and stores at least three videos. In some embodiments, the number of videos stored in the first cache list can also be 4, 5, etc. Considering the resource occupation, the number of videos stored in the first cache list does not exceed the number threshold, which is a value set in advance based on experience. Exemplarily, the number threshold can be 8, 9, 10, etc.
[0129] In step S1032, a first interaction direction of a first interaction operation is determined.
[0130] In some embodiments, the starting coordinates of the starting point of the first interactive operation and the ending coordinates of the ending point of the first interactive operation may be obtained; and then the first interactive direction may be determined based on the starting coordinates and the ending coordinates.
[0131] For example, assuming that the starting coordinates are (2, 1) and the ending coordinates are (2, 8), the first interaction direction is determined to be upward. If the starting coordinates are (2, 8) and the ending coordinates are (2, 1), the first interaction direction is determined to be downward.
[0132] In step S1033, when the first interaction direction is the first direction, the third video is determined as the second video; when the first interaction direction is the second direction, the fourth video is determined as the second video.
[0133] In some embodiments, the first direction and the second direction are pre-set directions, the first direction is different from the second direction, and the first direction and the second direction may be opposite directions to each other.
[0134] Continuing with the above example, assuming that the first interaction operation is a sliding operation, the first interaction direction is upward, the first direction is also upward, and the arrangement order of the videos in the first cache list is the third video, the first video and the fourth video, that is, the third video is the previous video of the first video, then the third video is determined to be the second video.
[0135] Continuing with the above example, assuming that the first interaction operation is a sliding operation, the first interaction direction is downward, the second direction is also downward, and the arrangement order of the videos in the first cache list is the third video, the first video and the fourth video, that is, the fourth video is the next video of the first video, then the fourth video is determined to be the second video.
[0136] Through the above steps S1031 to S1033, the video content is dynamically determined based on the cache list and the interaction direction, providing the user with a smooth and efficient video switching experience. At least three videos (the first video and the recommended video) are pre-stored in the first cache list to ensure that they can be loaded instantly when the user switches the video; the loading delay caused by real-time request of video resources from the server each time the video is switched is avoided, thereby improving the user experience, the video switching is smoother, and the operation is smoother. According to the user's first interaction direction (for example, sliding up or sliding down), the recommended next video (the third video or the fourth video) is flexibly selected; the user's operation needs are accurately met, and the interaction behavior is consistent with the system feedback, thereby improving the user's sense of control over the application and avoiding wrong switching directions or content recommendations that do not meet expectations. The recommended third video and the fourth video are stored in the cache list to ensure that the content after switching is highly relevant content recommended based on the algorithm, thereby ensuring that the user obtains content that is highly relevant to the interest, improving content consumption efficiency, and reducing user loss caused by untimely content loading. Through the cache mechanism, the web application obtains relevant video resources in advance, reduces the real-time request pressure on the server during frequent switching, reduces network requests, saves bandwidth and server resources, and improves the scalability of the system to adapt to more users at the same time. Combined with the caching mechanism and interaction direction, video switching is faster and more intuitive, reducing dissatisfaction caused by delayed or erroneous switching and improving the intelligence of web applications.
[0137] In some embodiments, before the above step S1031, a first cache list may be constructed first. Based on this, when the first cache list stores the first video, the third video, and the fourth video, see Figure 7 Before the above step S1031, the first cache list can also be constructed through the following steps S001 to S004, which are described in detail below.
[0138] In step S001, a recommendation list is obtained.
[0139] In an embodiment of the present application, a first video and multiple videos to be recommended are stored in the recommendation list.
[0140] In some embodiments, the recommendation list is a set of content to be recommended generated by the recommendation system according to the access content or content features disclosed by the user. The content to be recommended in the recommendation list is sorted by priority, wherein the content to be recommended can be one of the following: short videos, movies, TV series, etc.
[0141] In some embodiments, a recommendation list may be generated before step S001, and the method for generating the recommendation list may be one of the following: a rule-based generation method, a collaborative filtering generation method, a context-based recommendation generation method, and a deep learning-based generation method. The recommendation list can improve content matching, increase user stickiness, and optimize the content distribution efficiency of the platform.
[0142] In some embodiments, after the recommendation list is generated, it is considered that the recommendation list is obtained.
[0143] In step S002, two candidate videos adjacent to the first video are obtained from the recommendation list.
[0144] In some embodiments, the first position of the first video in the recommendation list can be determined first. The first position can be represented by the arrangement number of the first video in the recommendation list. For example, if the first video is the first video in the recommendation list, then the first position is 1; then the second position and the third position adjacent to the first position are obtained, wherein the second position stores the first candidate video and the third position stores the second candidate video; then, the first candidate video is obtained from the second position, and the second candidate video is obtained from the third position.
[0145] In step S003, the candidate video located before the first video is determined as the third video, and the candidate video located after the first video is determined as the fourth video.
[0146] In some embodiments, if the second position is located before the first position and the third position is located after the first position, the first candidate video is determined as the third video and the second candidate video is determined as the fourth video.
[0147] In step S004, a first cache list is constructed using the third video, the first video, and the fourth video.
[0148] In some embodiments, an empty initial list may be created first, and then the third video, the first video, and the fourth video may be added to the initial list in sequence to obtain a first cache list.
[0149] Through the above steps S001 to S004, by constructing a cache list mechanism, the loading and display of recommended videos are optimized, and the user experience and system efficiency are improved. The recommendation list stores candidate videos (third and fourth videos) adjacent to the currently playing video (first video), which can be loaded and played immediately when the user switches, thereby avoiding loading delays when switching videos, providing a seamless viewing experience, and suitable for high-frequency switching scenarios such as short videos and content streaming platforms. Determine the adjacent videos as recommendation candidates, which conform to the logical path of the user's viewing stream (previous video and next video), thereby improving the relevance and logic of the recommended content, avoiding irrelevant videos interrupting the user's viewing experience, and supporting continuous content recommendations, such as plot-based short videos and special content. The current video (first video) and the adjacent videos (third and fourth videos) are stored in the cache list together to provide fast access for switching or replaying, thereby reducing the number of network requests, reducing the pressure of real-time loading, and improving system efficiency, so as to cope with poor network conditions. The first video and adjacent videos are added to the first cache list in advance, and the cache content is directly used when the user switches back and forth without repeated loading, thereby saving bandwidth and server resources and improving the response speed of the switching operation.
[0150] In some embodiments, if the third video is determined as the second video in the above step S1033, after the above step S1033, see Figure 8 , the following steps S1034A to S1036A may also be executed, as described in detail below.
[0151] In step S1034A, the fourth video is deleted from the first cache list.
[0152] In some embodiments, the fourth video may be determined from the first cache list based on the third identifier of the fourth video, and then a deletion operation may be triggered to delete the fourth video. For example, a built-in method remove() may be triggered to delete the fourth video.
[0153] In step S1035A, a fifth video adjacent to the second video and located before the second video is obtained from the recommendation list.
[0154] In some embodiments, the implementation process of obtaining the fifth video is similar to the implementation process of obtaining the third video in the above steps S002 and S003. Therefore, the implementation process of obtaining the fifth video can refer to the implementation process of obtaining the third video in the above steps S002 and S003.
[0155] In step S1036A, the fifth video is added to the first cache list.
[0156] In this embodiment of the present application, the fifth video is located before the second video.
[0157] In some embodiments, the first cache list stores the fifth video, the second video, and the first video in order.
[0158] Through the above steps S1034A to S1036A, the order of the first cache list can be maintained by deleting and adding videos, ensuring that the videos in the first cache list always include the currently playing video and two adjacent candidate videos, while saving resources and ensuring real-time loading of the video to improve the response speed.
[0159] In another embodiment, if the fourth video is determined as the second video in the above step S1033, after the above step S1033, see Fig. 9 , the following steps S1034B to S1036B may also be executed, as described in detail below.
[0160] In step S1034B, the third video is deleted from the first cache list.
[0161] In step S1035B, a sixth video adjacent to the second video and located after the second video is obtained from the recommendation list.
[0162] In step S1036B, the sixth video is added to the first cache list.
[0163] In this embodiment of the present application, the sixth video is located after the second video.
[0164] In some embodiments, the implementation process of the above steps S1034B to S1036B is similar to the implementation process of the above steps S1034A to S1036A. Therefore, the implementation process of the above steps S1034B to S1036B can refer to the implementation process of the above steps S1034A to S1036A.
[0165] In some embodiments, before executing the above step S103 "responding to a first interactive operation on a first video", the following may also be performed: displaying a second control in the playback interface of a preset player, where the second control is a control for displaying the information to be recommended; obtaining the information to be recommended in response to a trigger operation on the second control; pausing playback of the first video, and displaying the information to be recommended in the display interface.
[0166] In some embodiments, the type of information to be recommended may be at least one of the following: image, video, audio, text. The trigger operation on the second control may be a single-click operation, a long-press operation, or a double-click operation on the second control.
[0167] Taking the trigger operation for the second control as a single-click operation for the second control as an example, when the single-click operation for the second control is received, it is determined that the trigger operation for the second control is received, and the information to be recommended is obtained.
[0168] In some embodiments, the second control also carries an acquisition address and a storage address for the information to be recommended, wherein the acquisition address refers to a source address for acquiring the information to be recommended, which may be a path pointing to a remote server or a local storage location for accessing the recommended information; the acquisition address points to the source location of the recommended information, and is used to request and load the recommended data. The storage address refers to a target address for saving the information to be recommended, which may be a designated location for storing the recommended information for subsequent use; the storage address points to the storage location of the recommended information, and is used to record and store the recommended information. By loading the recommended information through the acquisition address, the web application requests the recommended information from the acquisition address; the recommended information is saved through the storage address, and after the recommended information is loaded, it is saved locally for subsequent use. The dynamic loading, caching, and storage of recommended information can be achieved through the synergy of the acquisition address and the storage address.
[0169] In some embodiments, after receiving a trigger operation for the second control, the information to be recommended can be automatically obtained based on the acquisition address and the storage address; then, the first video is paused in the playback interface; and finally, the information to be recommended is displayed in the display interface.
[0170] In some embodiments, the implementation of “displaying the information to be recommended in the display interface” may include the following two methods:
[0171] The first implementation method: display the information to be recommended in the playback interface.
[0172] The second implementation method: displaying a recommendation interface in the display interface in the form of a floating layer or a pop-up window, the recommendation interface may cover part or all of the playback interface, and display the information to be recommended in the recommendation interface.
[0173] When the information to be recommended is a video, it is necessary to use the playback interface of a preset player to play the information to be recommended, that is, it is necessary to adopt the first implementation method mentioned above.
[0174] In some embodiments, after the above-mentioned "response to a trigger operation on a second control", the following may also be performed: obtaining the index value of the first video and a first cache list containing the first video; when the display time of the information to be recommended reaches a time threshold, or a close instruction for the information to be recommended is received, obtaining the first video from the first cache list based on the index value; and continuing to play the first video in the playback interface.
[0175] In some embodiments, when the first implementation method described above is used to display the information to be recommended, in response to the trigger operation on the second control, the index value of the first video is also obtained, and the index value is used to represent the position of the first video in the first cache list. Since the first cache list has been loaded when the first video is played, the first cache list remains loaded at this time.
[0176] In some embodiments, the duration threshold is the playback duration corresponding to the information to be recommended, and the duration threshold corresponds to the information to be recommended. The above "when the display duration of the information to be recommended reaches the duration threshold" indicates that the playback of the information to be recommended is completed, or the playback of the information to be recommended is ended.
[0177] In some embodiments, a close control for the information to be recommended may also be displayed on the playback interface, and when a single-click operation on the close control is received, it is determined that a close instruction for the information to be recommended is received.
[0178] In some embodiments, when the playback of the information to be recommended is finished or a closing instruction for the information to be recommended is received, the first video is obtained from the first cache list based on the index value, and the first video continues to be played in the playback interface.
[0179] In some embodiments, the implementation process of "continue playing the first video in the playback interface" mentioned above may be: obtain the playback time of the first video when the information to be recommended starts to be displayed; obtain the second video frame corresponding to the playback time from the first video; use the second video frame as the starting frame, and play the first video in the playback interface.
[0180] In some embodiments, when the recommended information begins to be displayed, the playback time of the first video is obtained in real time, and a second video frame corresponding to the playback time is obtained from the first video. For example, the playback time may be 1 minute and 20 seconds, and the 2400th video frame is being played at this playback time, then the 2400th video frame is determined as the second video frame; based on this, the 2400th video frame is used as the starting frame, and the first video is played in the playback interface, that is, the video frame from the 2400th to the last video frame is played in the playback interface, thereby achieving continued playback of the first video.
[0181] In some embodiments, after the display of the information to be recommended is finished, the original playback progress of the first video can be accurately returned to without manual operation by the user, thereby reducing the sense of interruption in viewing and making the user's viewing experience smoother. The insertion of the information to be recommended will not cause the content playback to be fragmented, thereby improving user satisfaction with the platform and reducing dissatisfaction caused by advertisement insertion. The first video can be directly resumed after the display of the recommended information is finished, thereby reducing the number of users who give up watching due to interruptions, improving user stickiness, and extending the user's stay time on the platform. The first cache list is stored, and there is no need to reload the first video after the display of the recommended information is finished, thereby saving server resources and network traffic. The video content has been cached and can be quickly resumed without affecting the viewing experience due to loading delays. The information to be recommended is displayed during video playback, and the first video information watched by the user is saved at the same time, so that the information to be recommended and the content playback can be seamlessly connected.
[0182] In other embodiments, before the above-mentioned step S103 "responding to the first interactive operation on the first video", the following may also be performed: obtaining a reference display direction corresponding to the first video, and a first display direction of the playback interface of the preset player; when the reference display direction is different from the first display direction, generating rotation prompt information, the rotation prompt information is used to prompt the direction of rotation display; and displaying the rotation prompt information in the playback interface.
[0183] In some embodiments, the metadata of the first video can be obtained, and the metadata can be parsed to obtain the parsed metadata, and then the reference display direction can be obtained from the parsed metadata, and the reference display direction refers to the optimal presentation direction of the video content of the first video relative to the playback interface in the first video display. Among them, the metadata of the first video is additional information that describes the content of the first video, covering the basic information, technical attributes, identification information, etc. of the first video. These metadata provide important support for the display, management, recommendation and retrieval of videos. Metadata is crucial in scenarios such as short video platforms and streaming media platforms. The reference display direction of the first video can be used as part of the metadata to provide guidance for the preset player and system to ensure that the first video is displayed with the best visual effects. This not only optimizes the user experience, but also provides basic support for the recommendation, classification and adaptation of videos to different devices.
[0184] In some embodiments, the reference display direction is used to optimize the visual effect and content adaptability of the video in different interactive scenarios, and the reference display direction is generally divided into a landscape display direction (Landscape) and a portrait display direction (Portrait). Exemplarily, the reference display direction may be landscape or portrait.
[0185] Taking the reference display direction as vertical as an example, when the first display direction is horizontal, indicating that the reference display direction is different from the first display direction, a rotation prompt information of text or voice type is generated, such as the text "Please turn the playback device to vertical"; finally, the rotation prompt information is displayed in the playback interface.
[0186] In some embodiments, the implementation process of the above-mentioned "displaying rotation prompt information in the playback interface" may be: displaying a prompt interface in the playback interface, wherein the first area of the prompt interface is smaller than the second area of the playback interface; and displaying rotation prompt information in the prompt interface.
[0187] In some embodiments, a prompt interface can be displayed in the playback interface in the form of a floating layer or a pop-up window. The first area of the prompt interface is smaller than the second area of the playback interface. The shape of the prompt interface can be a quadrilateral, circle, ellipse, hexagon, etc. This embodiment does not limit the shape.
[0188] In some embodiments, the implementation process of the above-mentioned "displaying a prompt interface in the playback interface" may be: based on preset position information, displaying a prompt interface in the playback interface; or, determining the background image of each video frame in the first video, and displaying the prompt interface in the background area of the playback interface, where the background area is the area where the background image is displayed.
[0189] In some embodiments, the preset position information may include two diagonal coordinate values, and a quadrilateral prompt interface may be determined through the preset position information; the preset position information may also include a center coordinate value and a radius, and a circular prompt interface may be determined through the preset position information. Taking the preset position information including two diagonal coordinate values as an example, in order not to affect the playback effect of the first video, the area determined based on the two diagonal coordinate values may be located in the lower left area of the playback interface, that is, the prompt interface is located in the lower left area of the playback interface. Similarly, the prompt interface may also be located in the upper left area, lower right area, or upper right area of the playback interface.
[0190] In some embodiments, the prompt interface can be displayed in the form of a floating layer in the playback interface, and the transparency of the prompt interface can also be set. The rotation prompt information can be displayed synchronously without affecting the playback of the first video, thereby optimizing the display effect and improving the viewing experience.
[0191] In some embodiments, the background image of each video frame in the first video can be determined by any of the methods of frame difference method, mean method, median method, background modeling, image segmentation, and corner point detection. This embodiment does not limit the method for determining the background image. Based on this, when the video frame is displayed in the playback interface, the area where the background image is displayed is recorded as the background area, and then the prompt interface is displayed in the background area in the form of a floating layer. In this way, if the background area changes with the switching of the video frame, the position of the prompt interface in the playback interface also changes dynamically, so that while the first video is played synchronously and the rotation prompt information is displayed, it can also ensure that the foreground part of the video frame is not blocked, thereby improving the display effect.
[0192] Continue to see Figure 3 , and the description continues with step S103 above.
[0193] In step S104, the second video is played using a web application.
[0194] In some embodiments, the implementation process of the above step S104 can be: determining a reference volume value of the terminal environment, where the terminal is a terminal running a web application; determining a playback volume value based on the reference volume value, and using the web application to play the second video at the playback volume value.
[0195] In some embodiments, a reference volume value of the environment, such as 50 decibels, may be collected by an audio collection component of the terminal; and the implementation methods of "determining the playback volume value based on the reference volume value" include the following two methods:
[0196] In a first implementation, a reference mapping table is obtained, in which a reference volume value, a playback volume value, and a corresponding relationship between the reference volume value and the playback volume value are stored; based on the reference volume value, a corresponding playback volume value is determined from the reference mapping table. For example, based on 50 decibels and the reference mapping table, 70 decibels can be determined as the playback volume.
[0197] The second implementation is to obtain a volume difference value, which is a value preset in advance based on experience. For example, the volume difference value may be 10 decibels, 15 decibels, 20 decibels, etc. Then the sum of the reference volume value and the volume difference value is determined as the playback volume. For example, assuming that the reference volume value is 50 decibels and the volume difference value is 15 decibels, 65 decibels is determined as the playback volume.
[0198] In some embodiments, if the first implementation is adopted, the second video is played at 70 decibels using a web application, wherein the implementation process of playing the second video can refer to the implementation process of "playing the first video using a web application". In addition, during the playing of the second video, if a second interactive operation for the second video is received, similar to the above steps S102 to S104, the video is switched based on the second interactive operation.
[0199] Through the above steps S101 to S104, a first control is displayed in the display interface of the first application, and the first control is a control for playing the first video through the web application, and the first video comes from the second application, and the first application and the second application are different from the web application, and the first application is also different from the second application; when a play instruction for the first video is received based on the first control, the first video is played using the web application, and in the process of playing the first video, it can respond to the first interactive operation for the first video, determine the second video corresponding to the first interactive operation, and play the second video using the web application, that is, the switching of the played video is realized through the first interactive operation, thereby improving the convenience of switching videos, thereby improving the playback efficiency of using the web application to play videos from other non-web applications, and enriching the video switching function, and also improving the interactivity during video playback.
[0200] In some embodiments, if the above step S1033 is to determine the third video as the second video, then after the above step S104, see Fig.10 , the following steps S105 to S111 may also be performed, which are described in detail below.
[0201] In step S105 , in response to a second interactive operation on a second video, a time interval between the second interactive operation and the first interactive operation is determined.
[0202] In some embodiments, a first time for triggering the first interactive operation and a second time for triggering the second interactive operation may be obtained first, and the difference between the second time and the first time may be determined as the time interval.
[0203] Exemplarily, assuming that the first time for triggering the first interactive operation is 14:46:20 and the second time for triggering the second interactive operation is 14:46:30, 10 seconds is determined as the time interval.
[0204] In step S106, it is determined whether the time interval is greater than or equal to the interval threshold.
[0205] In some embodiments, the interval threshold is a value set in advance based on experience, and for example, the interval threshold may be 5 seconds, 10 seconds, 15 seconds, etc. If the time interval is greater than or equal to the interval threshold, it indicates that the time interval between the two interactive operations is normal, and the second video is played normally, and then the process proceeds to step S107; and if the time interval is less than the interval threshold, it indicates that the time interval between the two interactive operations is abnormal, and the second video playback is interrupted, and then the process proceeds to step S109.
[0206] In step S107, based on the second interaction direction of the second interaction operation, the first video or the fifth video in the first cache list is determined to be the seventh video corresponding to the second interaction operation.
[0207] In an embodiment of the present application, the first cache list stores a first video, a second video, and a fifth video.
[0208] Here, if the first cache list is consistent with the current usage scenario, the second interactive operation is continued to be responded to based on the first cache list, and the seventh video is determined from the first video and the fifth video in the first cache list based on the second interactive direction of the second interactive operation. The first cache list stores the fifth video, the second video, and the first video in sequence.
[0209] In some embodiments, the implementation process of the above step S107 is similar to the implementation process of the above step S1033, and therefore, the implementation process of the above step S107 may refer to the implementation process of the above step S1033.
[0210] In step S108, the seventh video is played using the web application, and the process ends.
[0211] In some embodiments, the implementation process of the above step S108 is similar to the implementation process of the above step S104, and therefore, the implementation process of the above step S108 may refer to the implementation process of the above step S104.
[0212] In step S109, a second cache list is obtained.
[0213] In an embodiment of the present application, the second cache list stores the first video, the eighth video, and the ninth video.
[0214] Here, it is characterized that the first cache list does not conform to the current usage scenario, and the first cache list is replaced with the second cache list.
[0215] In some embodiments, the video type in the second cache list is different from the video type in the first cache list. For example, the video type in the second cache list may be: videos belonging to the same theme as the first video; and the video type in the first cache list may be: videos with high heat values related to the first video.
[0216] In step S110, based on the second interaction direction, the eighth video or the ninth video is determined as the seventh video.
[0217] In some embodiments, the implementation process of the above step S110 is similar to the implementation process of the above step S1033, and therefore, the implementation process of the above step S110 may refer to the implementation process of the above step S1033.
[0218] In step S111, the seventh video is played using a web application.
[0219] In some embodiments, in some embodiments, the implementation process of the above step S111 is similar to the implementation process of the above step S104, and therefore, the implementation process of the above step S111 may refer to the implementation process of the above step S104.
[0220] Through the above steps S105 to S111, when the video playback interruption is detected, the cache list is replaced in time to ensure that the video to be recommended meets the usage scenario and improve the video playback effect.
[0221] The following is an explanation of an exemplary application of the embodiments of the present application in a practical application scenario.
[0222] The embodiment of the present application deploys a player and a sliding screen component based on the Web end, and also optimizes the video playback on the Web end, thereby achieving an immersive video experience on the Web end. This immersive video experience is the same as the native application deployed by the terminal operating system, and the immersive video experience on the Web end can also be applied across terminals to any device terminal that supports the browser. Through a consistent immersive video experience, the H5 web page video content shared through the APP application can achieve the same content experience as the APP, achieving product consistency. Among them, the Web end corresponds to the web application in other embodiments, and the player corresponds to the preset player in other embodiments.
[0223] Compared with the traditional feed flow, the immersive flow presents content in a list format, providing a more immersive reading experience. The immersive flow highlights the details and features of rich media content, enhances user engagement and interactivity, and improves user participation and social experience. At the same time, the immersive flow style usually displays content in the form of large images or full screens, providing a larger display space and better visual effects for recommended information (such as advertisements), bringing higher user engagement and commercial benefits. By testing the grayscale immersive solution, there is a positive benefit on the exposure and click indicators of the business page, which effectively helps improve business benefits.
[0224] Through the implementation of the Web, the cross-terminal Web component application can be applied to various device terminals to achieve cross-terminal functions. Anti-shake design and detection are carried out using native user gesture calculation processing, and virtual lists are built to recycle memory in time to achieve high performance. Seamless sliding of content is achieved through content preloading to enhance user experience. Compared with the traditional feed flow, the immersive flow presents content in the form of a list, providing a more immersive reading experience. The immersive flow highlights the details and features of rich media content, enhances user participation and interactivity, and improves user participation and social experience.
[0225] Fig.11A This is a first display schematic diagram of a web page video playback provided by an embodiment of the present application. The embodiment of the present application can achieve a one-swipe-down-one-screen effect. When the screen displays Fig.11A When the display interface 1001 is shown, the screen responds to a downward sliding operation, and the video playback can be switched, and the display interface 1001 is switched to the display interface 1002, such as Fig. 11B As shown, Fig. 11B This is a second schematic diagram showing video playback on a web page provided in an embodiment of the present application.
[0226] In some embodiments, see Fig.12 , Fig.12 This is a schematic diagram showing the structure of a video playback framework provided by an embodiment of the present application. The video playback framework 1100 includes an immersive player card 1101, a sliding component 1102, and a recommendation list 1103. The immersive player card 1101 includes a playback control management component 1011, a player 1012, and a children component 1013; the sliding component 1102 includes a sliding animation 1021 and a virtual list 1022. In addition, the player 1012 has functions such as video preloading, event triggering, progress bar display, and multiple-speed playback.
[0227] In some embodiments, see Fig.12When a sliding operation is detected by the sliding component 1102, on the one hand, the immersive player card 1101 is called, and on the other hand, the change event (onChange) is called to preload data, so as to obtain the message stream list (feedList) from the recommendation list through the change event, and the video in the information stream list is stored or transmitted in the form of immersive stream through the player 1012; then, the video can be played, paused or replayed by calling the player event. Fig.12 , change events and recommendation lists are implemented through business measurement, while immersive player card 1101 and sliding component 1102 can be implemented through component encapsulation.
[0228] In some embodiments, the immersive stream is used for the player 1012 and the sliding component 1102, wherein the player 1012 uses a third-party player for playback, and the third-party player has the characteristics of smooth playback, efficient decoding, resource occupation, friendly interface, and quick response.
[0229] In some embodiments, based on the above Fig.12 , the embodiment of the present application provides a calling diagram of the calling relationship between components, such as Fig.13 As shown, page 1201 calls immersive player card 1101 by importing. When a sliding operation is detected, sliding component 1102 calls immersive player card 1101, and immersive player card 1101 renders sliding component 1102 by rendering animation (renderSlide); then, video sliding component 1202 is called, and player 1012 is started. Among them, immersive player card 1101, video sliding component 1202 and player 1012 are all components.
[0230] The first step is the sliding animation process.
[0231] The sliding effects achieved include: in response to pulling up to the center line of the screen or sliding at a certain speed and releasing the hand, triggering the switching of the next video; in response to pulling down to the center line of the screen or sliding at a certain speed and releasing the hand, triggering the switching of the previous video.
[0232] Fig.14 This is a flowchart of an implementation of the sliding effect provided in the embodiment of the present application, see Fig.14 , the implementation process of the sliding effect can include the following steps:
[0233] Step S1301, obtaining initial coordinates and start time.
[0234] In the embodiment of the present application, a touch screen (touch) event can be detected in real time. When the touch starts (touchStart), the moment is determined as the start time, and the initial coordinates acting on the display screen at the moment are collected.
[0235] In step S1302, the current coordinates are obtained.
[0236] In some embodiments, during the touch move (touchMove) phase, the current coordinates may be periodically collected, where the current coordinates refer to the position of the touch contact point at the time of collection.
[0237] In step S1303, the offset amount and the offset angle are determined.
[0238] In some embodiments, on the one hand, the distance between the two coordinates can be determined based on the initial coordinates and the current coordinates, and the distance is determined as the offset; on the other hand, the moving line segment is determined based on the initial coordinates and the current coordinates, and then the angle between the moving line segment and the reference straight line is determined, and the angle is determined as the offset angle, wherein the reference straight line is a straight line parallel to the long side of the screen, or a straight line parallel to the short side of the screen.
[0239] In step S1304, it is determined whether the offset angle is less than an angle threshold.
[0240] In some embodiments, the angle threshold may be a value set in advance, and for example, the angle threshold may be 3 degrees, 5 degrees, 10 degrees, etc. If the offset angle is greater than or equal to the angle threshold, it indicates that the received touch operation is an erroneous operation, and the process proceeds to step S1305, that is, the page content is kept unchanged; and if the offset angle is less than the angle threshold, it indicates that the received touch operation is a sliding operation, and the process proceeds to step S1306.
[0241] In step S1305, the page content remains unchanged and the process ends.
[0242] In the embodiment of the present application, it means that the video played in the page remains unchanged, that is, the video currently playing in the page continues to be played.
[0243] In step S1306, the control page moves following the sliding operation.
[0244] In the embodiment of the present application, the video in the page can also be controlled to move along with the movement of the sliding operation.
[0245] In step S1307, it is determined whether the offset is greater than 0.
[0246] In some embodiments, if the offset is greater than 0, indicating that the sliding operation is an upward slide, the page content is moved upward, and step S1308 is entered; if the offset is less than 0, indicating that the sliding operation is a downward slide, the page content is moved downward, and step S1308 is entered.
[0247] In step S1308, the page content is moved upwards, and the process proceeds to step S1310.
[0248] In the embodiment of the present application, the video may be played by moving upward.
[0249] In step S1309, the page content is moved downward.
[0250] In the embodiment of the present application, the video may be played by moving downward.
[0251] In step S1310, the end coordinates and the end time are acquired.
[0252] At this time, the touch end (touchEnd) stage is entered. In some embodiments, the implementation process of step S1310 is similar to the implementation process of the above step S1301, so the implementation process of step S1310 can refer to the implementation process of the above step S1301.
[0253] In step S1311, the duration of the operation is determined.
[0254] In some embodiments, the duration is determined as the difference between the end time and the start time.
[0255] In step S1312, it is determined whether the duration is less than a duration threshold.
[0256] In the embodiment of the present application, the duration threshold is a value set in advance based on experience. Exemplarily, the duration threshold may be 200 milliseconds, 300 milliseconds, etc.
[0257] In some embodiments, if the duration is less than the duration threshold, it is determined that a sliding operation is received, and a page turning operation is performed, that is, entering step S1313; if the duration is greater than or equal to the duration threshold, it indicates an erroneous operation, and entering step S1314.
[0258] In step S1313, a page turning operation is performed, and the process ends.
[0259] In some embodiments, the page turning operation refers to switching the video, for example, switching the video to the previous video or the next video.
[0260] In step S1314, a second offset is determined.
[0261] In some embodiments, the distance between the initial coordinate and the end coordinate is determined as the second offset.
[0262] In step S1315, it is determined whether the second offset is less than a preset distance.
[0263] In some embodiments, the preset distance is a value set in advance based on experience, and for example, the preset distance may be 1 / 3 of the screen length, 1 / 2 of the screen length, etc. If the second offset is less than the preset distance, it indicates that an erroneous operation is received, and the process proceeds to step S1316; if the second offset is greater than or equal to the preset distance, it is confirmed that a sliding operation is received, and the process returns to step S1313.
[0264] In step S1316, the current page content is maintained.
[0265] At this time, the currently playing video is kept and no video switching is performed.
[0266] The second step is to slide the virtual list processing flow.
[0267] When users keep scrolling through videos, constantly adding element nodes (Document Object Model node, DOM node) will inevitably cause page performance problems, so it is necessary to build a virtual list, see Fig.15 The functions of the virtual list may include: when the video slides to position 2, the video at position 0 is recycled, and the video at position 4 is created, ensuring that the page always maintains a specified number of video players, and at the same time cooperates with the recommendation list preloading, the video slides to position 2, and the data of the next refresh is loaded. Among them, the virtual list corresponds to the first cache list in other embodiments.
[0268] The third step is to process the video automatically.
[0269] Although the player <video>< / video> The tag itself supports the autoplay attribute, but in order to improve the user experience and prevent accidental media playback during the user's browsing of the web page, browser manufacturers have restricted autoplay. The browser does not allow media files with sound to be automatically played before there is an interactive operation. This restriction is still acceptable for the original single video playback scenario, but it greatly affects the user experience for this immersive video. The embodiment of the present application can achieve automatic playback through the callback of jsapi.
[0270] The fourth step is video preloading processing.
[0271] In an embodiment of the present application, after playing the first video, the next and previous video contents are preloaded through the task list and written into the cache. When switching, they can be directly called and played from the cache.
[0272] In some embodiments, Fig.16 is a flow chart of a video preloading method provided in an embodiment of the present application. The video preloading method can be executed by a computer device. In the embodiment of the present application, the computer device is used as a terminal for example. Fig.16 , the video loading method includes the following steps:
[0273] In step S1501, a play request is received.
[0274] In step S1502, the play request is converted into a proxy link (proxyUrl).
[0275] In the embodiment of the present application, the forwarding of the play request can be achieved through a proxy link.
[0276] In step S1503, the proxy link is parsed.
[0277] In some embodiments, the resource to which the proxy link points is determined by inspecting and analyzing the proxy link.
[0278] In step S1504, it is determined whether a file in a preset format is included.
[0279] In an embodiment of the present application, the preset format may refer to the m3u8 type. Based on this, this embodiment determines whether the resource pointed to by the proxy link contains a file of the m3u8 type.
[0280] In some embodiments, if a file in a preset format is included, the process proceeds to step S1505 ; otherwise, the process proceeds to step S1509 .
[0281] In step S1505, it is determined whether the file in the preset format includes a recommendation list.
[0282] In some embodiments, the file in the preset format may be parsed to determine whether the file in the preset format includes a recommendation list. If the file in the preset format does not include a recommendation list, it indicates that the file in the preset format is abnormal or erroneous, such as missing content in the file in the preset format, and the process proceeds to step S1506; if the file in the preset format includes a recommendation list, it indicates that the file in the preset format is correct and complete, and the process proceeds to step S1508.
[0283] In step S1506, a file in a preset format is downloaded.
[0284] In some embodiments, the file in the preset format may be re-downloaded based on the address in the proxy link.
[0285] In step S1507, the recommendation list is cached.
[0286] In some embodiments, the file in the preset format includes the playback address of the recommendation list, and the recommendation list can be cached based on the playback address of the recommendation list.
[0287] In step S1508, the links in the recommendation list are parsed and completely replaced.
[0288] In some embodiments, the link in the recommendation list is parsed to obtain a parsed link, and the parsed link is updated or replaced, wherein the parsed link points to an unencrypted video.
[0289] In step S1509, it is determined whether there is a cache list.
[0290] In some embodiments, if the cache list does not exist, the process proceeds to step S1510; otherwise, the process proceeds to step S1512. The cache list corresponds to the first cache list in other embodiments.
[0291] In step S1510, a download task is created.
[0292] If the cache list does not exist at this time, a task is created to download the cache list.
[0293] In step S1511, the cache list is written.
[0294] In some embodiments, the video is added to a cache list.
[0295] In step S1512, the data is returned.
[0296] In some embodiments, the video may be retrieved from a cached list.
[0297] In step S1513, the process ends.
[0298] Through the above steps S1501 to S1513, the cache list is created, and the video is preloaded based on the cache list.
[0299] The fifth step is to locate the cross-terminal page return.
[0300] There are clickable spots for videos in the video list, which can be used to jump to the page, such as jumping from an ad to the underlying page of the ad. In the relevant operating systems, the performance of this issue is inconsistent. In the relevant operating system 1, due to hitting the Back-Forward Cache (bfcache), the page return can still locate the video before the jump; while in the relevant operating system 2, the page return will directly refresh the page and return to the first video.
[0301] In the embodiment of the present application, before the page jumps, the data list and the value of currentIndex are stored, and when the page returns, it is relocated to currentIndex, thereby solving the relocation problem.
[0302] In some embodiments, Fig.17 This is a schematic diagram of a framework structure of video positioning provided by an embodiment of the present application, see Fig.17 , assuming that the cache list 1601 includes five videos, namely video 6011, video 6012, video 6013, video 6014 and video 6015, and assuming that in the process of playing video 6012 using the video immersion stream 1602, a touch operation is received on the advertisement button 6021, and it is considered that a page jump instruction has been received, then the cache list 0221 and the video index value 0222 are stored in the session storage (sessionStorage) object 6022; then, jump to the advertisement underlying page 1603; finally, when the advertisement playback is completed, return to the video immersion stream 1602 to continue playing the video 6012 based on the session storage object 6022.
[0303] Step 6: Horizontal screen adaptation.
[0304] When the terminal does not have the vertical screen lock turned on, the entire browser page can be turned sideways; this will cause page confusion. For this reason, the embodiment of the present application adds a horizontal screen detection. When it is detected that the terminal screen is turned sideways, a pop-up window (Toast) can be used to prompt, for example, a pop-up window can be output to say "Please rotate the phone screen for a better vertical screen experience."
[0305] Through testing, first, the daily average click-through rate of the "download" exposure of the video pull position increased by 56.44%, and the daily average click-through rate of the "open" exposure increased by 53.81%, which helped to increase revenue; second, during the testing phase, the average length of stay on the bottom-level pages increased by 16.42%, and the average length of stay on the second-level pages increased by 21.88%, the total playback increased by 30.86w, and the commercial revenue increased by 1.53%.
[0306] It can be understood that in the embodiments of the present application, related data such as the first video, preset image, first cache list, recommendation list, second cache list, index value, playback time, reference display direction, first display direction, etc., the collection, use and processing of such related data need to comply with relevant laws, regulations and standards.
[0307] The following is a description of an exemplary structure of the video playback device 455 provided in the embodiment of the present application implemented as a software module. In some embodiments, Figure 2 As shown, the software modules stored in the video processing device 455 of the memory 450 may include:
[0308] The first display module 4551 is used to display a first control in the display interface of the first application, wherein the first control is a control for playing a first video through a web application, the first video comes from a second application, and both the first application and the second application are different from the web application; the first playback module 4552 is used to receive a playback instruction for the first video based on the first control, and play the first video using the web application; the first determination module 4553 is used to determine, in response to a first interactive operation for the first video, a second video corresponding to the first interactive operation; and the second playback module 4554 is used to play the second video using the web application.
[0309] In some embodiments, the first playback module 4552 is also used to: use the web application to call a preset player, display the playback interface of the preset player in the display interface, and the screen-to-body ratio of the playback interface is greater than a screen-to-body ratio threshold; use the preset player to play the first video in the playback interface.
[0310] In some embodiments, the software module stored in the video processing device 455 of the memory 450 also includes: a first response module, used to pause the playback of the first video in response to a pause instruction for the first video; a second display module, used to display at least one of the following in the playback interface: playback controls and replay controls.
[0311] In some embodiments, the software module stored in the video processing device 455 of the memory 450 also includes at least one of the following: a second response module for continuing to play the first video in response to a trigger operation on the playback control; and a third response module for replaying the first video in response to a trigger operation on the replay control.
[0312] In some embodiments, the software module stored in the video processing device 455 of the memory 450 also includes: a third display module, used to obtain a first video frame, and display the first video frame on the playback interface until a trigger operation for the playback control or a trigger operation for the replay control is received, the first video frame being the video frame displayed on the playback interface when the pause instruction is received; or, a fourth display module, used to obtain a preset image, and display the preset image on the playback interface until a trigger operation for the playback control or a trigger operation for the replay control is received.
[0313] In some embodiments, the software modules stored in the video processing device 455 of the memory 450 also include: a fourth response module, used to display at least two candidate speeds in response to a speed adjustment instruction for the first video; a fifth response module, used to determine the selected candidate speed as the target speed in response to a selection operation for the candidate speed; and a third playback module, used to play the first video at the target speed in the playback interface.
[0314] In some embodiments, the first determination module 4553 is also used to: obtain a first cache list, which stores at least the first video, the third video to be recommended, and the fourth video; determine a first interaction direction of the first interaction operation; when the first interaction direction is the first direction, determine the third video as the second video; when the first interaction direction is the second direction, determine the fourth video as the second video.
[0315] In some embodiments, when the first cache list stores the first video, the third video and the fourth video, the software module stored in the video processing device 455 of the memory 450 also includes: a first acquisition module, used to obtain a recommendation list, wherein the recommendation list stores the first video and multiple videos to be recommended; a second acquisition module, used to obtain two candidate videos adjacent to the first video from the recommendation list; a second determination module, used to determine the candidate video located before the first video as the third video, and to determine the candidate video located after the first video as the fourth video; a first construction module, used to construct the first cache list using the third video, the first video and the fourth video.
[0316] In some embodiments, the software modules stored in the video processing device 455 of the memory 450 also include: a first deletion module, used to delete the fourth video from the first cache list; a third acquisition module, used to acquire, from the recommendation list, a fifth video that is adjacent to the second video and located before the second video; and a first addition module, used to add the fifth video to the first cache list, the fifth video being located before the second video.
[0317] In some embodiments, the software module stored in the video processing device 455 of the memory 450 also includes: a second deletion module, used to delete the third video from the first cache list; a fourth acquisition module, used to acquire a sixth video adjacent to the second video and located after the second video from the recommendation list; a second addition module, used to add the sixth video to the first cache list, and the sixth video is located after the second video.
[0318] In some embodiments, the software modules stored in the video processing device 455 of the memory 450 also include: a sixth response module, used to determine the time interval between the second interactive operation and the first interactive operation in response to the second interactive operation for the second video; a third determination module, used to determine the first video or the fifth video in the first cache list as the seventh video corresponding to the second interactive operation based on the second interactive direction of the second interactive operation when the time interval is greater than or equal to the interval threshold; and a fourth playback module, used to play the seventh video using the web application, the first cache list storing the first video, the second video and the fifth video.
[0319] In some embodiments, the software module stored in the video processing device 455 of the memory 450 also includes: a fifth acquisition module, used to acquire a second cache list when the time interval is less than the interval threshold, wherein the second cache list stores the first video, the eighth video and the ninth video; a fourth determination module, used to determine the seventh video by the eighth video or the ninth video based on the second interaction direction; and a fifth playback module, used to play the seventh video using the web application.
[0320] In some embodiments, the second playback module 4554 is further used to: determine a reference volume value of the terminal environment, where the terminal is a terminal running the web application; determine a playback volume value based on the reference volume value, and use the web application to play the second video at the playback volume value.
[0321] In some embodiments, the software modules stored in the video processing device 455 of the memory 450 also include: a fifth display module, used to display a second control in the playback interface of the preset player, wherein the second control is a control for displaying the information to be recommended; a seventh response module, used to obtain the information to be recommended in response to a trigger operation on the second control; and a sixth display module, used to pause the playback of the first video and display the information to be recommended in the display interface.
[0322] In some embodiments, the software modules stored in the video processing device 455 of the memory 450 also include: a sixth acquisition module, used to obtain the index value of the first video, and a first cache list containing the first video; a seventh acquisition module, used to obtain the first video from the first cache list based on the index value when the display time of the information to be recommended reaches a time threshold, or a close instruction for the information to be recommended is received; a sixth playback module, used to continue playing the first video in the playback interface.
[0323] In some embodiments, the sixth playback module is also used to: obtain the playback time of the first video when the information to be recommended starts to be displayed; obtain a second video frame corresponding to the playback time from the first video; and use the second video frame as a starting frame to play the first video in the playback interface.
[0324] In some embodiments, the software modules stored in the video processing device 455 of the memory 450 also include: an eighth acquisition module, used to obtain a reference display direction corresponding to the first video, and a first display direction of the playback interface of the preset player; a first generation module, used to generate rotation prompt information when the reference display direction is different from the first display direction, and the rotation prompt information is used to prompt the rotation direction of the display; a seventh display module, used to display the rotation prompt information in the playback interface.
[0325] In some embodiments, the seventh display module is further used to: display a prompt interface in the playback interface, wherein a first area of the prompt interface is smaller than a second area of the playback interface; and display the rotation prompt information in the prompt interface.
[0326] In some embodiments, the seventh display module is also used to: display the prompt interface in the playback interface based on preset position information; or determine the background image of each video frame in the first video, and display the prompt interface in the background area of the playback interface, wherein the background area is the area where the background image is displayed.
[0327] The embodiment of the present application provides a computer program product or a computer program, which includes computer executable instructions, and the computer executable instructions are stored in a computer readable storage medium. The processor of the computer device reads the computer executable instructions from the computer readable storage medium, and the processor executes the computer executable instructions, so that the computer device executes the video playback method described in the embodiment of the present application.
[0328] The embodiment of the present application provides a computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, the processor will be caused to execute the video playback method provided by the embodiment of the present application, for example, Figure 3 , Fig.10 The video playback method shown.
[0329] In some embodiments, the computer-readable storage medium may be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, flash memory, magnetic surface storage, optical disk, or CD-ROM; or it may be various devices including one or any combination of the above memories.
[0330] In some embodiments, computer executable instructions may be in the form of a program, software, software module, script or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine or other unit suitable for use in a computing environment.
[0331] As an example, computer-executable instructions may, but need not, correspond to a file in a file system, may be stored as part of a file that stores other programs or data, such as in one or more scripts in a HyperText Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files storing one or more modules, subroutines, or code portions).
[0332] By way of example, computer executable instructions may be deployed to be executed on one computing device or on multiple computing devices located at one site or on multiple computing devices distributed across multiple sites and interconnected by a communication network.
[0333] The above is only an embodiment of the present application and is not intended to limit the protection scope of the present application. Any modifications, equivalent substitutions and improvements made within the spirit and scope of the present application are included in the protection scope of the present application.
Claims
1. A video playback method, characterized in that: The method comprises: Displaying a first control in a display interface of a first application, wherein the first control is a control for playing a first video through a web application, the first video is from a second application, and both the first application and the second application are different from the web application; Receiving a play instruction for the first video based on the first control, and playing the first video using the web application; In response to a first interactive operation on the first video, determining a second video corresponding to the first interactive operation; The second video is played using the web application.
2. The method according to claim 1, characterized in that: The using the web application to play the first video includes: Using the web application to call a preset player, displaying a playback interface of the preset player in the display interface, wherein the screen ratio of the playback interface is greater than a screen ratio threshold; The first video is played on the playback interface using the preset player.
3. The method according to claim 2, characterized in that The method further comprises: In response to a pause instruction for the first video, pausing the playing of the first video; At least one of the following is displayed in the playback interface: a playback control and a replay control; after pausing the playback of the first video, the method further includes: performing at least one of the following: In response to a trigger operation on the play control, continue playing the first video; In response to a trigger operation on the replay control, the first video is replayed.
4. The method according to claim 3, characterized in that After pausing the playing of the first video, the method further includes: Acquire a first video frame, and display the first video frame on the playback interface until a trigger operation for the playback control or a trigger operation for the replay control is received, the first video frame being the video frame displayed on the playback interface when the pause instruction is received; or, A preset image is acquired and displayed on the play interface until a trigger operation for the play control or a trigger operation for the replay control is received.
5. The method according to claim 4, characterized in that The method further comprises: In response to a speed adjustment instruction for the first video, displaying at least two candidate speeds; In response to a selection operation on the candidate speed, determining the selected candidate speed as a target speed; The first video is played at the target speed in the playback interface.
6. The method according to any one of claims 1 to 5, characterized in that: The determining the second video corresponding to the first interactive operation includes: Obtaining a first cache list, wherein the first cache list at least stores the first video, a third video to be recommended, and a fourth video; determining a first interaction direction of the first interaction operation; When the first interaction direction is the first direction, the third video is determined as the second video; when the first interaction direction is the second direction, the fourth video is determined as the second video.
7. The method according to claim 6, characterized in that When the first cache list stores the first video, the third video, and the fourth video, the method further includes: Obtain a recommendation list, wherein the recommendation list stores the first video and multiple videos to be recommended; Obtaining two candidate videos adjacent to the first video from the recommendation list; Determine the candidate video located before the first video as the third video, and determine the candidate video located after the first video as the fourth video; The first cache list is constructed using the third video, the first video and the fourth video.
8. The method according to claim 7, characterized in that After determining the third video as the second video, the method further includes: Deleting the fourth video from the first cache list; Acquire, from the recommendation list, a fifth video that is adjacent to the second video and before the second video; The fifth video is added to the first cache list, wherein the fifth video is located before the second video.
9. The method according to claim 7, characterized in that: After determining the fourth video as the second video, the method further includes: Deleting the third video from the first cache list; Acquire, from the recommendation list, a sixth video that is adjacent to the second video and located after the second video; The sixth video is added to the first cache list, wherein the sixth video is located after the second video.
10. The method according to claim 8, characterized in that After playing the second video using the web application, the method further includes: In response to a second interactive operation on the second video, determining a time interval between the second interactive operation and the first interactive operation; When the time interval is greater than or equal to the interval threshold, based on the second interaction direction of the second interaction operation, determining the first video or the fifth video in the first cache list as the seventh video corresponding to the second interaction operation; The seventh video is played using the web application, and the first cache list stores the first video, the second video and the fifth video.
11. The method according to claim 10, characterized in that The method further comprises: When the time interval is less than the interval threshold, obtaining a second cache list, wherein the first video, the eighth video, and the ninth video are stored in the second cache list; Determine the seventh video by using the eighth video or the ninth video based on the second interaction direction; The seventh video is played using the web application.
12. The method according to any one of claims 1 to 5 and 7 to 11, characterized in that: The using the web application to play the second video includes: Determining a reference volume value of an environment in which a terminal is located, wherein the terminal is a terminal running the web application; A playback volume value is determined based on the reference volume value, and the second video is played at the playback volume value using the web application.
13. The method according to any one of claims 1 to 5 and 7 to 11, characterized in that: Before responding to the first interactive operation on the first video, the method further includes: Displaying a second control in the playback interface of the preset player, wherein the second control is a control for displaying the information to be recommended; In response to a triggering operation on the second control, acquiring the information to be recommended; The playing of the first video is paused, and the information to be recommended is displayed in the display interface.
14. The method according to claim 13, characterized in that After the triggering operation on the second control is responded to, the method further includes: Obtaining an index value of the first video and a first cache list containing the first video; When the display time of the information to be recommended reaches a time threshold, or a closing instruction for the information to be recommended is received, acquiring the first video from the first cache list based on the index value; Continue playing the first video in the playback interface.
15. The method according to claim 14, characterized in that The continuing to play the first video in the playing interface includes: Obtaining the playing time of the first video when the information to be recommended starts to be displayed; Acquire a second video frame corresponding to the playback moment from the first video; The first video is played in the playback interface using the second video frame as a starting frame.
16. The method according to any one of claims 1 to 5, 7 to 11, 14 and 15, characterized in that: Before responding to the first interactive operation on the first video, the method further includes: Obtaining a reference display direction corresponding to the first video and a first display direction of a playback interface of a preset player; When the reference display direction is different from the first display direction, generating rotation prompt information, the rotation prompt information is used to prompt the direction of rotating the display; The rotation prompt information is displayed in the playback interface.
17. The method according to claim 16, characterized in that The displaying the rotation prompt information in the playing interface includes: Displaying a prompt interface in the playback interface, wherein a first area of the prompt interface is smaller than a second area of the playback interface; The rotation prompt information is displayed in the prompt interface.
18. The method according to claim 17, characterized in that The displaying of a prompt interface in the playback interface comprises: Based on the preset position information, displaying the prompt interface in the playback interface; or, A background image of each video frame in the first video is determined, and the prompt interface is displayed in a background area of the playback interface, where the background area is an area where the background image is displayed.
19. A video playback device, characterized in that: The device comprises: A first display module is used to display a first control in a display interface of a first application, wherein the first control is a control for playing a first video through a web application, the first video comes from a second application, and both the first application and the second application are different from the web application; A first playing module, configured to receive a play instruction for the first video based on the first control, and play the first video using the web application; A first determining module, configured to determine, in response to a first interactive operation on the first video, a second video corresponding to the first interactive operation; The second playing module is used to play the second video using the web application.
20. A computer device, characterized in that: The computer device comprises: A memory for storing computer executable instructions; The processor is used to implement the video playback method described in any one of claims 1 to 18 when executing the computer executable instructions stored in the memory.
21. A computer-readable storage medium storing computer-executable instructions, characterized in that: When the computer executable instructions are executed by a processor, the video playback method according to any one of claims 1 to 18 is implemented.
22. A computer program product comprising a computer program or computer executable instructions, characterized in that When the computer program or computer executable instruction is executed by a processor, the video playback method according to any one of claims 1 to 18 is implemented.
Citation Information
Cited By
Video playing method and apparatus, and computer device, computer-readable storage medium and computer program product
WO2026118673A1