CN114615553B - Video playing method and device, electronic equipment and storage medium - Google Patents

Video playing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN114615553B
CN114615553B CN202011448392.XA CN202011448392A CN114615553B CN 114615553 B CN114615553 B CN 114615553B CN 202011448392 A CN202011448392 A CN 202011448392A CN 114615553 B CN114615553 B CN 114615553B
Authority
CN
China
Prior art keywords
page
media information
video
information stream
player
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011448392.XA
Other languages
Chinese (zh)
Other versions
CN114615553A (en
Inventor
陈华宇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202011448392.XA priority Critical patent/CN114615553B/en
Publication of CN114615553A publication Critical patent/CN114615553A/en
Application granted granted Critical
Publication of CN114615553B publication Critical patent/CN114615553B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/47End-user applications
    • H04N21/472End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content
    • H04N21/47202End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content for requesting content on demand, e.g. video on demand
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/47End-user applications
    • H04N21/475End-user interface for inputting end-user data, e.g. personal identification number [PIN], preference data
    • H04N21/4756End-user interface for inputting end-user data, e.g. personal identification number [PIN], preference data for rating content, e.g. scoring a recommended movie
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/47End-user applications
    • H04N21/478Supplemental services, e.g. displaying phone caller identification, shopping application
    • H04N21/4782Web browsing, e.g. WebTV
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/47End-user applications
    • H04N21/485End-user interface for client configuration
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/83Generation or processing of protective or descriptive data associated with content; Content structuring
    • H04N21/845Structuring of content, e.g. decomposing content into time segments
    • H04N21/8456Structuring of content, e.g. decomposing content into time segments by decomposing the content in the time domain, e.g. in time segments

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Human Computer Interaction (AREA)
  • Databases & Information Systems (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The application provides a video playing method, a video playing device, electronic equipment and a storage medium; the method comprises the following steps: presenting a media information stream page containing a target video, and creating a bottom layer page nested in the media information stream page; when the target video is positioned in a first position area of the media information stream page, creating a player in the first position area, and playing the target video through the player; when receiving a detail page viewing instruction aiming at a target video, keeping the target video continuously playing, moving a player from a first position area to a second position area, switching a media information stream page to a bottom layer page, and presenting the media information stream through the bottom layer page; according to the application, when the details of the video being played in the media information stream page are checked, the video is ensured not to be interrupted in the process of switching from the media information stream page to the detail page, and seamless switching among pages in the video playing process is realized.

Description

Video playing method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of internet and media playing technologies, and in particular, to a video playing method, device, electronic apparatus, and storage medium.
Background
In many mainstream clients, a function of displaying media information such as video in a form of information stream is added, the information stream page contains the video being played, and a user can watch by jumping from the information stream page to a detail page of the video being played.
In the related art, the bottom page of the information flow page is mostly created by using the Activity component. Because the starting of the Activity needs to consume a long time, when the information stream page enters the Activity bottom page, the phenomenon of black screen or frame dropping exists in the video picture being played, and the smoothness of video playing in the page switching process is poor.
Disclosure of Invention
The embodiment of the application provides a video playing method, a device, electronic equipment and a storage medium, which can ensure that the playing of a video is not interrupted in the process of switching from a media information stream page to a detail page when the details of the video being played in the media information stream page are checked, and realize seamless switching among pages in the video playing process.
The technical scheme of the embodiment of the application is realized as follows:
the embodiment of the application provides a video playing method, which comprises the following steps:
Presenting a media information stream page containing a target video, and creating a bottom layer page nested in the media information stream page;
when the target video is positioned in a first position area of the media information stream page, creating a player in the first position area, and playing the target video through the player;
when receiving a detail page viewing instruction aiming at the target video, keeping the target video continuously playing, moving the player from the first position area to the second position area, switching the media information stream page to the bottom layer page, and presenting the media information stream through the bottom layer page;
the bottom page is independent of the player, and the target video is fused with the media information stream presented by the bottom page.
The embodiment of the application also provides a video playing device, which comprises:
the first creation module is used for presenting a media information stream page containing a target video and creating a bottom layer page nested in the media information stream page;
the second creating module is used for creating a player in the first position area when the target video is positioned in the first position area of the media information stream page, and playing the target video through the player;
The mobile module is used for keeping the target video continuously playing when receiving a detail page viewing instruction aiming at the target video, moving the player from the first position area to the second position area, switching the media information stream page to the bottom layer page, and presenting the media information stream through the bottom layer page;
the bottom page is independent of the player, and the target video is fused with the media information stream presented by the bottom page.
In the above scheme, the first creating module is further configured to create at least two fragment page components nested in the media information stream page, and form a bottom page nested in the media information stream page by combining the at least two fragment page components.
In the above scheme, the first creating module is further configured to create, based on the active component, a first bottom layer page located at a next level of the media information stream page when the target video is a video clip, where the first bottom layer page is used to play a complete video corresponding to the target video;
correspondingly, the second creation module is further configured to switch the media information stream page to the first bottom layer page when receiving a complete video viewing instruction for the target video, and
And creating a first player on the first bottom page, and playing the complete video corresponding to the target video through the first player.
In the above scheme, the device further includes:
the deleting module is used for switching the first bottom layer page to the media information stream page when receiving a complete video exit instruction aiming at the target video, and is used for deleting the target video
And deleting the first bottom page and the bottom page nested in the media information stream page.
In the above solution, the moving module is further configured to, in response to a detailed page exit instruction for the target video during playing the target video, keep the target video continuously playing, move the player from the second location area to the first location area, and
and switching the bottom layer page to the media information stream page.
In the above solution, when the player is in a stowed state, the mobile module is further configured to respond to a detailed page exit instruction for the target video, adjust the player from the stowed state to a deployed state, and
and moving the player in the unfolding state from the second position area to the first position area, and switching the bottom layer page to the media information stream page.
In the above scheme, the mobile module is further configured to adjust the player to a stowed state when it is detected that the content of the target video is played;
and moving the player in the packed state from the second position area to the first position area, and switching the bottom layer page to the media information stream page.
In the above scheme, if the currently presented page is a target bottom page of the media information stream page entered based on the bottom page, the mobile module is further configured to respond to a page exit instruction for the target bottom page, move the player from the second location area to the first location area, and
switching the target bottom layer page to the media information flow page;
deleting all bottom pages corresponding to the media information stream pages including the bottom page and the target bottom page;
the page level of the target bottom page is different from the page level of the bottom page by at least one page level.
In the above scheme, the deleting module is further configured to delete other bottom layer pages between the target bottom layer page and the bottom layer page if the currently presented page is the target bottom layer page of the media information stream page entered based on the bottom layer page;
The page level of the target bottom page is different from the page level of the bottom page by at least two page levels.
In the above solution, the second creation module is further configured to adjust the player to a stowed state when it is detected that the content of the target video is played, so as to stop playing the target video, and
creating a second player in a third location area of the underlying page when the first video is located in the third location area;
and playing the first video through the second player.
In the above scheme, the first creating module is further configured to create a second bottom page nested in the bottom page;
responding to a video detail page viewing instruction aiming at the first video, keeping the first video continuously played, moving the second player from the third position area to a fourth position area, switching the bottom layer page to the second bottom layer page, and presenting a media information stream through the second bottom layer page;
the second bottom layer page is independent of the second player, and the first video is fused with a media information stream presented by the second bottom layer page.
In the above scheme, the mobile module is further configured to invoke a video player interface corresponding to the target video when receiving a detail page view instruction for the target video;
and maintaining the target video to continuously play through the video player interface, and moving the player from the first position area to the second position area.
The embodiment of the application also provides electronic equipment, which comprises:
a memory for storing executable instructions;
and the processor is used for realizing the video playing method provided by the embodiment of the application when executing the executable instructions stored in the memory.
The embodiment of the application also provides a computer readable storage medium which stores executable instructions, and when the executable instructions are executed by a processor, the method for playing the video provided by the embodiment of the application is realized.
The embodiment of the application has the following beneficial effects:
when the target video is positioned in a first position area of the media information stream page, creating a player in the first position area, and playing the target video through the created player; when receiving a detail page viewing instruction for the target video, moving the player from the first position area to the second position area while keeping the target video continuously playing, and switching from the media information stream page to a bottom page nested in the media information stream page. The bottom layer page and the player are mutually independent, the player continuously plays the target video in the moving process, and meanwhile, the player is switched to the bottom layer page from the media information stream page, so that when the details of the video being played in the media information stream page are checked, the video can be ensured not to be interrupted in the process of switching from the media information stream page to the detail page, and seamless switching among pages in the video playing process is realized.
Drawings
Fig. 1 is a schematic diagram of an architecture of a video playing system 100 according to an embodiment of the present application;
fig. 2 is a schematic structural diagram of an electronic device 500 according to a video playing method provided by an embodiment of the present application;
fig. 3 is a flowchart of a video playing method according to an embodiment of the present application;
FIG. 4A is a schematic diagram showing a media information stream page switching to an underlying page according to an embodiment of the present application;
FIG. 4B is a schematic diagram II of a media information stream page switching to a bottom page according to an embodiment of the present application;
FIG. 5 is a schematic diagram illustrating a bottom page switching to a second bottom page according to an embodiment of the present application;
FIG. 6 is a schematic diagram illustrating movement of a player during a media stream page switching to an underlying page according to an embodiment of the present application;
FIG. 7A is a schematic diagram showing a first embodiment of switching an underlying page to a media information stream page;
FIG. 7B is a second schematic diagram illustrating a bottom layer page being switched to a media information stream page according to an embodiment of the present application;
FIG. 7C is a third schematic diagram illustrating a bottom layer page being switched to a media information stream page according to an embodiment of the present application;
FIG. 7D is a diagram showing a bottom layer page switching to a media information stream page according to an embodiment of the present application;
FIG. 8 is a schematic diagram illustrating a media information stream page switching to a first bottom page according to an embodiment of the present application;
FIG. 9A is a schematic diagram of a page seamless handover process according to an embodiment of the present application;
fig. 9B is a schematic diagram of key classes involved in a video playing method according to an embodiment of the present application;
fig. 10 is a flowchart of a video playing method according to an embodiment of the present application;
FIG. 11A is a schematic diagram illustrating a media information stream page switching to an underlying page according to an embodiment of the present application;
FIG. 11B is a view of a search access to an underlying page provided by an embodiment of the present application;
fig. 12 is a schematic structural diagram of a video playing device 555 according to an embodiment of the present application.
Detailed Description
The present application will be further described in detail with reference to the accompanying drawings, for the purpose of making the objects, technical solutions and advantages of the present application more apparent, and the described embodiments should not be construed as limiting the present application, and all other embodiments obtained by those skilled in the art without making any inventive effort are within the scope of the present application.
In the following description, reference is made to "some embodiments" which describe a subset of all possible embodiments, but it is to be understood that "some embodiments" can be the same subset or different subsets of all possible embodiments and can be combined with one another without conflict.
In the following description, the terms "first", "second", "third" and the like are merely used to distinguish similar objects and do not represent a specific ordering of the objects, it being understood that the "first", "second", "third" may be interchanged with a specific order or sequence, as permitted, to enable embodiments of the application described herein to be practiced otherwise than as illustrated or described herein.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of the application only and is not intended to be limiting of the application.
Before describing embodiments of the present application in further detail, the terms and terminology involved in the embodiments of the present application will be described, and the terms and terminology involved in the embodiments of the present application will be used in the following explanation.
1) And the client is used for providing various service application programs such as an instant messaging client and a video playing client which are operated in the terminal.
2) In response to a condition or state that is used to represent the condition or state upon which the performed operation depends, the performed operation or operations may be in real-time or with a set delay when the condition or state upon which it depends is satisfied; without being specifically described, there is no limitation in the execution sequence of the plurality of operations performed.
3) The Fragment page component, i.e., fragment, is a Fragment page, a reusable component that can split activity into several completely independent packages, each Fragment component having its own lifecycle and UI layout.
4) The Activity component, i.e. Activity, is a user interface program which in principle provides the user with an interactive interface function, which is the basic functional unit of the android application program, and the interface and the corresponding business logic centered on the interface are represented at An Zhuozhong, including displaying, interacting with the user, etc.
5) The View component, i.e., view, is the most common and simplest View container, which is a block-level container component, mainly used for layout presentation, and is the most basic UI component in the layout.
6) Feeds: the list page video information stream contains a plurality of videos and corresponds to the media information stream of the application.
7) Seamless switching: when Feeds enter the bottom page, the video played by the Feeds is not interrupted, the switching is smoother, and the user watching experience is better.
Based on the above explanation of terms and terms involved in the embodiments of the present application, the following describes a video playing system provided by the embodiments of the present application. Referring to fig. 1, fig. 1 is a schematic architecture diagram of a video playing system 100 according to an embodiment of the present application, in order to support an exemplary application, a terminal (a terminal 400-1 and a terminal 400-2 are shown in an exemplary manner) are connected to a server 200 through a network 300, where the network 300 may be a wide area network or a local area network, or a combination of the two, and data transmission is implemented using a wireless or wired link.
A terminal (such as terminal 400-1 and terminal 400-2) for sending a media information acquisition request corresponding to a media information stream page to a server;
the server 200 is configured to respond to the media information acquisition request and return corresponding media information to the terminal;
terminals (such as terminal 400-1 and terminal 400-2) for receiving and parsing the media information sent by the server 200, presenting a media information stream page containing the target video on a graphical interface 410 (graphical interface 410-1 and graphical interface 410-2 are exemplarily shown) based on the parsed media information, and creating a bottom page nested in the media information stream page;
terminals (such as terminal 400-1 and terminal 400-2) for creating a player in the first location area of the media information stream page and playing the target video through the player when the target video is located in the first location area; when receiving a detail page viewing instruction aiming at the target video, keeping the target video continuously playing, moving the player from the first position area to the second position area, switching the media information stream page to the bottom layer page, and presenting the media information stream through the bottom layer page.
In practical applications, the server 200 may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDNs, and basic cloud computing services such as big data and artificial intelligence platforms. Terminals (e.g., terminal 400-1 and terminal 400-2) may be, but are not limited to, smart phones, tablet computers, notebook computers, desktop computers, smart speakers, smart televisions, smart watches, etc. Terminals, such as terminal 400-1 and terminal 400-2, and server 200 may be directly or indirectly connected through wired or wireless communication, and the present application is not limited thereto.
Referring to fig. 2, fig. 2 is a schematic structural diagram of an electronic device 500 according to a video playing method according to an embodiment of the present application. In practical applications, the electronic device 500 may be a server or a terminal shown in fig. 1, and the electronic device 500 is taken as an example of the terminal shown in fig. 1, to describe an electronic device implementing the video playing method according to the embodiment of the present application, where the electronic device 500 provided in the embodiment of the present application includes: at least one processor 510, a memory 550, at least one network interface 520, and a user interface 530. The various components in electronic device 500 are coupled together by bus system 540. It is appreciated that the bus system 540 is used to enable connected communications between these components. The bus system 540 includes a power bus, a control bus, and a status signal bus in addition to the data bus. The various buses are labeled as bus system 540 in fig. 2 for clarity of illustration.
The processor 510 may be an integrated circuit chip with signal processing capabilities such as a general purpose processor, such as a microprocessor or any conventional processor, or the like, a digital signal processor (DSP, digital Signal Processor), or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or the like.
The user interface 530 includes one or more output devices 531 that enable presentation of media content, including one or more speakers and/or one or more visual displays. The user interface 530 also includes one or more input devices 532, including user interface components that facilitate user input, such as a keyboard, mouse, microphone, touch screen display, camera, other input buttons and controls.
The memory 550 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid state memory, hard drives, optical drives, and the like. Memory 550 may optionally include one or more storage devices physically located remote from processor 510.
Memory 550 includes volatile memory or nonvolatile memory, and may also include both volatile and nonvolatile memory. The nonvolatile Memory may be a Read Only Memory (ROM), and the volatile Memory may be a random access Memory (RAM, random Access Memory). The memory 550 described in embodiments of the present application is intended to comprise any suitable type of memory.
In some embodiments, memory 550 is capable of storing data to support various operations, examples of which include programs, modules and data structures, or subsets or supersets thereof, as exemplified below.
An operating system 551 including system programs for handling 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 handling hardware-based tasks;
network communication module 552 is used to reach other computing devices via one or more (wired or wireless) network interfaces 520, exemplary network interfaces 520 include: bluetooth, wireless compatibility authentication (WiFi), and universal serial bus (USB, universal Serial Bus), etc.;
a presentation module 553 for enabling presentation of information (e.g., a user interface for operating a peripheral device and displaying content and information) via one or more output devices 531 (e.g., a display screen, speakers, etc.) associated with the user interface 530;
the input processing module 554 is configured to detect one or more user inputs or interactions from one of the one or more input devices 532 and translate the detected inputs or interactions.
In some embodiments, the video playing device provided in the embodiments of the present application may be implemented in software, and fig. 2 shows a video playing device 555 stored in a memory 550, which may be software in the form of a program, a plug-in, or the like, including the following software modules: the first creation module 5551, the second creation module 5552, and the movement module 5553 are logical, and thus may be arbitrarily combined or further split according to the implemented functions, and the functions of the respective modules will be described below.
In other embodiments, the video playing device provided by the embodiments of the present application may be implemented by combining software and hardware, and by way of example, the video playing device provided by the embodiments of the present application may be a processor in the form of a hardware decoding processor, which is programmed to perform the video playing method provided by the embodiments of the present application, for example, the processor in the form of a hardware decoding processor may use one or more application specific integrated circuits (ASIC, application Specific Integrated Circuit), DSP, programmable logic device (PLD, programmable Logic Device), complex programmable logic device (CPLD, complex Programmable Logic Device), field programmable gate array (FPGA, field-Programmable Gate Array), or other electronic components.
Based on the above description of the video playing system and the electronic device provided by the embodiments of the present application, the method for playing video provided by the embodiments of the present application is described below. In some embodiments, the method for playing video provided by the embodiments of the present application may be implemented by a server or a terminal alone or in conjunction with the server and the terminal, and the method for playing video provided by the embodiments of the present application is described below by taking the terminal embodiment as an example. Referring to fig. 3, fig. 3 is a flowchart of a video playing method provided by an embodiment of the present application, where the video playing method provided by the embodiment of the present application includes:
Step 101: the terminal presents a media information stream page containing the target video, and creates a bottom layer page nested in the media information stream page.
Here, the terminal is provided with a media information client, such as a video play client when the media information is video, an information class client when the media information is information class, an instant messaging client capable of playing the media information, and the like. In practical implementation, when the terminal runs the media information client based on the client running instruction triggered by the user, the media information client obtains the media information containing the target video from the server, so that the media information containing the target video is presented in the media information stream page. In actual implementation, the media information stream page may be created based on an Activity component.
The acquisition of media information is described. In practical implementation, the media information client sends a media information acquisition request to a server (such as a background server of the media information client), and the server selects adaptive media information from the media information base and returns the adaptive media information to the media information client, so that the media information client presents the media information containing the target video through a media information stream page. In some embodiments, the media information obtaining request carries identification information (such as a login account) of a user logged in to the media information client, the server obtains a user portrait of the user based on the identification information of the user, and then filters media information adapted to the user (i.e. interested in the user) from the media information base based on the user portrait, and returns the obtained media information to the media information client.
In the embodiment of the application, the media information stream page is created, and meanwhile, the bottom layer page nested in the media information stream page is also created. In some embodiments, the terminal may create an underlying page nested within the media information stream page by: at least two fragment page components nested in the media information stream page are created, and a bottom layer page nested in the media information stream page is formed through combination of the at least two fragment page components.
In some embodiments, the terminal may also create an underlying page nested within the media information stream page by: at least two view components nested in the media information stream page are created, and a bottom layer page nested in the media information stream page is formed through combination of the at least two view components.
Here, the terminal may be created through a fragment page component or a view component when creating the underlying page. Specifically, at least two fragment page components or at least two view components nested in a media information stream page are firstly created; and then forming a bottom page nested in the media information stream page through the combination of at least two fragment page components, or forming a bottom page nested in the media information stream page through the combination of at least two view components.
Step 102: when the target video is located in the first position area of the media information stream page, a player is created in the first position area, and the target video is played through the player.
Here, the video in the media information stream page may be played automatically (such as when the video is located in the target area of the view interface), or may be played in response to a play command triggered by the user. In some embodiments, when the target video in the media information stream page is in a first location area (such as in a middle area of the view interface), a player is created in the first location area, specifically, onCreateView () may be called to implement the creation of the player, and the target video is played through the created player.
Step 103: when receiving a detail page viewing instruction aiming at the target video, keeping the target video continuously playing, moving the player from the first position area to the second position area, switching the media information stream page to the bottom layer page, and presenting the media information stream through the bottom layer page.
The bottom page is independent of the player, and the target video is fused with the media information stream presented by the bottom page.
Here, the terminal presents a detail page view function item corresponding to the target video, such as a detail page view button, a detail page view function entry, a complete video view entry, and the like. When a trigger operation of a user for the detail page viewing function item is received, a detail page viewing instruction for the target video is received in response to the trigger operation. At this time, a switching operation of the page is performed, that is, from the media information stream page to the bottom layer page (the bottom layer page is the detail page of the target video).
In the embodiment of the application, in order to ensure that the target video in play is not interrupted in the process of page switching, when receiving the detail page viewing instruction, the target video is kept to be continuously played, and the player is moved from the first position area to the second position area, for example, when the player is at the bottom of a media information stream page, the player at the bottom can be moved to the top of the page. And simultaneously loading the bottom layer page and presenting the media information stream in the bottom layer page. The player in the second position area is mutually independent from the bottom page, and forms a page with the bottom page in form, namely, the target video played by the player based on the second position area is fused with the media information stream presented by the bottom page.
As an example, referring to fig. 4A, fig. 4A is a schematic diagram of switching a media information stream page to an underlying page according to an embodiment of the present application. Here, the terminal presents a detail page viewing function entry "blank bar" corresponding to the video 1, and plays the video 1 through the player 1 on a media information stream page where the video 1 is located; when receiving a detail page viewing instruction triggered based on the detail page viewing function entry, keeping the video 1 continuously playing, moving the player 1 from the position area 1 to the position area 2, simultaneously switching a media information stream page to a bottom layer page, and then loading and presenting media information of the bottom layer page.
As an example, referring to fig. 4B, fig. 4B is a schematic diagram two of switching a media information stream page to an underlying page according to an embodiment of the present application. The terminal displays a detail page viewing function item 'complete edition' corresponding to the video 1, and plays the video 2 through the player 2 on a media information stream page where the video 2 is located; when receiving a detail page viewing instruction triggered based on the detail page viewing function item 'complete edition', the player 2 is moved from the position area 1 to the position area 2, and meanwhile, a media information stream page is switched to a bottom layer page, and then media information of the bottom layer page is loaded and presented. Because the detail page viewing function item "complete version" is used for viewing the complete video corresponding to the video 2, the video 2 can be continuously played, can be paused, or can also present prompt information such as "please wait for a moment", loading icons, and the like in the process of moving the player 2.
In some embodiments, after switching the media information stream page to the bottom layer page, if it is detected that the content of the target video is played, the terminal adjusts the player to a stowed state to stop playing the target video, and creates a second player in a third position area when the first video is located in the third position area of the bottom layer page; and playing the first video through the second player.
If the terminal detects that the content of the target video is played, the player can be adjusted to be in a packed state so as to stop playing the target video, and meanwhile, the duty ratio of the player relative to the bottom page is reduced, so that the player can conveniently continue watching or browsing the media information stream of the bottom page. At this time, if the first video is detected to be located in the third location area of the bottom layer page (for example, the third location area of the bottom layer page may be located in the middle area of the view interface), the first video located in the third location area may be played automatically. At this time, a second player is created in the third location area, and specifically onCreateView () may be called to realize creation of the second player, thereby playing the first video through the second player.
In some embodiments, the terminal may further create a second bottom page nested in the bottom page when playing the first video through the second player; and responding to a video detail page viewing instruction aiming at the first video, keeping the first video continuously played, moving the second player from the third position area to the fourth position area, switching the bottom layer page to the second bottom layer page, and presenting the media information stream through the second bottom layer page. The second bottom page is independent of the second player, and the first video is fused with the media information stream presented by the second bottom page.
In practical implementation, after the user enters the bottom page from the media information stream page, the user enters the bottom page of the next level of the bottom page from the bottom page, and the terminal is described as entering the bottom page of the next level from the bottom page of the first level of the media information stream page by taking the detail page of the first video as an example of the bottom page of the next level. Firstly, the terminal can create a second bottom page nested in the bottom page; when receiving a video detail page viewing instruction for the first video, keeping the first video continuously playing, and moving the second player for playing the first video from the third position area to the fourth position area, for example, when the second player is in the middle of the bottom page, the second player in the middle can be moved to the top of the page. And switching the bottom layer page to a second bottom layer page, loading media information in the second bottom layer page and presenting media information streams in the bottom layer page. The player in the fourth position area is independent of the second bottom layer page, and forms a page with the second bottom layer page in form, namely, the first video played by the second player based on the fourth position area is fused with the media information stream presented by the second bottom layer page.
As an example, referring to fig. 5, fig. 5 is a schematic diagram of switching a bottom page to a second bottom page according to an embodiment of the present application. Here, after the playing of the target video corresponding to the player at the top of the bottom page is completed, the player at the top is adjusted to be in a stowage state. And simultaneously determining that the first video is positioned in a third position area of the bottom page, creating a second player in the third position area, and playing the first video through the second player. A second bottom page nested in the bottom page is also created; when a video detail page view instruction for the first video triggered based on the detail page view function item 'detail' is received, keeping the first video continuously playing, moving a second player for playing the first video from a third position area to a fourth position area, and simultaneously loading media information in a second bottom layer page and presenting a media information stream in the bottom layer page.
Based on this, referring to fig. 6, fig. 6 is a schematic diagram illustrating movement of a player in the process of switching from a media information stream page to an underlying page according to an embodiment of the present application. Here, when receiving a detail page view instruction for a video played by Player #1 of a media information stream page, moving Player #1 from an original position area of the media information stream page to a top position area above bottom layer page 1, and loading bottom layer page data in bottom layer page 1, such as a video played by Player #2, thereby achieving seamless switching from the media information stream page to bottom layer page 1; when receiving a detail page view instruction of a video played by a Player Player#2 of the bottom layer page 1, moving the Player#2 from an original position area of the bottom layer page 1 to a top position area above the bottom layer page 2, and loading bottom layer page data in the bottom layer page 2, such as the video played by a Player Player#3, so as to realize seamless switching from the bottom layer page 1 to the bottom layer page 2; when receiving a detail page view instruction for a video played by a Player #3 of the bottom layer page 2, the Player #3 is moved from an original position area of the bottom layer page 2 to a top position area above the bottom layer page 3, and bottom layer page data in the bottom layer page 3, such as a video played by a Player #4, is loaded, so that seamless switching from the bottom layer page 2 to the bottom layer page 3 is realized.
In some embodiments, the terminal may move the player from the first location area to the second location area by: when receiving a detail page viewing instruction aiming at a target video, calling a video player interface corresponding to the target video; and maintaining the target video to continuously play through the video player interface, and moving the player from the first position area to the second position area.
In some embodiments, after switching the media information stream page to the bottom layer page, in the process of playing the target video, the terminal responds to a detailed page exit instruction for the target video to keep the target video continuously playing, moves the player from the second position area to the first position area, and switches the bottom layer page to the media information stream page.
The terminal displays the detail page exit function item corresponding to the target video, and in the playing process of the target video, the user can trigger the detail page exit instruction by triggering the detail page exit function item so as to control the terminal to exit the playing of the target video. When the terminal receives the detailed page exit instruction, in order to ensure that the target video in play is not interrupted in the page switching process, the player is moved from the current second position area to the first position area, namely the original position of the player in the media information stream page, and the bottom layer page is switched to the media information stream page. In actual implementation, the bottom page can be deleted at this time, so as to save storage space.
As an example, referring to fig. 7A, fig. 7A is a schematic diagram of switching an underlying page to a media information stream page according to an embodiment of the present application. The terminal presents a detail page exit function item 'exit' corresponding to the target video in the bottom layer page, and when a detail page exit instruction triggered based on the detail page exit function item 'exit' is received, the player in a playing state is moved from a current second position area to a first position area, and the bottom layer page is switched to the media information stream page.
In some embodiments, after switching the media information stream page to the bottom layer page, the terminal adjusts the player to a stowed state when it is detected that the content of the target video is played; and moving the player in the folding state from the second position area to the first position area, and switching the bottom layer page to the media information stream page.
If the terminal detects that the content of the target video is played, the player can be adjusted to be in a packed state, so that the duty ratio of the player relative to the bottom page is reduced, and the user can conveniently continue watching or browsing the media information stream of the bottom page. When the player is in the stowage state, the terminal can also automatically move the player in the stowage state from the second position area to the first position area and switch the bottom layer page to the media information stream page. In actual implementation, the bottom page can be deleted at this time, so as to save storage space.
As an example, referring to fig. 7B, fig. 7B is a schematic diagram two of switching an underlying page to a media information stream page according to an embodiment of the present application. After detecting that the content of the target video is played, the terminal adjusts the player to a packing state, namely packs the player to the topmost end of the bottom page; at this time, the terminal moves the player in the stowed state from the second location area to the first location area, and switches the bottom layer page to the media information stream page, so as to implement the exit operation from the bottom layer page.
In some embodiments, after switching the media information stream page to the bottom layer page, when the player is in the collapsed state, the terminal adjusts the player from the collapsed state to the expanded state in response to a detail page exit instruction for the target video, moves the player in the expanded state from the second location area to the first location area, and switches the bottom layer page to the media information stream page.
When the player is in a folding state (for example, after the content of the target video is played, the player is in the folding state, or a user actively plays other videos in an underlying page to enable the player to be in the folding state), if the user triggers the detail page exit instruction by triggering the detail page exit function, the terminal responds to the detail page exit instruction to quickly adjust the player from the folding state to the unfolding state, and move the player in the unfolding state from the second position area to the first position area, and switch the underlying page to the media information stream page. In actual implementation, the bottom page can be deleted at this time, so as to save storage space.
As an example, referring to fig. 7C, fig. 7C is a schematic diagram III of switching an underlying page to a media information stream page according to an embodiment of the present application. The terminal presents a detail page exit function item 'exit' corresponding to the target video in the bottom page, rapidly expands the player in the packed state when receiving a detail page exit instruction triggered based on the detail page exit function item 'exit', moves the player in the expanded state from the second position area to the first position area, and switches the bottom page to the media information stream page.
In some embodiments, after switching the media information stream page to the bottom layer page, if the currently presented page is a target bottom layer page of the media information stream page entered based on the bottom layer page, the terminal responds to a page exit instruction for the target bottom layer page, moves the player from the second position area to the first position area, and switches the target bottom layer page to the media information stream page; and deleting all the bottom pages corresponding to the media information stream pages including the bottom page and the target bottom page. The page level of the target bottom page is different from the page level of the bottom page by at least one page level.
Here, referring to fig. 7D, fig. 7D is a schematic diagram showing switching from the bottom page to the media information stream page according to the embodiment of the present application. The terminal presents a page exit function item for exiting the current page. If the currently presented page is a target bottom page of the media information stream page entered based on the bottom page, when a page exit instruction (for example, triggered by triggering a page exit function item) for the target bottom page is received, an animation that a player playing the target video moves from the second position area to the first position area is presented, and the target bottom page is switched to the media information stream page. And simultaneously, in order to save the storage space, deleting all the bottom pages corresponding to the media information stream pages including the bottom pages and the target bottom pages.
In some embodiments, after switching the media information stream page to the bottom layer page, if the currently presented page is a target bottom layer page of the media information stream page entered based on the bottom layer page, the terminal deletes other bottom layer pages between the target bottom layer page and the bottom layer page. The page level of the target bottom page is different from the page level of the bottom page by at least two page levels.
In practical applications, as the number of bottom pages of the incoming media information stream page increases, the number of bottom pages created increases. When the target bottom page receives the page exit instruction and directly exits to the media information stream page, namely when the media information stream page is not returned according to the first level of the bottom page when entering, in actual implementation, the middle transition bottom page is not needed to exist at the same time, only the bottom page of the first page level and the bottom page of the last page level (namely the target bottom page which is currently presented) are needed, and the rest middle bottom pages can be completely deleted, so that the bottom page and players of the bottom page are prevented from being excessively created to occupy memory.
In some embodiments, when the target video is a video clip, the terminal may create a first underlying page located at a next level of the media stream page based on the active component because there is not a continuous play relationship between the target video played by the media stream page and the complete video played by the underlying page. The first bottom layer page is used for playing a complete video corresponding to the target video; correspondingly, when a complete video viewing instruction aiming at the target video is received, switching the media information stream page to a first bottom layer page, creating a first player on the first bottom layer page, and playing the complete video corresponding to the target video through the first player.
Here, when the target video played by the media information stream page is a video clip, since there is not a relationship of continuous playing between the target video played by the media information stream page and the complete video played by the bottom layer page, at this time, the terminal may create the first bottom layer page located at the next level of the media information stream page based on the Activity component Activity. The first bottom layer page is a complete page, so when a complete video viewing instruction aiming at a target video triggered by a user is received, a media information stream page is firstly switched to the first bottom layer page; then, a first player is created in the first bottom page so as to play the complete video corresponding to the target video through the first player.
As an example, referring to fig. 8, fig. 8 is a schematic diagram of a media information stream page switching to a first bottom layer page according to an embodiment of the present application. When a complete video viewing instruction triggered based on the complete video page viewing function item 'complete edition' is received, switching a media information stream page to a first bottom page created based on the Activity, creating a first player on the first bottom page, and playing the complete video corresponding to the target video through the first player.
In some embodiments, when the terminal receives a complete video exit instruction for the target video, the terminal switches the first bottom layer page to the media information stream page, and deletes the first bottom layer page and the bottom layer page nested in the media information stream page.
In practical application, the bottom page corresponding to the video in the media information stream page can be accessed by triggering a detail page viewing instruction, can be accessed by triggering a complete video viewing instruction, can be accessed by a push message sent by a client, and the like. The continuous playing of the video in the page switching process is not required to be ensured by triggering the complete video viewing instruction to enter or triggering the pushing message sent by the client to enter, and at the moment, the bottom page of the media information stream page can be created through the Activity of the movable component. Therefore, the bottom page corresponding to one video may be a bottom page created based on the Activity, or may be a bottom page created based on the Fragment component, or a Fragment bottom page and an Activity bottom page exist at the same time, when returning to the media information stream page from the bottom page, all the bottom pages need to be deleted, that is, all the Fragment bottom pages need to be deleted, and all the Activity bottom pages need to be deleted.
Here, when the complete video view instruction is triggered to enter the first bottom page, if the complete video exit instruction is received, the first bottom page created based on the Activity and the bottom page created based on the Fragment are deleted in the process of switching from the current first bottom page to the media information stream page.
By applying the embodiment of the application, when the target video is positioned in the first position area of the media information stream page, a player is created in the first position area, and the target video is played through the created player; when receiving a detail page viewing instruction for the target video, moving the player from the first position area to the second position area while keeping the target video continuously playing, and switching from the media information stream page to a bottom page nested in the media information stream page. The bottom layer page and the player are mutually independent, the player continuously plays the target video in the moving process, and meanwhile, the player is switched to the bottom layer page from the media information stream page, so that when the details of the video being played in the media information stream page are checked, the video can be ensured not to be interrupted in the process of switching from the media information stream page to the detail page, and seamless switching among pages in the video playing process is realized.
An exemplary application of the embodiments of the present application in a practical application scenario will be described below.
In the related art, the bottom page of the Feeds video stream page is presented by using Activity. The Feeds are presented with the video being played, when the Feeds enter the underlying page Activity from Feeds, the SurfacTextureTexture object is saved at the player TextureView onSurfaceTextureDestroyed of the Feeds, after entering the underlying page Activity, the onSurfacTextureAvaliable of the TextureView is recalled, and the video picture being played in the Feeds is restored by calling setSurfacTexture (). Because the starting of the Activity may take several hundred milliseconds, the video frames in the Activity have a black screen or frame dropping phenomenon, which results in poor user experience.
Based on this, the embodiment of the application provides a video playing method, which uses fragments to realize seamless switching, specifically uses fragments to present the bottom page of Feeds (i.e. does not enable a new Activity bottom page). Meanwhile, the players of the videos of the Feeds and the fragments bottom page are combined (namely, the players of the Feeds and the fragments bottom page adopt the same mode), so that when the Feeds enter the fragments bottom page (or the Feeds are returned from the fragments bottom page), the playing of the videos is not interrupted, the smooth page switching action effect is provided, and the user watching experience is optimized.
Next, referring to fig. 10, a method for playing video provided by an embodiment of the present application will be described in detail with reference to fig. 9A to fig. 9B. Fig. 9A is a schematic flow chart of seamless switching of a page, fig. 9B is a schematic diagram of key classes involved in a video playing method according to an embodiment of the present application, and fig. 10 is a schematic flow chart of a video playing method according to an embodiment of the present application, including:
step 201: the terminal sends a media information acquisition request to the server.
Step 202: the server transmits the media information to the terminal in response to the media information acquisition request.
Step 203: the terminal creates a media information stream page and a bottom layer page nested in the media information stream page based on the acquired media information.
Here, the media information stream page is a home page feeds page, and is created based on the Activity component. Meanwhile, when the first page feeds page is created, a Fragment bottom page is also required to be created to wait for use.
Step 204: when the target video in the media information stream page is located in the first position area, a player is created in the first position area, and the target video is played through the player.
Here, the video in the media information stream page may be played automatically, or may be played in response to a play command triggered by the user. In some embodiments, when the target video in the media information stream page is in a first location area (such as in a middle area of the view interface), a player is created in the first location area to play the target video. Specifically, class onCreateView () may be invoked to enable creation of a player in a media information stream page, and onCreateView () may be invoked to enable creation of a Fragment bottom page.
Step 205: when receiving a detail page viewing instruction aiming at the target video, keeping the target video continuously playing, moving the player from the first position area to the second position area, switching the media information stream page to the bottom layer page, and presenting the media information stream through the bottom layer page.
Here, a detail page view function item, such as a detail page view entry, a detail page view button, or the like, located below the playing card of the target video may be presented. The user may trigger a detail page view instruction for the target video by clicking or long pressing the detail page view function item.
When a detail page view instruction (i.e., an instruction to enter an underlying page from a media information stream page) is received, the position (i.e., a first location area) of the player in the Feeds page at this time is recorded. While moving the player from the first location area to the second location area. That is, referring to fig. 4, the Feeds Player #1 located in the lower position area of the media stream page is moved upward to the top position of the seamless handover bottom layer page 1. Meanwhile, the Fragment bottom page is full and moves to the lower part of the Feeds Player Player#1. Here, the two moving processes may be animated at the same time.
After the moving animation is finished, the Fragment bottom page requests and loads bottom page data, namely a new media information stream. Here, when the media information stream in the bottom page still contains the video, the bottom page corresponding to the current Fragment bottom page is also created, so that the current Fragment bottom page can be seamlessly switched to the new bottom page through the current playing card in the current Fragment bottom page. Specifically, the Fragment bottom page may be generated according to an ID, which is dynamically generated to ensure that the ID generated each time is different, thereby ensuring that the generated Fragment bottom page is different. The seamless switching process of the page is finished, namely, the media information stream page seamlessly enters the Fragment bottom page.
Step 206: in the playing process of the target video, responding to a detail page exit instruction aiming at the target video, keeping the target video continuously played, moving the player from the second position area to the first position area, and switching the bottom layer page to the media information stream page.
Here, in the playing process of the target video, when receiving a detail page exit instruction (i.e. the user returns by clicking the back key), the player is moved from the second location area to the first location area, and the underlying page is switched to the media information stream page. Referring to fig. 4, the Feeds Player #1 located at the top position of the seamless handover bottom layer page 1 is moved down to the lower position area in the media stream page.
Step 207: when the content of the target video is played, the player is adjusted to be in a packed state; and responding to a detail page exit instruction aiming at the target video, adjusting the player from a stowed state to a deployed state, moving the player in the deployed state from a second position area to a first position area, and switching the underlying page to the media information stream page.
Here, when the content playing of the target video is completed or the user is playing other videos in the underlying page, the player of the target video is adjusted to the collapsed state. When receiving a detail page exit instruction (namely, the user returns by clicking a back key), rapidly adjusting the player from a stowed state to a deployed state, moving the player from a second location area to a first location area, and switching the underlying page to the media information stream page.
Step 208: the method comprises the steps of entering a target bottom page of a media information stream page based on the bottom page, wherein the page level of the target bottom page is different from the page level of the bottom page by at least one page level.
After the user enters the bottom layer page from the media information stream page, the user can also enter the bottom layer page of the next level from the bottom layer page until entering the target bottom layer page.
Referring to fig. 6, from below a currently playing card in a Feeds page, clicking a blank bar to enter a bottom layer page 1, simultaneously moving a player#1 from an original position area of the Feeds page to the top of the bottom layer page 1, and loading bottom layer page data (including video data played by a Player player#2) in the bottom layer page 1, thereby realizing seamless switching from the Feeds page to the bottom layer page 1; clicking a blank bar from the lower part of a currently played card in the bottom layer page 1 to enter the bottom layer page 2, simultaneously moving the player#2 from the original position area of the bottom layer page 1 to the top of the bottom layer page 2, and loading bottom layer page data (comprising video data played by a Player player#3) in the bottom layer page 2, thereby realizing seamless switching from the bottom layer page 1 to the bottom layer page 2; and clicking a blank bar from the lower part of the current playing card in the bottom layer page 2 to enter the bottom layer page 3, simultaneously moving the player#3 from the original position area of the bottom layer page 2 to the top of the bottom layer page 3, and loading bottom layer page data (comprising video data played by the Player Player#4) in the bottom layer page 3, thereby realizing seamless switching from the bottom layer page 2 to the bottom layer page 3.
If the currently presented page is a target bottom page (such as bottom page 3 corresponding to the media information stream page) of the media information stream page entered based on the bottom page, when a page exit instruction (i.e. the user returns by clicking the back key) for the target bottom page is received, all bottom pages corresponding to seamless switching need to be emptied once. If the top player is in the stowed state at this time, it is necessary to rapidly unwind the player and pop up all but the first seamless bottom page, then to return the top-unwound player to the location area of the player in the original recorded media stream page from the top according to the location area of the player in the media stream page (i.e., recorded when entering from the top page).
Referring to fig. 9A, as shown in steps 1, 1.1 and 1.1.1, creation of a player in a media information stream page and creation of an underlying page are realized by calling onCreateView (), and when a current broadcast page is initialized, a Switch () is called to determine whether the current broadcast page supports seamless switching of pages, and if so, a Fragment underlying page is created, so that the underlying page is entered from the media information stream page in a seamless switching manner; if not, the presentation of the bottom page is realized through the Activity so as to complete the switching from the media information stream page to the bottom page. As shown in steps 2, 2.1 and 2.1.1, when an underlying page is entered, call handle Expand Detail Fragment () expands the underlying page, call get Detail Fragment () acquires the data of the underlying page, and passes through set images (). As shown in steps 3, 3.1 and 3.1.1, when the media information stream page enters the bottom page, the process of seamless switching expansion can be called by expanding the default settings () and specifically, the animation of seamless switching expansion process is realized by calling the doexpanse () through append Detail Fragment () notification; as shown in steps 4, 4.1 and 4.1.1, when the media information stream page is returned, the removestatail fragment () can be called to implement the seamless switching return process, specifically, the removestatailment () is notified to call the doreveanimation () to implement the animation of the seamless switching return process.
Fig. 9B is a schematic diagram of key classes related to a video playing method according to an embodiment of the present application. Among these are some APIs for controlling the current broadcast of feeds. For example, the expandedDetailFragment () is a seamless handover expansion procedure, and the removeDetailFragment () is a seamless handover return procedure. The AttachLayerLiteImpl and DetailSmoothAttachLayerImpl classes are used to handle patch related logic.
As more and more Fragment bottom pages are entered, the created Fragment bottom pages are more and more, and in fact, the fact that too many Fragment bottom pages exist simultaneously is not needed, only the first Fragment bottom page and the last Fragment bottom page are needed, and the rest of the Fragment bottom pages can be deleted, so that the player is prevented from creating too much and occupying too much memory.
In addition to the Fragment bottom page, there are also Activity bottom pages, such as bottom pages entered by pushing, or bottom pages entered by clicking a full version button, etc. Thus, there may also be both a Fragment bottom page and an Activity bottom page. At this time, when returning to the media information stream page (i.e. the home page), all the bottom pages need to be emptied to return to the home page, i.e. not only all the Fragment bottom pages need to be popped, but also the Activity bottom pages need to be finish.
In some embodiments, custom view may be used instead of Fragment, and only some methods used are implemented to avoid Fragment overweight.
Next, a method for playing video provided by the embodiment of the present application will be described from the product side.
Referring to fig. 5, here, from below the video currently played by Feeds, a blank bar is clicked to enter the bottom page, and from the bottom page, the blank bar is clicked continuously to enter the next bottom page. Clicking a blank bar from the lower part of a video currently played by Feeds to enter a bottom layer page, sliding the player positioned on the Feeds page upwards, sliding the comment bar downwards (if a switch is turned on), and keeping the player continuously playing; meanwhile, the bottom page has a Loading effect; and the main body information of the Feeds page is faded out and displayed, and the video is continuously played through a player at the top on the bottom page. Similarly, the user may also continue clicking on the blank bar from the bottom page to enter the next bottom page.
Referring to fig. 4B, here, the full version button corresponding to the video clip currently played by the Feeds page is clicked to enter the underlying page. Clicking the complete version, sliding the player upwards, sliding the comment bar downwards (if a switch is opened), and loading the complete video corresponding to the video clip by the player; meanwhile, the bottom page has a loading effect; and the main body information of the Feeds page is faded out and displayed, and the complete-edition bottom page is entered.
Referring to fig. 11A, fig. 11A is a schematic diagram illustrating a media information stream page switching to an underlying page according to an embodiment of the present application. Here, from below the video currently played by Feeds, clicking a blank bar to enter a bottom page, and sliding the player while amplifying the video, and sliding the comment bar downwards; keeping the player continuously playing; meanwhile, the bottom page has a Loading effect; and the main body information of the Feeds page is faded out and displayed, and the video is continuously played through a player at the top on the bottom page.
Referring to FIG. 7A, here, at the top of the underlying page, the player is in an expanded state and is playing video, clicking a back button, presenting current page information, the top player drops back to the position of the player of the previous Feeds page; the background information is the effect of fade-out switching; thereby realizing the return from the bottom page to the Feeds page.
Referring to FIG. 7D, here, the top player expands, continuing to play the Feeds video below the bottom page, and the top player pauses; clicking a return button to present the current page information, and returning the playing Feeds to the position of the previous Feeds page; the background information is the effect of fade-out switching; thereby realizing the return from the bottom page to the Feeds page.
Referring to FIG. 7C, here, the top player is collapsed and plays the lower feeds video; clicking a return button; presenting the current page information, and enabling the playing Feeds player to fall back to the position of the previous Feeds page player; the background information is the effect of fade-out switching; thereby realizing the return from the bottom page to the Feeds page.
Referring to fig. 11B, fig. 11B is a view of entering an underlying page through a search according to an embodiment of the present application. Here, the entry of the first-level page is not a media information stream page (such as searching, small-graph horizontal sliding, program library, etc.), here taking searching as an example, clicking to enter the bottom-layer page, at this time, presenting the effect of sliding from right to left, entering the bottom-layer page for automatic playing; clicking a return button, and at the moment, presenting the effect of sliding from left to right; and returning to the previous page, and playing no content.
By applying the embodiment of the application, the fragments are used for presenting the bottom layer page of the Feeds, and the players of the videos of the Feeds and the fragments bottom layer page are combined, so that when the Feeds enter the fragments bottom layer page (or return the Feeds from the fragments bottom layer page), the playing of the videos is not interrupted, the switching action effect of the smoother video page is provided, and the user viewing experience is optimized.
Continuing to describe the video playing device 555 provided in the embodiments of the present application, in some embodiments, the video playing device may be implemented by using a software module. Referring to fig. 12, fig. 12 is a schematic structural diagram of a video playing device 555 according to an embodiment of the present application, where the video playing device 555 according to an embodiment of the present application includes:
a first creation module 5551, configured to present a media information stream page including a target video, and create a bottom layer page nested in the media information stream page;
a second creating module 5552, configured to create a player in a first location area of the media information stream page when the target video is located in the first location area, and play the target video through the player;
a moving module 5553, configured to, when receiving a detail page view instruction for the target video, keep the target video continuously playing, move the player from the first location area to the second location area, and switch the media information stream page to the bottom layer page, and present the media information stream through the bottom layer page;
the bottom page is independent of the player, and the target video is fused with the media information stream presented by the bottom page.
In some embodiments, the first creating module 5551 is further configured to create at least two fragment page components nested in the media information stream page, and form, by combining the at least two fragment page components, a bottom layer page nested in the media information stream page.
In some embodiments, the first creating module 5551 is further configured to create, when the target video is a video clip, a first bottom layer page located at a level next to the media information stream page based on an activity component, where the first bottom layer page is used to play a complete video corresponding to the target video;
correspondingly, the second creating module 5552 is further configured to switch the media information stream page to the first bottom layer page when receiving a complete video viewing instruction for the target video, and
and creating a first player on the first bottom page, and playing the complete video corresponding to the target video through the first player.
In some embodiments, the apparatus further comprises:
the deleting module is used for switching the first bottom layer page to the media information stream page when receiving a complete video exit instruction aiming at the target video, and is used for deleting the target video
And deleting the first bottom page and the bottom page nested in the media information stream page.
In some embodiments, the moving module 5553 is further configured to, during playing the target video, in response to a detail page exit instruction for the target video, keep the target video continuously playing, move the player from the second location area to the first location area, and
and switching the bottom layer page to the media information stream page.
In some embodiments, the mobile module 5553 is further configured to, when the player is in a stowed state, adjust the player from the stowed state to a deployed state in response to a detail page exit instruction for the target video, and
and moving the player in the unfolding state from the second position area to the first position area, and switching the bottom layer page to the media information stream page.
In some embodiments, the mobile module 5553 is further configured to adjust the player to a stowed state when it detects that the content of the target video is played;
and moving the player in the packed state from the second position area to the first position area, and switching the bottom layer page to the media information stream page.
In some embodiments, the moving module 5553 is further configured to, if the currently presented page is a target bottom page of the media information stream page entered based on the bottom page, respond to a page exit instruction for the target bottom page to move the player from the second location area to the first location area, and
switching the target bottom layer page to the media information flow page;
deleting all bottom pages corresponding to the media information stream pages including the bottom page and the target bottom page;
the page level of the target bottom page is different from the page level of the bottom page by at least one page level.
In some embodiments, the deleting module is further configured to delete other bottom layer pages between the target bottom layer page and the bottom layer page if the currently presented page is a target bottom layer page of the media information stream page entered based on the bottom layer page;
the page level of the target bottom page is different from the page level of the bottom page by at least two page levels.
In some embodiments, the second creation module 5552 is further configured to adjust the player to a stowed state to stop playing the target video when it is detected that the content of the target video is played, and
Creating a second player in a third location area of the underlying page when the first video is located in the third location area;
and playing the first video through the second player.
In some embodiments, the first creating module 5551 is further configured to create a second bottom page nested in the bottom page;
responding to a video detail page viewing instruction aiming at the first video, keeping the first video continuously played, moving the second player from the third position area to a fourth position area, switching the bottom layer page to the second bottom layer page, and presenting a media information stream through the second bottom layer page;
the second bottom layer page is independent of the second player, and the first video is fused with a media information stream presented by the second bottom layer page.
In some embodiments, the mobile module 5553 is further configured to, when receiving a detail page view instruction for the target video, invoke a video player interface corresponding to the target video;
and maintaining the target video to continuously play through the video player interface, and moving the player from the first position area to the second position area.
By applying the embodiment of the application, when the target video is positioned in the first position area of the media information stream page, a player is created in the first position area, and the target video is played through the created player; when receiving a detail page viewing instruction for the target video, moving the player from the first position area to the second position area while keeping the target video continuously playing, and switching from the media information stream page to a bottom page nested in the media information stream page. The bottom layer page and the player are mutually independent, the player continuously plays the target video in the moving process, and meanwhile, the player is switched to the bottom layer page from the media information stream page, so that when the details of the video being played in the media information stream page are checked, the video can be ensured not to be interrupted in the process of switching from the media information stream page to the detail page, and seamless switching among pages in the video playing process is realized.
The embodiment of the application also provides electronic equipment, which comprises:
a memory for storing executable instructions;
and the processor is used for realizing the video playing method provided by the embodiment of the application when executing the executable instructions stored in the memory.
Embodiments of the present application also provide a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions, so that the computer device executes the video playing method provided by the embodiment of the application.
The embodiment of the application also provides a computer readable storage medium which stores executable instructions, and when the executable instructions are executed by a processor, the method for playing the video provided by the embodiment of the application is realized.
In some embodiments, the computer readable storage medium may be FRAM, ROM, PROM, EPROM, EEPROM, flash memory, magnetic surface memory, optical disk, or CD-ROM; but may be a variety of devices including one or any combination of the above memories.
In some embodiments, the executable instructions may be in the form of programs, software modules, scripts, or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and they may be deployed in any form, including as stand-alone programs or as modules, components, subroutines, or other units suitable for use in a computing environment.
As an example, the executable instructions may, but need not, correspond to files in a file system, may be stored as part of a file that holds other programs or data, for example, in one or more scripts in a hypertext markup language (HTML, hyper Text Markup Language) document, in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files that store one or more modules, sub-programs, or portions of code).
As an example, executable instructions may be deployed to be executed on one computing device or on multiple computing devices located at one site or, alternatively, distributed across multiple sites and interconnected by a communication network.
The foregoing is merely exemplary embodiments of the present application and is not intended to limit the scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and scope of the present application are included in the protection scope of the present application.

Claims (15)

1. A method for playing video, the method comprising:
presenting a media information stream page containing a target video, and creating a bottom layer page nested in the media information stream page;
When the target video is positioned in a first position area of the media information stream page, creating a player in the first position area, and playing the target video through the player;
when receiving a detail page viewing instruction aiming at the target video, keeping the target video continuously playing, moving the player from the first position area to the second position area, switching the media information stream page to the bottom layer page, and presenting the media information stream through the bottom layer page;
the bottom page is independent of the player, and the target video is fused with the media information stream presented by the bottom page.
2. The method of claim 1, wherein creating an underlying page nested within the media information stream page comprises:
and creating at least two fragment page components nested in the media information stream page, and combining the at least two fragment page components to form a bottom page nested in the media information stream page.
3. The method of claim 1, wherein the method further comprises:
when the target video is a video clip, a first bottom layer page positioned at the next level of the media information stream page is created based on an active component, wherein the first bottom layer page is used for playing a complete video corresponding to the target video;
Accordingly, the method further comprises:
when receiving a complete video viewing instruction aiming at the target video, switching the media information stream page to the first bottom layer page, and
and creating a first player on the first bottom page, and playing the complete video corresponding to the target video through the first player.
4. A method as claimed in claim 3, wherein the method further comprises:
when receiving a complete video exit instruction aiming at the target video, switching the first bottom layer page to the media information stream page, and
and deleting the first bottom page and the bottom page nested in the media information stream page.
5. The method of claim 1, wherein after said switching said media information stream page to said underlying page, said method further comprises:
in the process of playing the target video, responding to a detail page exit instruction aiming at the target video, keeping the target video continuously playing, moving the player from the second position area to the first position area, and
and switching the bottom layer page to the media information stream page.
6. The method of claim 1, wherein after said switching said media information stream page to said underlying page, said method further comprises:
when the player is in a stowed state, responding to a detail page exit instruction for the target video, adjusting the player from the stowed state to a deployed state, and
and moving the player in the unfolding state from the second position area to the first position area, and switching the bottom layer page to the media information stream page.
7. The method of claim 1, wherein after said switching said media information stream page to said underlying page, said method further comprises:
when the completion of the content playing of the target video is detected, the player is adjusted to be in a stowage state;
and moving the player in the packed state from the second position area to the first position area, and switching the bottom layer page to the media information stream page.
8. The method of claim 1, wherein after said switching said media information stream page to said underlying page, said method further comprises:
If the currently presented page is a target bottom page of the media information stream page entered based on the bottom page, responding to a page exit instruction for the target bottom page, moving the player from the second position area to the first position area, and
switching the target bottom layer page to the media information flow page;
deleting all bottom pages corresponding to the media information stream pages including the bottom page and the target bottom page;
the page level of the target bottom page is different from the page level of the bottom page by at least one page level.
9. The method of claim 1, wherein after said switching said media information stream page to said underlying page, said method further comprises:
if the currently presented page is a target bottom page of the media information stream page entered based on the bottom page, deleting other bottom pages between the target bottom page and the bottom page;
the page level of the target bottom page is different from the page level of the bottom page by at least two page levels.
10. The method of claim 1, wherein after said switching said media information stream page to said underlying page, said method further comprises:
when the completion of the content playing of the target video is detected, the player is adjusted to be in a retracted state so as to stop playing the target video, and
creating a second player in a third location area of the underlying page when the first video is located in the third location area;
and playing the first video through the second player.
11. The method of claim 10, wherein the method further comprises:
creating a second bottom page nested in the bottom page;
responding to a video detail page viewing instruction aiming at the first video, keeping the first video continuously played, moving the second player from the third position area to a fourth position area, switching the bottom layer page to the second bottom layer page, and presenting a media information stream through the second bottom layer page;
the second bottom layer page is independent of the second player, and the first video is fused with a media information stream presented by the second bottom layer page.
12. The method of claim 1, wherein the maintaining the target video continuously playing when receiving a detail page view instruction for the target video, moving the player from the first location area to a second location area, comprises:
when receiving a detail page viewing instruction aiming at the target video, calling a video player interface corresponding to the target video;
and maintaining the target video to continuously play through the video player interface, and moving the player from the first position area to the second position area.
13. A video playback device, the device comprising:
the first creation module is used for presenting a media information stream page containing a target video and creating a bottom layer page nested in the media information stream page;
the second creating module is used for creating a player in the first position area when the target video is positioned in the first position area of the media information stream page, and playing the target video through the player;
the mobile module is used for keeping the target video continuously playing when receiving a detail page viewing instruction aiming at the target video, moving the player from the first position area to the second position area, switching the media information stream page to the bottom layer page, and presenting the media information stream through the bottom layer page;
The bottom page is independent of the player, and the target video is fused with the media information stream presented by the bottom page.
14. An electronic device, the electronic device comprising:
a memory for storing executable instructions;
a processor for implementing the video playing method according to any one of claims 1 to 12 when executing the executable instructions stored in the memory.
15. A computer readable storage medium storing executable instructions which when executed are adapted to carry out the method of playing video according to any one of claims 1 to 12.
CN202011448392.XA 2020-12-09 2020-12-09 Video playing method and device, electronic equipment and storage medium Active CN114615553B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011448392.XA CN114615553B (en) 2020-12-09 2020-12-09 Video playing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011448392.XA CN114615553B (en) 2020-12-09 2020-12-09 Video playing method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN114615553A CN114615553A (en) 2022-06-10
CN114615553B true CN114615553B (en) 2023-10-20

Family

ID=81856961

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011448392.XA Active CN114615553B (en) 2020-12-09 2020-12-09 Video playing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114615553B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6976216B1 (en) * 2000-11-17 2005-12-13 Streamzap, Inc. Computer system with remote key press events directed to a first application program and local key press events directed to a second application program
CN108449638A (en) * 2018-03-15 2018-08-24 广州虎牙信息科技有限公司 A kind of method, apparatus and electronic equipment playing advertisement
CN110062284A (en) * 2019-04-03 2019-07-26 北京字节跳动网络技术有限公司 Video broadcasting method, device and electronic equipment
CN110582017A (en) * 2019-09-10 2019-12-17 腾讯科技(深圳)有限公司 video playing method, device, terminal and storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7877687B2 (en) * 2007-08-16 2011-01-25 Yahoo! Inc. Persistent visual media player
CN104965693A (en) * 2014-08-29 2015-10-07 腾讯科技(深圳)有限公司 Video processing method and system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6976216B1 (en) * 2000-11-17 2005-12-13 Streamzap, Inc. Computer system with remote key press events directed to a first application program and local key press events directed to a second application program
CN108449638A (en) * 2018-03-15 2018-08-24 广州虎牙信息科技有限公司 A kind of method, apparatus and electronic equipment playing advertisement
CN110062284A (en) * 2019-04-03 2019-07-26 北京字节跳动网络技术有限公司 Video broadcasting method, device and electronic equipment
CN110582017A (en) * 2019-09-10 2019-12-17 腾讯科技(深圳)有限公司 video playing method, device, terminal and storage medium

Also Published As

Publication number Publication date
CN114615553A (en) 2022-06-10

Similar Documents

Publication Publication Date Title
CN108924626B (en) Picture generation method, device, equipment and storage medium
KR102059428B1 (en) How to display content viewing devices and their content viewing options
US20200221172A1 (en) Method for playing multiple videos on mobile terminal, mobile terminal, and readable storage medium
US20150248722A1 (en) Web based interactive multimedia system
JP2022506929A (en) Display page interaction control methods and devices
KR20160143755A (en) Expandable application representation, activity levels, and desktop representation
US20140189516A1 (en) Video preview display method and terminal device
US9747004B2 (en) Web content navigation using tab switching
US20170366832A1 (en) Video reproduction apparatus, control method thereof, and computer-readable storage medium storing program
US20130093790A1 (en) Method and system for implementing augmented reality application
KR20170097161A (en) Browser display casting techniques
CN111432264A (en) Content display method, device and equipment based on media information stream and storage medium
US20240137617A1 (en) Video playing method and apparatus, and storage medium
CN111580914A (en) Interactive processing method and device for information stream and electronic equipment
CN112543365B (en) Media information playing method, device, equipment and computer readable storage medium
US20140259083A1 (en) System and method for use in enhancing the display of multimedia content
CN114615553B (en) Video playing method and device, electronic equipment and storage medium
CN115225952B (en) Video playing control method and device, electronic equipment, storage medium and product
US20150293888A1 (en) Expandable Application Representation, Milestones, and Storylines
CN114390332A (en) Display device and method for rapidly switching split-screen application
CN112948730A (en) Webpage data display method and device, storage medium and electronic equipment
CN117135390A (en) Video playing method, device, equipment, storage medium and program product
CN117951405A (en) Page jump processing method and electronic equipment
CN113722036A (en) Application relay method and device
CN115729506A (en) Control method, control device, electronic apparatus, and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant