CN113286189A - Video playing method, device, server and storage medium - Google Patents

Video playing method, device, server and storage medium Download PDF

Info

Publication number
CN113286189A
CN113286189A CN202110442395.0A CN202110442395A CN113286189A CN 113286189 A CN113286189 A CN 113286189A CN 202110442395 A CN202110442395 A CN 202110442395A CN 113286189 A CN113286189 A CN 113286189A
Authority
CN
China
Prior art keywords
video
video cover
image
playing
cover image
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.)
Pending
Application number
CN202110442395.0A
Other languages
Chinese (zh)
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.)
Beijing QIYI Century Science and Technology Co Ltd
Original Assignee
Beijing QIYI Century Science and Technology 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 Beijing QIYI Century Science and Technology Co Ltd filed Critical Beijing QIYI Century Science and Technology Co Ltd
Priority to CN202110442395.0A priority Critical patent/CN113286189A/en
Publication of CN113286189A publication Critical patent/CN113286189A/en
Pending legal-status Critical Current

Links

Images

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/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/436Interfacing a local distribution network, e.g. communicating with another STB or one or more peripheral devices inside the home
    • H04N21/4363Adapting the video stream to a specific local network, e.g. a Bluetooth® network
    • 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/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • H04N21/44016Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving splicing one content stream with another content stream, e.g. for substituting a video clip
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Databases & Information Systems (AREA)
  • Human Computer Interaction (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The embodiment of the invention provides a video playing method, a device, a server and a storage medium, wherein a plurality of preset image containers and playing components of a player are added into a preset sliding container in advance, video cover images are loaded in the image containers to be displayed on a feed page, and a hierarchical structure that the video cover images are displayed in front of the playing components is formed, and the method comprises the following steps: hiding the first video cover image under the condition that the preset operation trigger aiming at the first video cover image in the feed page is monitored; wherein the first video cover image comprises any one of a plurality of video cover images in the feed page; determining a first display position of a first video cover image in a feed page, and adjusting a playing component to the first display position; and loading the first video corresponding to the first video cover image through the playing component, and playing the first video.

Description

Video playing method, device, server and storage medium
Technical Field
The present invention relates to the field of digital multimedia technologies, and in particular, to a video playing method, apparatus, server, and storage medium.
Background
With the opening of the self-media age, more and more self-media authors gradually register a batch of accounts on each network platform, and then continuously release information on the accounts to continuously update contents. The content that is continuously updated and presented to the user from the media author via the registered account can be understood as feed stream. The short video feed stream is loaded with many similar short videos by the RecycleView and is displayed on a feed page in a layout mode.
At present, when a short video in a short video feed stream is played each time, a playing component of a player needs to be created each time, and the playing component of the player needs to be deleted after the playing is finished. Thus, frequent creation and deletion of the playing component of the player triggers a series of redundant operations such as Request layout of view, and Surface re-creation of the played TextureView, which results in additional performance loss and reduces the short video playing speed.
Disclosure of Invention
Embodiments of the present invention provide a video playing method, an apparatus, a server, and a storage medium, so as to achieve the beneficial effects of avoiding extra performance loss and increasing video playing speed. The specific technical scheme is as follows:
in a first aspect of the embodiments of the present invention, there is provided a video playing method, in which a plurality of preset image containers and playing components of a player are added to a preset sliding container in advance, video cover images are loaded in the image containers to be displayed on a feed page, and a hierarchical structure is formed in which the video cover images are displayed in front of the playing components and the playing components are displayed behind the playing components, the method including:
hiding a first video cover image in the feed page under the condition that the preset operation trigger for the first video cover image in the feed page is monitored;
wherein the first video cover image comprises any one of a plurality of the video cover images in the feed page;
determining a first display position of the first video cover image in the feed page, and adjusting the playing component to the first display position;
and loading a first video corresponding to the first video cover image through the playing component, and playing the first video.
In an alternative embodiment, loading video cover images in a plurality of said image containers for presentation on feed pages comprises:
and for any one image container, loading one video cover image in the image container to be displayed on a feed page.
In an alternative embodiment, after the concealing the first video cover image, the method further comprises:
determining the image container corresponding to the first video cover image, and adding the playing component to the image container corresponding to the first video cover image.
In an alternative embodiment, the determining a first display position of the first video cover image in the feed page, and adjusting the playing component to the first display position includes:
determining first diagonally opposite vertex coordinates of the first video cover image in the feed page;
replacing the diagonal vertex coordinates of the playing component with the first diagonal vertex coordinates, and informing a system API (application program interface) to adjust the position of the playing component in the feed page based on the first diagonal vertex coordinates.
In an optional embodiment, the method further comprises:
displaying the first video cover image at the first display position and hiding the second video cover image under the condition that the preset operation trigger aiming at the second video cover image in the feed page is monitored;
wherein the second video cover image comprises any one of the plurality of video cover images in the feed page except the first video cover image;
determining a second display position of the second video cover image in the feed page, and adjusting the playing component to the second display position;
and loading a second video corresponding to the second video cover image through the playing component, and playing the second video.
In an alternative embodiment, after the concealing the second video cover image, the method further comprises:
determining the image container corresponding to the second video cover image, and adding the playing component to the image container corresponding to the second video cover image.
In an alternative embodiment, the determining a second display position of the second video cover image in the feed page, and adjusting the playing component to the second display position includes:
determining second diagonally opposite vertex coordinates of the second video cover image in the feed page;
and replacing the diagonal vertex coordinates of the playing component with the second diagonal vertex coordinates, and informing a system API (application program interface) to adjust the position of the playing component in the feed page based on the second diagonal vertex coordinates.
In a second aspect of the embodiments of the present invention, there is also provided a video playback apparatus, including:
the system comprises a preprocessing module, a display module and a display module, wherein the preprocessing module is used for pre-adding a plurality of preset image containers and play components of a player into a preset sliding container, loading video cover images in the image containers to be displayed on a feed page, and forming a hierarchical structure that the video cover images are displayed in front and the play components are displayed in back;
the image hiding module is used for hiding the first video cover image under the condition that the preset operation trigger aiming at the first video cover image in the feed page is monitored;
wherein the first video cover image comprises any one of a plurality of the video cover images in the feed page;
the position adjusting module is used for determining a first display position of the first video cover image in the feed page and adjusting the playing component to the first display position;
and the video playing module is used for loading the first video corresponding to the first video cover image through the playing component and playing the first video.
In a third aspect of the embodiments of the present invention, there is further provided a server, including a processor, a communication interface, a memory, and a communication bus, where the processor and the communication interface complete communication between the memory and the processor through the communication bus;
a memory for storing a computer program;
a processor, configured to implement the video playing method according to any one of the first aspect described above when executing a program stored in a memory.
In a fourth aspect of the embodiments of the present invention, there is further provided a storage medium, where instructions are stored, and when the storage medium runs on a computer, the storage medium causes the computer to execute the video playing method according to any one of the first aspect.
In a fifth aspect of the embodiments of the present invention, there is also provided a computer program product containing instructions, which when run on a computer, causes the computer to execute the video playing method according to any one of the first aspect.
The technical proposal provided by the embodiment of the invention adds a plurality of preset image containers and playing components of the player into a preset sliding container in advance, loading video cover images in a plurality of image containers for presentation on feed pages to form a hierarchy in which a plurality of video cover images are presented in front and a playing component of a player is presented behind, hiding the first video cover image under the condition that the preset operation trigger aiming at the first video cover image in the feed page is monitored, wherein the first video cover image comprises any one of a plurality of video cover images in the feed page, a first display position of the first video cover image in the feed page is determined, a playing component of the player is adjusted to the first display position, and loading the first video corresponding to the first video cover image through a playing component of the player, and playing the first video. The playing components of the multiple preset image containers and the player are added into the preset sliding container in advance, the video cover images are loaded in the multiple image containers to be displayed on the feed page, a hierarchical structure that the multiple video cover images are displayed in the front and the playing components of the player are displayed in the rear is formed, therefore, when the video is played subsequently, the playing components of the player can be adjusted to complete playing in the feed page, frequent creation and deletion of the playing components of the player are avoided, extra performance loss is avoided, and the video playing speed is improved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without inventive exercise.
FIG. 1 is a schematic diagram of a front-back hierarchy structure formed by a video cover image and a video view of a player according to an embodiment of the present invention;
fig. 2 is a schematic flow chart illustrating an implementation of a video playing method according to an embodiment of the present invention;
fig. 3 is a schematic flow chart illustrating another implementation of a video playing method according to an embodiment of the present invention;
fig. 4 is a schematic diagram illustrating an effect of playing the short video a according to an embodiment of the present invention;
fig. 5 is a schematic flow chart illustrating another implementation of a video playing method according to an embodiment of the present invention;
fig. 6 is a schematic flow chart illustrating another implementation of a video playing method according to an embodiment of the present invention;
fig. 7 is a schematic diagram illustrating an effect of playing the short video B according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of a video playback device according to an embodiment of the present invention;
fig. 9 is a schematic structural diagram of a server shown in the embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be obtained by a person skilled in the art without any inventive step based on the embodiments of the present invention, are within the scope of the present invention.
In the embodiment of the present invention, an image container, a playing component of a player, and a sliding container that are applied are first exemplarily described: for the image container, for carrying the video cover image, for example, the image container may be a relative layout container, i.e., relalativelayout in Viewgroup, etc.; for the playing component of the player, the playing component is used to load the video and play, for example, the playing component of the player may be the VideoView of the player; for the slide container, it is used to wrap the image container, the playing component of the player, but it is mainly used to wrap the video cover image in the image container, for example, the slide container may be a reclerview, etc.
Based on the above exemplary descriptions of the image container, the playing component of the player, and the slide container, the following preprocessing is performed: the method comprises the steps of adding a plurality of preset image containers and playing components of a player into a preset sliding container in advance, loading video cover images in the image containers to be displayed on a feed page, and forming a hierarchical structure that the video cover images are displayed in the front and the playing components of the player are displayed in the back.
For example, two relative layout and the player's VideoView are added to the cycleview in advance, a video cover image a and a video cover image B are loaded in the two relative layouts for display on a feed page, and a hierarchical structure is formed in which the video cover image a and the video cover image B are displayed in front and the player's VideoView is displayed in the back, as shown in fig. 1.
Wherein, aiming at any image container, a video cover image is loaded in the image container to be displayed on a feed page. For example, regarding relative layout (a) and relative layout (B), the video cover image a is loaded in relative layout (a), the video cover image B is displayed on a feed page in relative layout (B), and a hierarchical structure in which the video cover image a and the video cover image B are displayed in front and the video view of the player is displayed in back is formed.
It should be noted that the video cover image may be a poster corresponding to a video (for example, a short video, a medium video, a long video, and the like), may also be an image of any frame in the video, and may of course be any type of cover image corresponding to the video, which is not limited in this embodiment of the present invention.
Based on the foregoing preprocessing, as shown in fig. 2, an implementation flow diagram of a video playing method provided in an embodiment of the present invention is shown, where the method specifically includes the following steps:
s201, hiding the first video cover image under the condition that the preset operation trigger aiming at the first video cover image in the feed page is monitored.
For a feed page, which contains a plurality of video cover images, the feed page may present the plurality of video cover images to the user, for example, a plurality of similar video cover images, or a plurality of non-similar video cover images. The embodiment of the invention monitors whether the preset operation of a user for the first video cover image in the feed page is triggered. Wherein the first video cover image comprises any one of a plurality of video cover images in the feed page.
And hiding the first video cover image under the condition that the preset operation trigger of the user for the first video cover image in the feed page is monitored. Here, the preset operation may be a click operation, a slide operation, and the like, which is not limited in the embodiment of the present invention. It should be noted that, when it is monitored that the preset operation of the user on the first video cover image in the feed page is triggered, a process of playing the first video corresponding to the first video cover image is triggered.
For example, a video cover image is shown in a feed page: the method comprises the steps of monitoring whether a clicking operation of a user on a first video cover image in a feed page is triggered or not, wherein the first video cover image comprises any one of the video cover image A and the video cover image B in the feed page, and hiding the video cover image A under the condition that the clicking operation of the user on the first video cover image (such as the video cover image A) in the feed page is triggered.
S202, determining a first display position of the first video cover image in the feed page, and adjusting the playing component to the first display position.
For the first video cover image, in the embodiment of the present invention, a first display position of the first video cover image in the feed needs to be determined, so that the playing component of the player is adjusted to the first display position, which is convenient for subsequent video playing. It should be noted that, adjusting the playing component of the player to the first display position is to ensure that the peripheral boundary of the playing component of the player is aligned with the peripheral boundary of the first video cover image, so as to ensure the viewing experience of the user.
Specifically, a first diagonal vertex coordinate of the first video cover image in the feed page may be determined, so that the diagonal vertex coordinate of the playing component of the player is replaced by the first diagonal vertex coordinate, and a system (e.g., android, Linux, etc.) API (Application Programming Interface) is notified to adjust a position of the playing component of the player in the feed page based on the first diagonal vertex coordinate. The first diagonal vertex coordinate may include a first upper left corner vertex coordinate, a first lower right corner vertex coordinate, or a first lower left corner vertex coordinate, a first upper right corner vertex coordinate.
For example, the first video cover image is a video cover image a, the first upper left corner vertex coordinate and the first lower right corner vertex coordinate of the video cover image a in the feed page are determined, as shown in table 1 below, so that the upper left corner vertex coordinate of the playing component of the player is replaced by the first upper left corner vertex coordinate, the lower right corner vertex coordinate of the playing component of the player is replaced by the first lower right corner vertex coordinate, and the android API is notified to adjust the position of the playing component of the player in the feed page based on the first upper left corner vertex coordinate and the first lower right corner vertex coordinate.
First upper left corner vertex coordinate First lower right corner vertex coordinate
(XUpper left corner A,YUpper left corner A) (XLower right corner A,YLower right corner A)
TABLE 1
S203, loading the first video corresponding to the first video cover image through the playing component, and playing the first video.
As for the playing component of the player, in the embodiment of the present invention, the playing component of the player loads the first video corresponding to the first video cover image, and plays the first video. The first video is generally stored in the server, the first video corresponding to the first video cover image can be loaded from the server through the playing component of the player, specifically, the first video is loaded to the local, and then the first video is continuously played through the playing component of the player.
Therefore, through the preprocessing, the preset image containers and the playing components of the player are added into the preset sliding container in advance, the video cover images are loaded in the image containers to be displayed on the feed page, a hierarchical structure that the video cover images are displayed in the front and the playing components of the player are displayed in the back is formed, and the playing can be completed by adjusting the position of the playing components of the player in the feed page when the video (such as a first video) is played subsequently, so that the playing components of the player are prevented from being frequently created and deleted, extra performance loss is avoided, and the video playing speed is increased.
For example, the first video cover image is a video cover image a, the short video a corresponding to the video cover image a is loaded from the server through the playing component of the player, specifically, the short video a is loaded to the local, and then the short video a is continuously played through the playing component of the player, so that the playing of the short video a is completed.
The first video may be, for example, a short video, a medium video, or a long video, and the embodiment of the present invention is not limited thereto.
Through the above description of the technical solution provided by the embodiment of the present invention, a plurality of preset image containers and a playing component of a player are added to a preset sliding container in advance, a video cover image is loaded in the image containers to be displayed on a feed page, a hierarchical structure is formed in which a plurality of video cover images are displayed in front and a playing component of the player is displayed in back, a first video cover image is hidden under the condition that a preset operation trigger for the first video cover image in the feed page is monitored, wherein the first video cover image includes any one of the plurality of video cover images in the feed page, a first display position of the first video cover image in the feed page is determined, the playing component of the player is adjusted to the first display position, and a first video corresponding to the first video cover image is loaded through the playing component of the player, and playing the first video.
The playing components of the multiple preset image containers and the player are added into the preset sliding container in advance, the video cover images are loaded in the multiple image containers to be displayed on the feed page, a hierarchical structure that the multiple video cover images are displayed in the front and the playing components of the player are displayed in the rear is formed, therefore, when the video is played subsequently, the playing components of the player can be adjusted to complete playing in the feed page, frequent creation and deletion of the playing components of the player are avoided, extra performance loss is avoided, and the video playing speed is improved.
As shown in fig. 3, which is a schematic view of an implementation flow of another video playing method provided in an embodiment of the present invention, the method may specifically include the following steps;
s301, hiding the first video cover image under the condition that the preset operation trigger aiming at the first video cover image in the feed page is monitored.
In the embodiment of the present invention, this step is similar to the step S201 described above, and details of the embodiment of the present invention are not repeated herein.
S302, determining the image container corresponding to the first video cover image, and adding the playing component to the image container corresponding to the first video cover image.
For the playing component of the player, one option may be to add the playing component of the player to the image container, that is, embed the playing component of the player in the image container, and another option may be to not add the playing component of the player to the image container, that is, not embed the playing component of the player in the image container, as described in the implementation flow diagram of the video playing method shown in fig. 2. It should be noted that whether to embed the playing component of the player into the image container depends on the applied image container.
For this reason, in the embodiment of the present invention, the playing component of the player may be selectively added to the image container, that is, after the first video cover image is hidden, the image container corresponding to the first video cover image is determined, and the playing component of the player is added to the image container corresponding to the first video cover image, so that the playing component of the player may be exposed.
For example, the first video cover image is a video cover image a, after the video cover image a is hidden, an image container relatalouut (a) corresponding to the video cover image a is determined, and a playing component of the player is added to the image container relatalouut (a) corresponding to the video cover image a, so that the playing component of the player can be exposed.
S303, determining a first display position of the first video cover image in the feed page, and adjusting the playing component to the first display position.
In the embodiment of the present invention, this step is similar to the step S202, and the details of the embodiment of the present invention are not repeated herein.
S304, loading a first video corresponding to the first video cover image through the playing component, and playing the first video.
As for the playing component of the player, in the embodiment of the present invention, the playing component of the player loads the first video corresponding to the first video cover image, and plays the first video. For example, the first video cover image is a video cover image a, the short video a corresponding to the video cover image a is loaded by the playing component of the player, and the short video a is played, as shown in fig. 4.
Therefore, through the preprocessing, the preset image containers and the playing components of the player are added into the preset sliding container in advance, the video cover images are loaded in the image containers to be displayed on the feed page, a hierarchical structure that the video cover images are displayed in the front and the playing components of the player are displayed in the back is formed, and the playing can be completed by adjusting the position of the playing components of the player in the feed page when the video (such as a first video) is played subsequently, so that the playing components of the player are prevented from being frequently created and deleted, extra performance loss is avoided, and the video playing speed is increased.
As shown in fig. 5, a schematic flow chart of another implementation of a video playing method according to an embodiment of the present invention is provided, where the method specifically includes the following steps;
s501, under the condition that the preset operation trigger aiming at a second video cover image in the feed page is monitored, the first video cover image is displayed at the first display position, and the second video cover image is hidden.
For a feed page, which contains a plurality of video cover images, the feed page may present the plurality of video cover images to the user, for example, a plurality of similar video cover images, or a plurality of non-similar video cover images. In the embodiment of the invention, whether the preset operation of the user for the second video cover image in the feed page is triggered is monitored. Wherein the second video cover image comprises any one of the plurality of video cover images in the feed page except the first video cover image.
And under the condition that the preset operation trigger of the user for the second video cover image in the feed page is monitored, displaying the first video cover image at the first display position (again) and hiding the second video cover image. Here, the preset operation may be a click operation, a slide operation, and the like, which is not limited in the embodiment of the present invention. It should be noted that, when it is monitored that the preset operation of the user for the second video cover image in the feed page is triggered, a process of playing the second video corresponding to the second video cover image is triggered.
For example, a video cover image is shown in a feed page: the method comprises the steps that a video cover image A and a video cover image B are obtained, the first video cover image is the video cover image A, the second video cover image is the video cover image B, whether the clicking operation of a user on the video cover image B in a feed page is triggered or not is monitored, and under the condition that the clicking operation of the user on the video cover image B in the feed page is triggered, on one hand, the video cover image A is displayed at a first display position (re) and on the other hand, the video cover image B is hidden.
S502, determining a second display position of the second video cover image in the feed page, and adjusting the playing component to the second display position.
For the second video cover image, in the embodiment of the present invention, a second display position of the second video cover image in the feed needs to be determined, so that the playing component of the player is adjusted to the second display position, which is convenient for subsequent video playing. It should be noted that, adjusting the playing component of the player to the second display position is to ensure that the peripheral boundary of the playing component of the player is aligned with the peripheral boundary of the second video cover image, so as to ensure the viewing experience of the user.
Specifically, a second diagonal vertex coordinate of the second video cover image in the feed page may be determined, the diagonal vertex coordinate of the playing component of the player may be replaced with the second diagonal vertex coordinate, and a system (e.g., android, Linux, etc.) API may be notified to adjust a position of the playing component of the player in the feed page based on the second diagonal vertex coordinate. The second diagonal vertex coordinate comprises a second upper left corner vertex coordinate and a second lower right corner vertex coordinate, or a second lower left corner vertex coordinate and a second upper right corner vertex coordinate.
For example, the second video cover image is the video cover image a, the second top left corner vertex coordinate and the second bottom right corner vertex coordinate of the video cover image a in the feed page are determined, as shown in table 2 below, the top left corner vertex coordinate of the playing component of the player is replaced by the second top left corner vertex coordinate, the bottom right corner vertex coordinate is replaced by the second bottom right corner vertex coordinate, and the android API is notified to adjust the position of the playing component of the player in the feed page based on the second top left corner vertex coordinate and the second bottom right corner vertex coordinate.
Second upper left corner vertex coordinate Second lower right corner vertex coordinate
(XUpper left corner B,YUpper left corner B) (XLower right corner B,YLower right corner B)
TABLE 2
S503, loading a second video corresponding to the second video cover image through the playing component, and playing the second video.
As for the playing component of the player, in the embodiment of the present invention, the playing component of the player may load the second video corresponding to the second video cover image, and play the second video. The second video is generally stored in the server, the second video corresponding to the second video cover image can be loaded from the server through the playing component of the player, specifically, the second video is loaded to the local, and then the second video is continuously played through the playing component of the player.
Therefore, after the preprocessing, the preset image containers and the playing component of the player are added into the preset sliding container in advance, the video cover images are loaded in the image containers to be displayed on the feed page, a hierarchical structure that the video cover images are displayed in the front and the playing component of the player is displayed in the back is formed, and when videos are continuously played in the follow-up process (for example, the first video and the second video are continuously played), the continuous playing can be completed by adjusting the position of the playing component of the player in the feed page, the playing component of the player is prevented from being frequently created and deleted, extra performance loss is avoided, and the video playing speed is increased.
For example, the second video cover image is a video cover image B, the short video B corresponding to the video cover image B is loaded from the server through the playing component of the player, specifically, the short video B is loaded to the local, and then the short video B is continuously played through the playing component of the player, so that the playing of the short video B is completed.
It should be noted that the second video may be, for example, a short video, a medium video, or a long video, and the embodiment of the present invention is not limited thereto.
The short video playing method provided by the embodiment of the present invention is explained by taking a short video playing scene as an example: displaying video cover images in feed pages: monitoring whether a clicking operation of a user on a first video cover image in a feed page is triggered or not, wherein the first video cover image comprises any one of the video cover image A, the video cover image B, the video cover image C and the video cover image D in the feed page, and hiding the video cover image A under the condition that the clicking operation of the user on the first video cover image (such as the video cover image A) in the feed page is triggered;
determining a first upper left corner vertex coordinate and a first lower right corner vertex coordinate of the video cover image A in a feed page, so as to replace the upper left corner vertex coordinate of a playing component of a player with the first upper left corner vertex coordinate, replace the lower right corner vertex coordinate of the playing component of the player with the first lower right corner vertex coordinate, notify an android API to adjust the position of the playing component of the player in the feed page based on the first upper left corner vertex coordinate and the first lower right corner vertex coordinate, load a short video A corresponding to the video cover image A from a server through the playing component of the player, specifically load the short video A to the local, and then continue to play the short video A through the playing component of the player to complete the playing of the short video A;
monitoring whether a clicking operation of a user on a second video cover image in a feed page is triggered, wherein the second video cover image comprises any one of a video cover image B, a video cover image C and a video cover image D in the feed page, and under the condition that the clicking operation of the user on the second video cover image (such as the video cover image C) in the feed page is triggered, on one hand, displaying the video cover image A at a first display position (newly) and on the other hand, hiding the video cover image C;
determining a second upper left corner vertex coordinate and a second lower right corner vertex coordinate of the video cover image C in the feed page, replacing the upper left corner vertex coordinate of a playing component of the player with the second upper left corner vertex coordinate, replacing the lower right corner vertex coordinate with the second lower right corner vertex coordinate, informing android API to adjust the position of the playing component of the player in the feed page based on the second upper left corner vertex coordinate and the second lower right corner vertex coordinate, loading the short video C corresponding to the video cover image C from the server through the playing component of the player, specifically loading the short video C to the local, and then continuing to play the short video C through the playing component of the player to complete the playing of the short video C.
As shown in fig. 6, which is a schematic view of an implementation flow of another video playing method provided in an embodiment of the present invention, the method may specifically include the following steps;
s601, displaying the first video cover image at the first display position and hiding the second video cover image under the condition that the preset operation trigger aiming at the second video cover image in the feed page is monitored.
In the embodiment of the present invention, this step is similar to the step S501, and the details of the embodiment of the present invention are not repeated herein.
S602, determining the image container corresponding to the second video cover image, and adding the playing component to the image container corresponding to the second video cover image.
For the playing component of the player, one option may be to add the playing component of the player to the image container, that is, embed the playing component of the player in the image container, and another option may be to not add the playing component of the player to the image container, that is, not embed the playing component of the player in the image container, as described in the implementation flow diagram of the video playing method shown in fig. 5. It should be noted that whether to embed the playing component of the player into the image container depends on the applied image container.
Therefore, the embodiment of the present invention may select to add the playing component of the player to the image container, that is, after the second video cover image is hidden, determine the image container corresponding to the second video cover image, and add the playing component of the player to the image container corresponding to the second video cover image, so that the playing component of the player may be exposed.
For example, the second video cover image is the video cover image B, after the video cover image B is hidden, the image container relatalouut (B) corresponding to the video cover image B is determined, and the playing component of the player is added to the image container relatalouut (B) corresponding to the video cover image B, so that the playing component of the player can be exposed.
S603, determining a second display position of the second video cover image in the feed page, and adjusting the playing component to the second display position.
In the embodiment of the present invention, this step is similar to the step S502 described above, and the details of the embodiment of the present invention are not repeated herein.
S604, loading a second video corresponding to the second video cover image through the playing component, and playing the second video.
As for the playing component of the player, in the embodiment of the present invention, the playing component of the player may load the second video corresponding to the second video cover image, and play the second video. For example, the second video cover image is a video cover image B, the short video B corresponding to the video cover image B is loaded by the playing component of the player, and the short video B is played, as shown in fig. 7.
Therefore, after the preprocessing, the preset image containers and the playing component of the player are added into the preset sliding container in advance, the video cover images are loaded in the image containers to be displayed on the feed page, a hierarchical structure that the video cover images are displayed in the front and the playing component of the player is displayed in the back is formed, and when videos are continuously played in the follow-up process (for example, the first video and the second video are continuously played), the continuous playing can be completed by adjusting the position of the playing component of the player in the feed page, the playing component of the player is prevented from being frequently created and deleted, extra performance loss is avoided, and the video playing speed is increased.
Corresponding to the foregoing method embodiment, an embodiment of the present invention further provides a video playing apparatus, as shown in fig. 8, the apparatus may include: the image processing device comprises a preprocessing module 810, an image hiding module 820, a position adjusting module 830 and a video playing module 840.
The preprocessing module 810 is configured to pre-add a plurality of preset image containers and playing components of a player into a preset sliding container, load video cover images in the image containers to be displayed on a feed page, and form a hierarchical structure in which the plurality of video cover images are displayed in front of the playing components;
an image hiding module 820, configured to hide a first video cover image in the feed page when a preset operation trigger for the first video cover image is monitored;
wherein the first video cover image comprises any one of a plurality of the video cover images in the feed page;
a position adjusting module 830, configured to determine a first display position of the first video cover image in the feed page, and adjust the playing component to the first display position;
the video playing module 840 is configured to load the first video corresponding to the first video cover image through the playing component and play the first video.
The embodiment of the present invention further provides a server, as shown in fig. 9, including a processor 91, a communication interface 92, a memory 93 and a communication bus 94, where the processor 91, the communication interface 92, and the memory 93 complete mutual communication through the communication bus 94,
a memory 93 for storing a computer program;
the processor 91, when executing the program stored in the memory 93, implements the following steps:
adding a plurality of preset image containers and playing components of a player into a preset sliding container in advance, loading video cover images in the image containers to be displayed on feed pages, and forming a hierarchical structure in which the video cover images are displayed in front and the playing components are displayed in back; hiding a first video cover image in the feed page under the condition that the preset operation trigger for the first video cover image in the feed page is monitored; wherein the first video cover image comprises any one of a plurality of the video cover images in the feed page; determining a first display position of the first video cover image in the feed page, and adjusting the playing component to the first display position; and loading a first video corresponding to the first video cover image through the playing component, and playing the first video.
The communication bus mentioned in the above server may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the server and other devices.
The Memory may include a Random Access Memory (RAM) or a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the Integrated Circuit may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component.
In another embodiment of the present invention, a storage medium is further provided, where instructions are stored, and when the storage medium runs on a computer, the storage medium causes the computer to execute the video playing method in any one of the above embodiments.
In yet another embodiment of the present invention, there is also provided a computer program product containing instructions which, when run on a computer, cause the computer to perform the video playback method of any of the above embodiments.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored on a storage medium or transmitted from one storage medium to another, for example, from one website, computer, server, or data center to another website, computer, server, or data center via wire (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The storage medium may be any available medium that can be accessed by a computer or a data storage device including one or more available media integrated servers, data centers, and the like. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (10)

1. A video playing method is characterized in that a plurality of preset image containers and playing components of a player are added into a preset sliding container in advance, video cover images are loaded in the image containers to be displayed on feed pages, and a hierarchical structure that the video cover images are displayed in front and the playing components are displayed in back is formed, and the method comprises the following steps:
hiding a first video cover image in the feed page under the condition that the preset operation trigger for the first video cover image in the feed page is monitored;
wherein the first video cover image comprises any one of a plurality of the video cover images in the feed page;
determining a first display position of the first video cover image in the feed page, and adjusting the playing component to the first display position;
and loading a first video corresponding to the first video cover image through the playing component, and playing the first video.
2. The method of claim 1, wherein said loading video cover images in a plurality of said image containers for presentation on feed pages comprises:
and for any one image container, loading one video cover image in the image container to be displayed on a feed page.
3. The method of claim 1, wherein after the concealing the first video cover image, the method further comprises:
determining the image container corresponding to the first video cover image, and adding the playing component to the image container corresponding to the first video cover image.
4. The method of claim 1, wherein the determining a first presentation position of the first video cover image in the feed page, and adjusting the playback component to the first presentation position comprises:
determining first diagonally opposite vertex coordinates of the first video cover image in the feed page;
replacing the diagonal vertex coordinates of the playing component with the first diagonal vertex coordinates, and informing a system API (application program interface) to adjust the position of the playing component in the feed page based on the first diagonal vertex coordinates.
5. The method of claim 1, further comprising:
displaying the first video cover image at the first display position and hiding the second video cover image under the condition that the preset operation trigger aiming at the second video cover image in the feed page is monitored;
wherein the second video cover image comprises any one of the plurality of video cover images in the feed page except the first video cover image;
determining a second display position of the second video cover image in the feed page, and adjusting the playing component to the second display position;
and loading a second video corresponding to the second video cover image through the playing component, and playing the second video.
6. The method of claim 5, wherein after the concealing the second video cover image, the method further comprises:
determining the image container corresponding to the second video cover image, and adding the playing component to the image container corresponding to the second video cover image.
7. The method of claim 5, wherein determining a second presentation position of the second video cover image in the feed page, and adjusting the playback component to the second presentation position comprises:
determining second diagonally opposite vertex coordinates of the second video cover image in the feed page;
and replacing the diagonal vertex coordinates of the playing component with the second diagonal vertex coordinates, and informing a system API (application program interface) to adjust the position of the playing component in the feed page based on the second diagonal vertex coordinates.
8. A video playback apparatus, comprising:
the system comprises a preprocessing module, a display module and a display module, wherein the preprocessing module is used for pre-adding a plurality of preset image containers and play components of a player into a preset sliding container, loading video cover images in the image containers to be displayed on a feed page, and forming a hierarchical structure that the video cover images are displayed in front and the play components are displayed in back;
the image hiding module is used for hiding the first video cover image under the condition that the preset operation trigger aiming at the first video cover image in the feed page is monitored;
wherein the first video cover image comprises any one of a plurality of the video cover images in the feed page;
the position adjusting module is used for determining a first display position of the first video cover image in the feed page and adjusting the playing component to the first display position;
and the video playing module is used for loading the first video corresponding to the first video cover image through the playing component and playing the first video.
9. A server is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing the communication between the processor and the memory through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any one of claims 1 to 7 when executing a program stored in the memory.
10. A storage medium on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1 to 7.
CN202110442395.0A 2021-04-23 2021-04-23 Video playing method, device, server and storage medium Pending CN113286189A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110442395.0A CN113286189A (en) 2021-04-23 2021-04-23 Video playing method, device, server and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110442395.0A CN113286189A (en) 2021-04-23 2021-04-23 Video playing method, device, server and storage medium

Publications (1)

Publication Number Publication Date
CN113286189A true CN113286189A (en) 2021-08-20

Family

ID=77277232

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110442395.0A Pending CN113286189A (en) 2021-04-23 2021-04-23 Video playing method, device, server and storage medium

Country Status (1)

Country Link
CN (1) CN113286189A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114205675A (en) * 2021-12-06 2022-03-18 上海哔哩哔哩科技有限公司 Video preview method and device

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103905909A (en) * 2012-12-27 2014-07-02 华为技术有限公司 Video preview display method and terminal device
CN105872815A (en) * 2015-11-25 2016-08-17 乐视网信息技术(北京)股份有限公司 Video playing method and device
CN105872647A (en) * 2015-12-14 2016-08-17 乐视网信息技术(北京)股份有限公司 Video switching method and system
CN105898395A (en) * 2015-06-30 2016-08-24 乐视致新电子科技(天津)有限公司 Network video playing method, device and system
CN106507176A (en) * 2016-11-25 2017-03-15 维沃移动通信有限公司 A kind of method of video playback and mobile terminal
CN107181803A (en) * 2017-05-23 2017-09-19 百度在线网络技术(北京)有限公司 Method and apparatus for playing video
CN109640157A (en) * 2018-12-28 2019-04-16 北京字节跳动网络技术有限公司 Method and apparatus for handling information
CN110996154A (en) * 2019-12-13 2020-04-10 北京爱奇艺科技有限公司 Video playing method and device and electronic equipment
CN111954072A (en) * 2019-05-16 2020-11-17 百度在线网络技术(北京)有限公司 Multimedia playing method, device, multimedia player and medium
CN112333476A (en) * 2021-01-05 2021-02-05 智者四海(北京)技术有限公司 Video loading method and device
CN112492398A (en) * 2020-10-22 2021-03-12 北京奇艺世纪科技有限公司 Video playing method and device and electronic equipment

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103905909A (en) * 2012-12-27 2014-07-02 华为技术有限公司 Video preview display method and terminal device
CN105898395A (en) * 2015-06-30 2016-08-24 乐视致新电子科技(天津)有限公司 Network video playing method, device and system
CN105872815A (en) * 2015-11-25 2016-08-17 乐视网信息技术(北京)股份有限公司 Video playing method and device
CN105872647A (en) * 2015-12-14 2016-08-17 乐视网信息技术(北京)股份有限公司 Video switching method and system
CN106507176A (en) * 2016-11-25 2017-03-15 维沃移动通信有限公司 A kind of method of video playback and mobile terminal
CN107181803A (en) * 2017-05-23 2017-09-19 百度在线网络技术(北京)有限公司 Method and apparatus for playing video
CN109640157A (en) * 2018-12-28 2019-04-16 北京字节跳动网络技术有限公司 Method and apparatus for handling information
CN111954072A (en) * 2019-05-16 2020-11-17 百度在线网络技术(北京)有限公司 Multimedia playing method, device, multimedia player and medium
CN110996154A (en) * 2019-12-13 2020-04-10 北京爱奇艺科技有限公司 Video playing method and device and electronic equipment
CN112492398A (en) * 2020-10-22 2021-03-12 北京奇艺世纪科技有限公司 Video playing method and device and electronic equipment
CN112333476A (en) * 2021-01-05 2021-02-05 智者四海(北京)技术有限公司 Video loading method and device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114205675A (en) * 2021-12-06 2022-03-18 上海哔哩哔哩科技有限公司 Video preview method and device
WO2023103325A1 (en) * 2021-12-06 2023-06-15 上海哔哩哔哩科技有限公司 Video preview method and apparatus

Similar Documents

Publication Publication Date Title
US8990728B2 (en) Dynamic user interface for previewing live content
JP6249419B2 (en) Image identification and organization according to layout without user intervention
US20210182948A1 (en) Product browsing method and apparatus, device and storage medium
US8739070B2 (en) System, method and apparatus for providing an application carousel
CN110007829B (en) Content display method, device, terminal and storage medium
US10839140B2 (en) Page displaying method, apparatus based on H5 webpage, and computer readable storage medium
CN110070593B (en) Method, device, equipment and medium for displaying picture preview information
CN111432226A (en) Live broadcast recommendation method and device, server, terminal and storage medium
WO2019233095A1 (en) Information presenting method, and terminal device and network device thereof
WO2020038292A1 (en) Evaluation information displaying method, order creation method, supplementary purchasing method, and devices
US20170091152A1 (en) Generating grid layouts with mutable columns
CN112527434A (en) Page display method, terminal, server, system and electronic equipment
Švelch Redefining screenshots: Toward critical literacy of screen capture practices
CN113286189A (en) Video playing method, device, server and storage medium
CN109462777B (en) Video heat updating method, device, terminal and storage medium
US20170134781A1 (en) Method and apparatus for realizing custom menu, client and server
US10945025B1 (en) Device analysis for supplemental content exposure
CN108984247B (en) Information display method, terminal equipment and network equipment thereof
CN114880549B (en) Service platform, device, equipment and medium for assisting in examining media resource information
CN111641867B (en) Video output method, device, electronic equipment and storage medium
CN112734941B (en) Method and device for modifying attributes of AR (augmented reality) content, computer equipment and storage medium
CN112015514B (en) Method and device for updating material preview window of electronic whiteboard
US20230289043A1 (en) Content sharing method and apparatus, device, and storage medium
CN107621903A (en) A kind of dual touch screen equipment and its response control mehtod
US20240027770A1 (en) Head-mounted display, content loading method, and non-transitory computer readable storage medium thereof

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20210820