CN112383808A - Video playing method, device, terminal and storage medium - Google Patents
Video playing method, device, terminal and storage medium Download PDFInfo
- Publication number
- CN112383808A CN112383808A CN202011205295.8A CN202011205295A CN112383808A CN 112383808 A CN112383808 A CN 112383808A CN 202011205295 A CN202011205295 A CN 202011205295A CN 112383808 A CN112383808 A CN 112383808A
- Authority
- CN
- China
- Prior art keywords
- live broadcast
- size
- broadcast room
- window
- video
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 105
- 230000008569 process Effects 0.000 claims abstract description 41
- 230000006870 function Effects 0.000 claims description 33
- 230000003321 amplification Effects 0.000 claims description 5
- 238000003199 nucleic acid amplification method Methods 0.000 claims description 5
- 230000000694 effects Effects 0.000 abstract description 14
- 230000000007 visual effect Effects 0.000 abstract description 10
- 230000008859 change Effects 0.000 abstract description 8
- 230000002093 peripheral effect Effects 0.000 description 10
- 230000001133 acceleration Effects 0.000 description 9
- 238000012545 processing Methods 0.000 description 9
- 238000004891 communication Methods 0.000 description 6
- 230000003287 optical effect Effects 0.000 description 6
- 238000010586 diagram Methods 0.000 description 4
- 238000005516 engineering process Methods 0.000 description 3
- 230000004044 response Effects 0.000 description 3
- 238000013473 artificial intelligence Methods 0.000 description 2
- 239000000919 ceramic Substances 0.000 description 2
- 230000006835 compression Effects 0.000 description 2
- 238000007906 compression Methods 0.000 description 2
- 238000011161 development Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 230000007423 decrease Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 230000004927 fusion Effects 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000001788 irregular Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000010801 machine learning Methods 0.000 description 1
- 239000000463 material Substances 0.000 description 1
- 230000005055 memory storage Effects 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000009467 reduction Effects 0.000 description 1
- 238000009877 rendering Methods 0.000 description 1
- 230000006641 stabilisation Effects 0.000 description 1
- 238000011105 stabilization Methods 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing 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/431—Generation of visual interfaces for content selection or interaction; Content or additional data rendering
- H04N21/4312—Generation of visual interfaces for content selection or interaction; Content or additional data rendering involving specific graphical features, e.g. screen layout, special fonts or colors, blinking icons, highlights or animations
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/20—Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
- H04N21/21—Server components or server architectures
- H04N21/218—Source of audio or video content, e.g. local disk arrays
- H04N21/2187—Live feed
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Databases & Information Systems (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
The disclosure provides a video playing method, a video playing device, a video playing terminal and a storage medium, and belongs to the technical field of internet. The method comprises the following steps: acquiring a first position size of a preview window; switching the live broadcast room list page to a target live broadcast room page; gradually adjusting the position size of the playing window until reaching a second position size; and in the process of adjusting the playing window, displaying the live video of the target live broadcast room based on the adjusted playing window each time. According to the method and the device, after the page switching is carried out, the video of the live broadcast room does not need to be reloaded, and the video of the preview window on the page of the live broadcast list is displayed, so that the displayed video picture cannot be interrupted. And the position size of the playing window is adjusted, so that the video of the target live broadcast room is gradually restored to the original display form of the target live broadcast room, the display form of the video in the process is not mutated, the change process is friendly, great visual impact cannot be caused to audience users, and the video playing effect is good.
Description
Technical Field
The present disclosure relates to the field of internet technologies, and in particular, to a video playing method, apparatus, terminal, and storage medium.
Background
With the development of internet technology, various live broadcast applications have been developed. Based on the live broadcast applications, the audience users can enter the live broadcast room to watch the live broadcast of the anchor user, and the anchor user can carry out live broadcast to the audience users in the live broadcast room. In order to facilitate the audience users to view the videos of all live rooms, video links and video playing controls of a plurality of live rooms are displayed on a list page of the live rooms. The video playing control is used for playing videos of any live broadcast room, and based on the video playing control, audience users can switch the list page of the live broadcast room to the page of the live broadcast room by clicking the video playing control, so that the audience enters the live broadcast room to watch the videos.
However, when the live broadcast room list page is switched to the live broadcast room page, the video in the live broadcast room needs to be reloaded, which causes interruption of the displayed video picture, and the display form of the video on the video playing control is suddenly changed to the display form on the live broadcast room page, which causes great visual impact on the audience users, so that the video playing effect is poor.
Disclosure of Invention
The embodiment of the disclosure provides a video playing method, a video playing device, a terminal and a storage medium, which can improve the video playing effect. The technical scheme is as follows:
in a first aspect, a video playing method is provided, where the method includes:
responding to a trigger operation of a preview window on a list page of a live broadcast room, and acquiring a first position size of the preview window, wherein the preview window is used for displaying a preview video of a target live broadcast room;
switching the live broadcast room list page to a target live broadcast room page, wherein a playing window is displayed on the target live broadcast room page, and the playing window takes the first position size as an initial position size;
and gradually adjusting the position size of the playing window until reaching a second position size, and displaying the live video of the target live broadcast room based on the playing window after each adjustment in the process of adjusting the playing window.
In another embodiment of the present disclosure, the obtaining the first position size of the preview window includes:
acquiring a first position of the preview window by calling a position acquisition function;
and respectively acquiring the width and the height of the preview window by calling a width acquisition function and a height acquisition function to obtain the first size of the preview window.
In another embodiment of the present disclosure, the playing window includes a playing control for playing a live video of the target live broadcast room, and before switching the target live broadcast room list page to the target live broadcast room page, the method further includes:
and creating the playing control in the target live broadcast room page.
In another embodiment of the present disclosure, the playing window includes a playing control for playing a live video of the target live broadcast room, and before switching the target live broadcast room list page to the target live broadcast room page, the method further includes:
transmitting an entity of a preview control included in the preview window into the play window;
and determining the preview control as the playing control based on the entity of the preview control.
In another embodiment of the present disclosure, the first location dimension comprises a first location and a first dimension, and the second location comprises a second location and a second dimension;
the step-by-step adjustment of the position size of the playing window until reaching the second position size comprises:
in the process of controlling the playing window to be gradually adjusted from the first position to the second position, the size of the playing window is enlarged from the first size to the second size.
In another embodiment of the present disclosure, the enlarging the size of the play window from the first size to the second size includes:
and amplifying the size of the playing window from the first size to the second size in different amplification modes according to the position relation between the playing window and the target live broadcast room page.
In another embodiment of the present disclosure, the enlarging the size of the play window from the first size to the second size in different enlarging manners according to the position relationship between the play window and the target live broadcast room page includes:
if the distance between the playing window and the upper edge of the target live broadcast room page is smaller than a first numerical value, keeping the distance unchanged, and amplifying the size of the playing window from the first size to the second size;
if the distance between the playing window and the lower edge of the target live broadcast room page is smaller than the first numerical value, keeping the distance unchanged, and amplifying the size of the playing window from the first size to the second size;
and if the distance between the playing window and the upper edge of the target live broadcast room is larger than a second numerical value, controlling the upper edge of the playing window to expand towards the upper edge of the page of the target live broadcast room and the lower edge of the playing window to expand towards the lower edge of the page of the target live broadcast room, so that the size of the playing window is enlarged from the first size to the second size.
In another embodiment of the present disclosure, before displaying the live video of the target live broadcast room based on each adjusted play window, the method further includes:
determining the size of each frame of video according to the first size and the second size;
cutting each frame of video in the target live broadcast room according to the size of each frame of video;
the displaying of the live video of the target live broadcast room based on the playing window adjusted each time comprises:
and displaying each frame of cut video based on the adjusted playing window.
In another embodiment of the present disclosure, the method further comprises:
before the position size of the playing window is adjusted to the second position size, acquiring a live video of the target live broadcast room based on a preview control of the preview window;
and after the position size of the playing window is adjusted to the second position size, acquiring the live video of the target live broadcast room based on the playing control of the playing window.
In another embodiment of the present disclosure, before switching the live view list page to the target live view page, the method further includes:
and setting the transparency of other elements on the target live broadcast room page as transparent, wherein the other elements are elements on the target live broadcast room page except the playing window.
In another embodiment of the present disclosure, after the setting the transparency of the other elements on the target live room page to be transparent, the method further includes:
setting the execution logic of the other elements to stop executing.
In another embodiment of the present disclosure, after displaying the live video of the target live broadcast room based on each adjusted play window, the method further includes:
when the position size of the playing window is adjusted to the second position size, the transparency of the other elements is restored to the value before setting;
displaying the other elements based on the restored transparency.
In another embodiment of the present disclosure, after the displaying the other elements, the method further includes:
execution logic to execute the other elements.
In another embodiment of the present disclosure, after displaying the live video of the target live broadcast room based on each adjusted play window, the method further includes:
responding to the closing operation of the target live broadcast room page, and acquiring the second position size of the playing window;
switching the target live broadcast room page to the live broadcast room list page, wherein the preview window is displayed on the live broadcast room list page, and the preview window takes the second position size as an initial position size;
gradually adjusting the position size of the preview window until the position size reaches the first position size, and displaying the preview video of the target live broadcast room based on the preview window after each adjustment in the process of adjusting the preview window.
In a second aspect, a video playing apparatus is provided, the apparatus comprising:
the device comprises an acquisition module, a display module and a display module, wherein the acquisition module is used for responding to the triggering operation of a preview window on a live broadcast list page, and acquiring the first position size of the preview window, and the preview window is used for displaying a preview video of a target live broadcast;
the switching module is used for switching the live broadcast room list page to a target live broadcast room page, a playing window is displayed on the target live broadcast room page, and the playing window takes the first position size as an initial position size;
the adjusting module is used for gradually adjusting the position size of the playing window until the position size reaches a second position size;
and the display module is used for displaying the live video of the target live broadcast room based on the adjusted play window in the process of adjusting the play window.
In another embodiment of the present disclosure, the obtaining module is configured to obtain the first position of the preview window by calling a position obtaining function; and respectively acquiring the width and the height of the preview window by calling a width acquisition function and a height acquisition function to obtain the first size of the preview window.
In another embodiment of the present disclosure, the playback window includes a playback control for playing a live video of the target live broadcast room, and the apparatus further includes:
and the creating module is used for creating the playing control in the target live broadcast room page.
In another embodiment of the present disclosure, the obtaining module is further configured to create the play control in the target live broadcast room page.
In another embodiment of the present disclosure, the playback window includes a playback control for playing a live video of the target live broadcast room, and the apparatus further includes:
the transmitting module is used for transmitting the entity of the preview control included in the preview window into the playing window;
and the determining module is used for determining the preview control as the playing control based on the entity of the preview control.
In another embodiment of the present disclosure, the first location dimension comprises a first location and a first dimension, and the second location comprises a second location and a second dimension;
the adjusting module is configured to enlarge the size of the play window from the first size to the second size in a process of controlling the play window to be gradually adjusted from the first position to the second position.
In another embodiment of the present disclosure, the adjusting module is configured to, according to a position relationship between the play window and the target live broadcast room page, adopt different amplification manners to amplify the size of the play window from the first size to the second size.
In another embodiment of the present disclosure, the adjusting module is configured to, if a distance between the playing window and an upper edge of the target live broadcast room page is smaller than a first numerical value, keep the distance unchanged, and enlarge the size of the playing window from the first size to the second size; if the distance between the playing window and the lower edge of the target live broadcast room page is smaller than the first numerical value, keeping the distance unchanged, and amplifying the size of the playing window from the first size to the second size; and if the distance between the playing window and the upper edge of the target live broadcast room is larger than a second numerical value, controlling the upper edge of the playing window to expand towards the upper edge of the page of the target live broadcast room and the lower edge of the playing window to expand towards the lower edge of the page of the target live broadcast room, so that the size of the playing window is enlarged from the first size to the second size.
In another embodiment of the present disclosure, the apparatus further comprises:
the determining module is used for determining the size of each frame of video according to the first size and the second size;
the cutting module is used for cutting each frame of video in the target live broadcast room according to the size of each frame of video;
and the display module is used for displaying each frame of cut video based on the adjusted playing window.
In another embodiment of the present disclosure, the obtaining module is further configured to obtain a live video of the target live broadcast room based on a preview control of the preview window before the position size of the play window is adjusted to the second position size; and after the position size of the playing window is adjusted to the second position size, acquiring the live video of the target live broadcast room based on the playing control of the playing window.
In another embodiment of the present disclosure, the apparatus further comprises:
and the setting module is used for setting the transparency of other elements on the target live broadcast room page to be transparent, wherein the other elements are elements on the target live broadcast room page except the playing window.
In another embodiment of the present disclosure, the setting module is further configured to set the execution logic of the other element to stop executing.
In another embodiment of the present disclosure, the apparatus further comprises:
the restoring module is used for restoring the transparency of the other elements to a value before setting when the position size of the playing window is adjusted to the second position size;
the display module is further configured to display the other elements based on the restored transparency.
In another embodiment of the present disclosure, the apparatus further comprises:
and the execution module is used for executing the execution logic of the other elements.
In another embodiment of the present disclosure, the obtaining module is further configured to obtain the second position size of the play window in response to a closing operation on the target live broadcast room page;
the switching module is further configured to switch the target live broadcast room page to the live broadcast room list page, where the preview window is displayed on the live broadcast room list page, and the preview window takes the second position size as an initial position size;
the adjusting module is further used for gradually adjusting the position size of the preview window until the position size reaches the first position size;
and the display module is also used for displaying the preview video of the target live broadcast room based on the preview window after each adjustment in the process of adjusting the preview window.
In a third aspect, a terminal is provided, where the terminal includes a processor and a memory, and the memory stores at least one program code, and the at least one program code is loaded and executed by the processor to implement the video playing method according to the first aspect.
In a fourth aspect, a computer-readable storage medium is provided, in which at least one program code is stored, and the at least one program code is loaded and executed by a processor to implement the video playing method according to the first aspect.
The technical scheme provided by the embodiment of the disclosure has the following beneficial effects:
after the page switching is carried out, the video of the live broadcast room does not need to be reloaded, and the video of the preview window on the page of the live broadcast list is displayed, so that the displayed video picture is not interrupted. And the position size of the playing window is adjusted, so that the video of the target live broadcast room is gradually restored to the original display form of the target live broadcast room, the display form of the video in the process is not mutated, the change process is friendly, great visual impact cannot be caused to audience users, and the video playing effect is good.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present disclosure, and it is obvious for those skilled in the art to obtain other drawings based on the drawings without creative efforts.
Fig. 1 is a schematic diagram of an implementation environment related to a video playing method provided by an embodiment of the present disclosure;
fig. 2 is a flowchart of a video playing method provided by an embodiment of the present disclosure;
fig. 3 is a flowchart of another video playing method provided by the embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of a video playing apparatus provided in an embodiment of the present disclosure;
fig. 5 shows a block diagram of a terminal according to an exemplary embodiment of the present disclosure.
Detailed Description
To make the objects, technical solutions and advantages of the present disclosure more apparent, embodiments of the present disclosure will be described in detail with reference to the accompanying drawings.
It is to be understood that the terms "each," "a plurality," and "any" and the like, as used in the embodiments of the present disclosure, are intended to encompass two or more, each referring to each of the corresponding plurality, and any referring to any one of the corresponding plurality. For example, the plurality of words includes 10 words, and each word refers to each of the 10 words, and any word refers to any one of the 10 words.
Referring to fig. 1, an implementation environment related to a video playing method provided by an embodiment of the present disclosure is shown, and referring to fig. 1, the implementation environment includes: a terminal 101 and a server 102.
Wherein, at least one live application is installed in the terminal 101. Based on the installed live application, the audience user can enter the live room to watch the live broadcast of the live broadcast user. The terminal 101 may be a smart phone, a tablet computer, a notebook computer, etc., and the product type of the terminal 101 is not specifically limited in the embodiments of the present disclosure.
The terminal 101 and the server 102 may be directly or indirectly connected through a wired network or a wireless network.
Based on the implementation environment shown in fig. 1, an embodiment of the present disclosure provides a video playing method, and referring to fig. 2, a flow of the method provided by the embodiment of the present disclosure includes:
201. and responding to a trigger operation of a preview window on the inter-broadcast list page, and acquiring a first position size of the preview window.
The preview window is used for displaying a preview video of the target live broadcast room.
202. And switching the live broadcast room list page to a target live broadcast room page.
And a playing window is displayed on the page of the target live broadcast room, and the playing window takes the first position size as the initial position size.
203. And gradually adjusting the position size of the playing window until reaching the second position size.
204. And in the process of adjusting the playing window, displaying the live video of the target live broadcast room based on the adjusted playing window each time.
According to the method provided by the embodiment of the disclosure, after the page switching is performed, the video of the live broadcast room does not need to be reloaded, and the video of the preview window on the page of the live broadcast list is displayed, so that the displayed video picture is not interrupted. And the position size of the playing window is adjusted, so that the video of the target live broadcast room is gradually restored to the original display form of the target live broadcast room, the display form of the video in the process is not mutated, the change process is friendly, great visual impact cannot be caused to audience users, and the video playing effect is good.
In another embodiment of the present disclosure, obtaining the first position size of the preview window includes:
acquiring a first position of a preview window by calling a position acquisition function;
and respectively acquiring the width and the height of the preview window by calling a width acquisition function and a height acquisition function to obtain the first size of the preview window.
In another embodiment of the present disclosure, the playing window includes a playing control for playing a live video of the target live broadcast room, and before switching the target live broadcast room list page to the target live broadcast room page, the method further includes:
and creating a playing control in the target live broadcast room page.
In another embodiment of the present disclosure, the playing window includes a playing control for playing a live video of the target live broadcast room, and before switching the target live broadcast room list page to the target live broadcast room page, the method further includes:
transmitting an entity of a preview control included in the preview window into the play window;
and determining the preview control as the playing control based on the entity of the preview control.
In another embodiment of the present disclosure, the first location dimension comprises a first location and a first dimension, and the second location comprises a second location and a second dimension;
gradually adjusting the position size of the playing window until reaching a second position size, comprising:
and in the process of controlling the playing window to be gradually adjusted from the first position to the second position, the size of the playing window is enlarged from the first size to the second size.
In another embodiment of the present disclosure, enlarging the size of the play window from the first size to the second size includes:
and amplifying the size of the playing window from the first size to the second size in different amplification modes according to the position relation between the playing window and the page of the target live broadcast room.
In another embodiment of the present disclosure, amplifying the size of the play window from the first size to the second size in different amplification manners according to the position relationship between the play window and the target live broadcast room page, including:
if the distance between the playing window and the upper edge of the target live broadcast room page is smaller than a first numerical value, keeping the distance unchanged, and amplifying the size of the playing window from a first size to a second size;
if the distance between the playing window and the lower edge of the target live broadcast room page is smaller than a first numerical value, keeping the distance unchanged, and amplifying the size of the playing window from a first size to a second size;
and if the distance between the playing window and the upper edge of the target live broadcast room is larger than a second numerical value, controlling the upper edge of the playing window to expand towards the upper edge of the page of the target live broadcast room and the lower edge of the playing window to expand towards the lower edge of the page of the target live broadcast room, so that the size of the playing window is enlarged from the first size to the second size.
In another embodiment of the present disclosure, before displaying the live video of the target live broadcast room based on each adjusted play window, the method further includes:
determining the size of each frame of video according to the first size and the second size;
cutting each frame of video in the target live broadcast room according to the size of each frame of video;
based on the play window after each adjustment, the live broadcast video of the target live broadcast room is displayed, and the method comprises the following steps:
and displaying each frame of cut video based on the adjusted playing window.
In another embodiment of the present disclosure, the method further comprises:
before the position size of the playing window is adjusted to the second position size, acquiring a live video of a target live broadcast room based on a preview control of a preview window;
and after the position size of the playing window is adjusted to the second position size, acquiring the live video of the target live broadcast room based on the playing control of the playing window.
In another embodiment of the present disclosure, before switching the live view list page to the target live view page, the method further includes:
and setting the transparency of other elements on the target live broadcast room page as transparent, wherein the other elements are elements on the target live broadcast room page except the playing window.
In another embodiment of the present disclosure, after setting the transparency of the other elements on the target live room page to be transparent, the method further includes:
the execution logic of the other elements is set to stop executing.
In another embodiment of the present disclosure, after displaying the live video of the target live broadcast room based on each adjusted play window, the method further includes:
when the position size of the playing window is adjusted to the second position size, the transparency of other elements is restored to the value before setting;
based on the restored transparency, other elements are displayed.
In another embodiment of the present disclosure, after displaying the other elements, the method further includes:
execution logic to execute the other elements.
In another embodiment of the present disclosure, after displaying the live video of the target live broadcast room based on each adjusted play window, the method further includes:
responding to the closing operation of the target live broadcast room page, and acquiring a second position size of the playing window;
switching a target live broadcast room page to a live broadcast room list page, wherein a preview window is displayed on the live broadcast room list page, and the preview window takes the second position size as the initial position size;
and gradually adjusting the position size of the preview window until the position size reaches the first position size, and displaying the preview video of the target live broadcast room based on the preview window after each adjustment in the process of adjusting the preview window.
All the above optional technical solutions may be combined arbitrarily to form the optional embodiments of the present disclosure, and are not described herein again.
Based on the implementation environment shown in fig. 1, an embodiment of the present disclosure provides a video playing method, taking a terminal to execute the embodiment of the present disclosure as an example, referring to fig. 3, a flow of the method provided by the embodiment of the present disclosure includes:
301. and the terminal displays a live broadcast room list page.
The live broadcast room list page is a page provided by a live broadcast application and used for bearing video links and preview windows of a plurality of live broadcast rooms. The video link of the live broadcast room is used as an entrance for entering the live broadcast room, and the video link of the live broadcast room is clicked to enter the corresponding live broadcast room to watch the video of the anchor user. And the preview window is used for displaying a preview video of a target live broadcast room on the live broadcast list page. The preview window includes a preview control, and the like. The preview control is a control with a specific function provided by the live broadcast application, and the preview control can pull video data of a target live broadcast room from the server according to the address of the target live broadcast room, analyze the obtained video data and further play the video. The address of the target live broadcast room can be the address of any live broadcast room on the live broadcast room list page, and can also be the address of the live broadcast room recommended by the server. The number of the target live broadcast rooms is at least one, and the videos of the at least one target live broadcast room are played by the preview control according to a certain sequence. Considering that the viewer user may view the video links of each live broadcast room through the up-down sliding operation on the live broadcast room list page, in order to enable the viewer user to view the video played by the preview control in real time, the position of the preview control is not fixed, but moves along with the up-down sliding operation of the viewer user.
302. And responding to the trigger operation of the preview window on the inter-broadcast list page, and acquiring the first position size of the preview window by the terminal.
The first position size is used for representing the size and the position of the preview control, the first position size comprises a first position and a first size, the first position refers to the real-time position of the preview control relative to the terminal screen, and the first size refers to the width and the height of the preview control. The trigger operation includes one of a single-click operation, a double-click operation, a slide operation, and the like. In the display process of the live broadcast list page, when the triggering operation of the preview control on the live broadcast list page is detected, the terminal responds to the triggering operation of the preview control, and the terminal acquires the first position size of the preview control. Specifically, the terminal can call a position obtaining function, a width obtaining function, a height obtaining function and the like, can obtain a first position of the preview control by calling the position obtaining function, can obtain the width of the preview control by calling the width obtaining function, can obtain the height of the preview control by calling the height obtaining function, and further can obtain a first size of the preview control based on the obtained width and height of the preview control. The operating systems are different, and the adopted position acquisition function, the width function and the height function are different. Taking an android operating system as an example, the position obtaining function may be a view.
303. And the terminal switches the live broadcast room list page to a target live broadcast room page.
And after the first position size of the preview control is obtained, responding to the triggering operation of the preview control, and switching the live broadcast room list page to a target live broadcast room page by the terminal. And a playing window is displayed on the page of the target live broadcast room, and the playing window comprises a playing control part and the like for playing the live broadcast video of the target live broadcast room. The terminal displays the playing window on the target live broadcast room page by taking the first position size as the starting position size, namely the terminal displays the playing window by taking the first position as the starting position and the first size as the starting size, and dynamically adjusts the playing window by taking the first position size as the starting position size until the size of the playing window reaches the second position size. By adopting the method, when the list page of the live broadcast room is switched to the page of the target live broadcast room, the display form of the video of the target live broadcast room can not be obviously changed, visual impact can not be brought to audience users, and the playing mode is friendly.
In another embodiment of the present disclosure, the terminal acquires the play control in different ways based on different operating systems. For an android operating system, the terminal can create the playing control in a target live broadcast room page, so that when the target live broadcast room page is switched to the target live broadcast room page, the terminal can play a live broadcast video of the target live broadcast room based on the created playing control. The creation timing of the play control can be pre-created for live application development or update, or can be created in real time when the trigger operation of a preview window on a list page of a live broadcast room is detected, and the creation timing of the play control is not limited in the embodiment of the disclosure.
For an IOS operating system, when a terminal detects trigger operation on a preview window on a live broadcast room list page, an entity of a preview control included in the preview window is transmitted into a play window, when the live broadcast room list page is switched to a target live broadcast room page, the terminal initializes the play control of the target live broadcast room and detects whether the play control is successfully transmitted into the entity of the preview control, if the entity of the preview control is successfully transmitted into the entity of the preview control, the preview control is determined to be the play control, namely, a new play control does not need to be created again, live broadcast video of the target live broadcast room is directly played by adopting the preview control, and if the entity of the preview control is not successfully transmitted into the entity of the preview control, the terminal recreates the play control in order to play the live broadcast video of the target. By adopting the mode, the problem of stream pulling connection existing when the controls on the two pages are adopted for stream pulling is avoided, and seamless video playing between different pages is really realized.
In another embodiment of the present disclosure, in order to implement the continuity of inter-page switching and avoid great visual impact on audience users caused by sudden change of the page display form when the live broadcast room list page is switched to the target live broadcast room page, in the embodiment of the present disclosure, before the live broadcast room list page is switched to the target live broadcast room page, the transparency of other elements on the target live broadcast room page is set to be transparent. And the other elements are elements on the target live broadcast room page except the playing window, and are used for creating the view of the target live broadcast room. When the transparency of other elements on the target live broadcast room page is set to be transparent, the terminal does not display other elements after the live broadcast room list page is switched to the target live broadcast room page.
In another embodiment of the present disclosure, after transparency of other elements on the target live room page is set to transparent, the different operating systems are different for the creation logic of the view. For an android operating system, a terminal intercepts the creation of a view in a target live broadcast room, and sets execution logic of other elements to stop execution, so that system resources are saved. For the IOS operating system, the terminal cannot intercept the creation of the view in the target room, and because the transparency of other elements is set to be transparent, even if the view in the target live broadcast room is created, the created view is invisible to the user, but the interference to the original service in the target live broadcast room is avoided by adopting the mode, and the risk that the service is interfered is reduced.
304. And the terminal gradually adjusts the position size of the playing window until reaching the second position size.
And the terminal gradually adjusts the position size of the playing window by taking the first position size as the initial position size until the position size of the playing window is adjusted to the second position size. The second position size is the end position size of the playing window, the second position size comprises a second position and a second size, the second position is the end position of the playing window, and the second position in the second position size can be located at any position of the terminal screen; the second size refers to the final size of the playing window, and the second size in the second position size may be any size.
When the position size of the playing window is adjusted step by step, the terminal controls the playing window to be adjusted from the first position to the second position, and the size of the playing window is enlarged from the first size to the second size in the process that the playing window is adjusted step by step from the first position to the second position. For the android operating system, when the terminal controls the play window to move from the first position to the second position, the animation method viewpropertylanimator provided by the android system can be adopted to implement.
In another embodiment of the disclosure, when the terminal enlarges the size of the play window from the first size to the second size, the size of the play window can be enlarged from the first size to the second size in different enlargement manners according to the position relationship between the play window and the target live broadcast room page.
In the first mode, if the distance between the playing window and the upper edge of the target live broadcast room page is smaller than a first numerical value, the terminal keeps the distance unchanged, and the size of the playing window is enlarged from the first size to a second size. Wherein the first value may be 5 cm, 6 cm, etc. By adopting the first mode, the effect that the playing window is gradually enlarged from the upper edge to the lower edge of the target live broadcast room page can be presented.
In the second mode, if the distance between the playing window and the lower edge of the target live broadcast room page is smaller than the first numerical value, the terminal keeps the distance unchanged, and the size of the playing window is enlarged from the first size to the second size. By adopting the second mode, the effect that the playing window is gradually enlarged from the lower edge to the upper edge of the target live broadcast room page can be presented.
And in the third mode, if the distance between the playing window and the upper edge of the target live broadcast room is larger than the second numerical value, the terminal controls the upper edge of the playing window to expand towards the upper edge of the page of the target live broadcast room and controls the lower edge of the playing window to expand towards the lower edge of the page of the target live broadcast room, so that the size of the playing window is enlarged from the first size to the second size. By adopting the third mode, the effect that the playing window is gradually enlarged from the middle area of the target live broadcast room page to the upper edge and the lower edge can be presented.
Of course, there are other ways that will not be described here.
305. In the process of adjusting the playing window, the terminal displays the live video of the target live broadcast room based on the adjusted playing window each time.
Furthermore, in the process of adjusting the position and the size of the playing window, the video of the target live broadcast room is always in a display state, in order to enable the displayed video of the target live broadcast room to be matched with the size of the playing window, the situation that partial live broadcast video content cannot be displayed due to the fact that the video size of the target live broadcast room is too large is avoided, or the size of the target live broadcast room is too small, the watching experience of audience users is affected due to the fact that the playing window is in a blank area, the terminal needs to cut the live broadcast video of the target live broadcast room to be played, and the size of the cut video of the target live broadcast room is matched with the size of the playing window. Specifically, the terminal obtains the moving time of a playing window, determines the video playing frame number of a target live broadcast room based on the moving time, further determines the size of each frame of video according to the first size and the second size, then cuts each frame of video of the target live broadcast room according to the size of each frame of video, and displays the live broadcast video of the target live broadcast room based on the playing window adjusted each time in the process of adjusting the playing window.
In another embodiment of the present disclosure, after the position size of the playing window is adjusted to the second position size, the position size of the playing window is not changed any more, and in order to improve the experience of the audience user watching the video in the target live broadcast room, the terminal will also restore the original display form of the page in the target live broadcast room. Specifically, the terminal may restore the transparency of the other elements to the value before the setting, and further display the other elements based on the restored transparency.
For the android operating system, after the transparency of other elements is restored, the terminal also executes execution logic of the other elements, so that the displayed target live broadcast room page is the same as the original form, and the audience user can execute other operations on the target live broadcast room page, such as operations of approving, paying attention, giving away virtual goods, giving comments and the like.
Therefore, the live broadcast video of the target live broadcast room is displayed when the live broadcast room list page is switched to the target live broadcast room page. Specifically, the following method can be adopted:
the method comprises the steps that firstly, if an audience user wants to quit a target live broadcast room, the audience user can click a closing option on a page of the target live broadcast room, when closing operation of the closing option is detected, the closing operation of the page of the target live broadcast room is responded, a terminal obtains a second position size of a playing window, then the page of the target live broadcast room is switched to a list page of the live broadcast room, a preview window is displayed on the list page of the live broadcast room, the preview window is dynamically zoomed by taking the second position size as an initial position size, and live broadcast video of the target live broadcast room is displayed in real time in the zooming process. When the second position size of the playing window is obtained, the terminal can call the position obtaining function, obtain the second position of the playing window, call the width obtaining function, obtain the width of the playing window, call the height obtaining function, obtain the height of the playing window, and further obtain the second size of the playing window based on the obtained width and height of the playing window.
And secondly, in the process of displaying the list page of the live broadcast room, the terminal dynamically adjusts the position size of the preview control by taking the second position size as the initial position size until the position size of the preview control is adjusted to the first position size. Specifically, the terminal takes the second position as a starting position, and controls the preview control to be gradually adjusted from the second position to the first position. And in the process that the preview control is gradually adjusted from the second position to the first position, reducing the size of the preview control, so that the size of the preview control is reduced from the second size to the first size. In the process, the terminal cuts the video of the target live broadcast room according to the first position size and the second position size, so that each cut frame of video is matched with the size of the preview window, and the condition that the size of each frame of video is too large to be displayed normally or a blank area exists in the preview window when the size of each frame of video is too small to influence the watching experience of audience users is avoided.
It should be noted that, when the target live view list page is switched to the live view list page, other elements on the live view list page are normally displayed, and execution logic of the other elements is also normally executed. By adopting the setting mode, when the target live broadcast room page is switched to the live broadcast room list page, the audience user can timely view live broadcast videos of other live broadcast rooms on the live broadcast room list page without waiting for the preview window to recover to the first position size, so that the waiting time of the audience user is shortened, and the experience effect of the audience user is improved.
In another embodiment of the disclosure, in the process of switching the live broadcast room list page to the target live broadcast room page, in order to prevent the playing control on the target live broadcast room page from acquiring the video of the target live broadcast room from the server again, which causes interruption of the displayed video frame of the target live broadcast room, and further affects the user experience, the previewing control and the playing control in the embodiment of the disclosure can share the video of the target live broadcast room. When the target live broadcast room list page is switched to the target live broadcast room page, before the position size of the playing window is adjusted to the second position size, the terminal acquires a video of the target live broadcast room based on a preview control of a preview window; and after the position size of the playing window is adjusted to the second position size, the terminal acquires the live video of the target live broadcast room based on the playing control of the playing window. When a target live broadcast room page is switched to a live broadcast room list page, before the position size of a preview window is adjusted to be a first position size, a terminal acquires a video of the target live broadcast room based on a play control of a play window; after the position size of the preview window is adjusted to the first position size, the terminal obtains the video of the target live broadcast room based on the play control of the preview window. By sharing data between the preview control and the play control, the terminal does not need to obtain the video of the target live broadcast room from the server again when the pages are switched, so that the displayed video picture of the target live broadcast room is not interrupted, and the video play effect is greatly improved.
According to the method provided by the embodiment of the disclosure, after the page switching is performed, the video of the live broadcast room does not need to be reloaded, and the video of the preview window on the page of the live broadcast list is displayed, so that the displayed video picture is not interrupted. And the position size of the playing window is adjusted, so that the video of the target live broadcast room is gradually restored to the original display form of the target live broadcast room, the display form of the video in the process is not mutated, the change process is friendly, great visual impact cannot be caused to audience users, and the video playing effect is good.
Referring to fig. 4, an embodiment of the present disclosure provides a video playing apparatus, including:
an obtaining module 401, configured to obtain a first position size of a preview window in response to a trigger operation on the preview window on a live broadcast list page, where the preview window is used to display a preview video of a target live broadcast;
a switching module 402, configured to switch a live broadcast room list page to a target live broadcast room page, where a play window is displayed on the target live broadcast room page, and the play window takes a first position size as an initial position size;
an adjusting module 403, configured to gradually adjust the position size of the playing window until reaching the second position size;
and a display module 404, configured to display a live video of the target live broadcast room based on the adjusted play window each time in the process of adjusting the play window.
In another embodiment of the present disclosure, the obtaining module is configured to obtain a first position of the preview window by calling a position obtaining function; and respectively acquiring the width and the height of the preview window by calling a width acquisition function and a height acquisition function to obtain the first size of the preview window.
In another embodiment of the present disclosure, the playback window includes a playback control for playing a live video of the target live broadcast room, and the apparatus further includes:
and the creating module is used for creating a playing control in the target live broadcast room page.
In another embodiment of the present disclosure, the playback window includes a playback control for playing a live video of the target live broadcast room, and the apparatus further includes:
the input module is used for inputting the entity of the preview control included in the preview window into the play window;
and the determining module is used for determining the preview control as the playing control based on the entity of the preview control.
In another embodiment of the present disclosure, the first location dimension comprises a first location and a first dimension, and the second location comprises a second location and a second dimension;
and the adjusting module is used for amplifying the size of the playing window from the first size to the second size in the process of controlling the playing window to be gradually adjusted from the first position to the second position.
In another embodiment of the present disclosure, the adjusting module is configured to, according to a position relationship between the play window and the target live broadcast room page, adopt different enlarging manners to enlarge the size of the play window from the first size to the second size.
In another embodiment of the present disclosure, the adjusting module is configured to, if a distance between the playing window and an upper edge of the target live broadcast room page is smaller than a first numerical value, keep the distance unchanged, and enlarge the size of the playing window from a first size to a second size; if the distance between the playing window and the lower edge of the target live broadcast room page is smaller than a first numerical value, keeping the distance unchanged, and amplifying the size of the playing window from a first size to a second size; and if the distance between the playing window and the upper edge of the target live broadcast room is larger than a second numerical value, controlling the upper edge of the playing window to expand towards the upper edge of the page of the target live broadcast room and the lower edge of the playing window to expand towards the lower edge of the page of the target live broadcast room, so that the size of the playing window is enlarged from the first size to the second size.
In another embodiment of the present disclosure, the apparatus further comprises:
the determining module is used for determining the size of each frame of video according to the first size and the second size;
the cutting module is used for cutting each frame of video in the target live broadcast room according to the size of each frame of video;
and the display module is used for displaying each frame of cut video based on the adjusted playing window.
In another embodiment of the present disclosure, the obtaining module is further configured to obtain a live video of the target live broadcast room based on a preview control of the preview window before the position size of the play window is adjusted to the second position size; and after the position size of the playing window is adjusted to the second position size, acquiring the live video of the target live broadcast room based on the playing control of the playing window.
In another embodiment of the present disclosure, the apparatus further comprises:
and the setting module is used for setting the transparency of other elements on the target live broadcast room page to be transparent, and the other elements are elements except the playing window on the target live broadcast room page.
In another embodiment of the disclosure, the setting module is further configured to set the execution logic of the other element to stop executing.
In another embodiment of the present disclosure, the apparatus further comprises:
the restoring module is used for restoring the transparency of other elements to the value before setting when the position size of the playing window is adjusted to the second position size;
and the display module is also used for displaying other elements based on the recovered transparency.
In another embodiment of the present disclosure, the apparatus further comprises:
and the execution module is used for executing the execution logic of other elements.
In another embodiment of the present disclosure, the obtaining module is further configured to obtain a second position size of the play window in response to a closing operation on the target live broadcast room page;
the switching module is also used for switching the target live broadcast room page to a live broadcast room list page, a preview window is displayed on the live broadcast room list page, and the preview window takes the second position size as the initial position size;
the adjusting module is further used for gradually adjusting the position size of the preview window until the position size reaches a first position size;
and the display module is also used for displaying the preview video of the target live broadcast room based on the preview window after each adjustment in the process of adjusting the preview window.
In summary, the apparatus provided in the embodiment of the present disclosure does not need to reload the video in the live broadcast room after switching the pages, and displays the video based on the video in the preview window on the live broadcast list page, so that the displayed video frame is not interrupted. And the position size of the playing window is adjusted, so that the video of the target live broadcast room is gradually restored to the original display form of the target live broadcast room, the display form of the video in the process is not mutated, the change process is friendly, great visual impact cannot be caused to audience users, and the video playing effect is good.
Fig. 5 shows a block diagram of a terminal 500 according to an exemplary embodiment of the present disclosure. The terminal 500 may be: a smart phone, a tablet computer, an MP3 player (Moving Picture Experts Group Audio Layer III, motion video Experts compression standard Audio Layer 3), an MP4 player (Moving Picture Experts Group Audio Layer IV, motion video Experts compression standard Audio Layer 4), a notebook computer, or a desktop computer. Terminal 500 may also be referred to by other names such as user equipment, portable terminal, laptop terminal, desktop terminal, and the like.
In general, the terminal 500 includes: a processor 501 and a memory 502.
The processor 501 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and so on. The processor 501 may be implemented in at least one hardware form of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), and a PLA (Programmable Logic Array). The processor 501 may also include a main processor and a coprocessor, where the main processor is a processor for Processing data in an awake state, and is also called a Central Processing Unit (CPU); a coprocessor is a low power processor for processing data in a standby state. In some embodiments, the processor 501 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content required to be displayed by the display screen. In some embodiments, processor 501 may also include an AI (Artificial Intelligence) processor for processing computational operations related to machine learning.
In some embodiments, the terminal 500 may further optionally include: a peripheral interface 503 and at least one peripheral. The processor 501, memory 502 and peripheral interface 503 may be connected by a bus or signal lines. Each peripheral may be connected to the peripheral interface 503 by a bus, signal line, or circuit board. Specifically, the peripheral device includes: at least one of radio frequency circuitry 504, display screen 505, camera assembly 506, audio circuitry 507, positioning assembly 508, and power supply 509.
The peripheral interface 503 may be used to connect at least one peripheral related to I/O (Input/Output) to the processor 501 and the memory 502. In some embodiments, the processor 501, memory 502, and peripheral interface 503 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 501, the memory 502, and the peripheral interface 503 may be implemented on a separate chip or circuit board, which is not limited in this embodiment.
The Radio Frequency circuit 504 is used for receiving and transmitting RF (Radio Frequency) signals, also called electromagnetic signals. The radio frequency circuitry 504 communicates with communication networks and other communication devices via electromagnetic signals. The rf circuit 504 converts an electrical signal into an electromagnetic signal to transmit, or converts a received electromagnetic signal into an electrical signal. Optionally, the radio frequency circuit 504 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a subscriber identity module card, and so forth. The radio frequency circuitry 504 may communicate with other terminals via at least one wireless communication protocol. The wireless communication protocols include, but are not limited to: metropolitan area networks, various generation mobile communication networks (2G, 3G, 4G, and 5G), Wireless local area networks, and/or WiFi (Wireless Fidelity) networks. In some embodiments, the rf circuit 504 may further include NFC (Near Field Communication) related circuits, which are not limited in this application.
The display screen 505 is used to display a UI (User Interface). The UI may include graphics, text, icons, video, and any combination thereof. When the display screen 505 is a touch display screen, the display screen 505 also has the ability to capture touch signals on or over the surface of the display screen 505. The touch signal may be input to the processor 501 as a control signal for processing. At this point, the display screen 505 may also be used to provide virtual buttons and/or a virtual keyboard, also referred to as soft buttons and/or a soft keyboard. In some embodiments, the display screen 505 may be one, providing the front panel of the terminal 500; in other embodiments, the display screens 505 may be at least two, respectively disposed on different surfaces of the terminal 500 or in a folded design; in other embodiments, the display 505 may be a flexible display disposed on a curved surface or a folded surface of the terminal 500. Even more, the display screen 505 can be arranged in a non-rectangular irregular figure, i.e. a shaped screen. The Display screen 505 may be made of LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode), and other materials.
The camera assembly 506 is used to capture images or video. Optionally, camera assembly 506 includes a front camera and a rear camera. Generally, a front camera is disposed at a front panel of the terminal, and a rear camera is disposed at a rear surface of the terminal. In some embodiments, the number of the rear cameras is at least two, and each rear camera is any one of a main camera, a depth-of-field camera, a wide-angle camera and a telephoto camera, so that the main camera and the depth-of-field camera are fused to realize a background blurring function, and the main camera and the wide-angle camera are fused to realize panoramic shooting and VR (Virtual Reality) shooting functions or other fusion shooting functions. In some embodiments, camera assembly 506 may also include a flash. The flash lamp can be a monochrome temperature flash lamp or a bicolor temperature flash lamp. The double-color-temperature flash lamp is a combination of a warm-light flash lamp and a cold-light flash lamp, and can be used for light compensation at different color temperatures.
The positioning component 508 is used for positioning the current geographic Location of the terminal 500 for navigation or LBS (Location Based Service). The Positioning component 508 may be a Positioning component based on the united states GPS (Global Positioning System), the chinese beidou System, the russian graves System, or the european union's galileo System.
In some embodiments, terminal 500 also includes one or more sensors 510. The one or more sensors 510 include, but are not limited to: acceleration sensor 511, gyro sensor 512, pressure sensor 513, fingerprint sensor 514, optical sensor 515, and proximity sensor 516.
The acceleration sensor 511 may detect the magnitude of acceleration on three coordinate axes of the coordinate system established with the terminal 500. For example, the acceleration sensor 511 may be used to detect components of the gravitational acceleration in three coordinate axes. The processor 501 may control the display screen 505 to display the user interface in a landscape view or a portrait view according to the gravitational acceleration signal collected by the acceleration sensor 511. The acceleration sensor 511 may also be used for acquisition of motion data of a game or a user.
The gyro sensor 512 may detect a body direction and a rotation angle of the terminal 500, and the gyro sensor 512 may cooperate with the acceleration sensor 511 to acquire a 3D motion of the user on the terminal 500. The processor 501 may implement the following functions according to the data collected by the gyro sensor 512: motion sensing (such as changing the UI according to a user's tilting operation), image stabilization at the time of photographing, game control, and inertial navigation.
The pressure sensor 513 may be disposed on a side frame of the terminal 500 and/or underneath the display screen 505. When the pressure sensor 513 is disposed on the side frame of the terminal 500, a user's holding signal of the terminal 500 may be detected, and the processor 501 performs left-right hand recognition or shortcut operation according to the holding signal collected by the pressure sensor 513. When the pressure sensor 513 is disposed at the lower layer of the display screen 505, the processor 501 controls the operability control on the UI interface according to the pressure operation of the user on the display screen 505. The operability control comprises at least one of a button control, a scroll bar control, an icon control and a menu control.
The fingerprint sensor 514 is used for collecting a fingerprint of the user, and the processor 501 identifies the identity of the user according to the fingerprint collected by the fingerprint sensor 514, or the fingerprint sensor 514 identifies the identity of the user according to the collected fingerprint. Upon recognizing that the user's identity is a trusted identity, the processor 501 authorizes the user to perform relevant sensitive operations including unlocking the screen, viewing encrypted information, downloading software, paying, and changing settings, etc. The fingerprint sensor 514 may be disposed on the front, back, or side of the terminal 500. When a physical button or a vendor Logo is provided on the terminal 500, the fingerprint sensor 514 may be integrated with the physical button or the vendor Logo.
The optical sensor 515 is used to collect the ambient light intensity. In one embodiment, the processor 501 may control the display brightness of the display screen 505 based on the ambient light intensity collected by the optical sensor 515. Specifically, when the ambient light intensity is high, the display brightness of the display screen 505 is increased; when the ambient light intensity is low, the display brightness of the display screen 505 is reduced. In another embodiment, processor 501 may also dynamically adjust the shooting parameters of camera head assembly 506 based on the ambient light intensity collected by optical sensor 515.
A proximity sensor 516, also referred to as a distance sensor, is typically disposed on the front panel of the terminal 500. The proximity sensor 516 is used to collect the distance between the user and the front surface of the terminal 500. In one embodiment, when the proximity sensor 516 detects that the distance between the user and the front surface of the terminal 500 gradually decreases, the processor 501 controls the display screen 505 to switch from the bright screen state to the dark screen state; when the proximity sensor 516 detects that the distance between the user and the front surface of the terminal 500 becomes gradually larger, the display screen 505 is controlled by the processor 501 to switch from the breath screen state to the bright screen state.
Those skilled in the art will appreciate that the configuration shown in fig. 5 is not intended to be limiting of terminal 500 and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components may be used.
According to the terminal provided by the embodiment of the disclosure, after the page switching is performed, the video of the live broadcast room does not need to be reloaded, and the video of the preview window on the page of the live broadcast list is displayed, so that the displayed video picture is not interrupted. And the position size of the playing window is adjusted, so that the video of the target live broadcast room is gradually restored to the original display form of the target live broadcast room, the display form of the video in the process is not mutated, the change process is friendly, great visual impact cannot be caused to audience users, and the video playing effect is good.
The embodiment of the present disclosure provides a computer-readable storage medium, in which at least one program code is stored, and the at least one program code is loaded and executed by a processor to implement the video playing method shown in fig. 2 or fig. 3. The computer readable storage medium may be non-transitory. For example, the computer-readable storage medium may be a Read-Only Memory (ROM), a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
The computer-readable storage medium provided by the embodiment of the disclosure does not need to reload the video in the live broadcast room after switching the pages, and displays the video based on the video in the preview window on the page of the live broadcast list, so that the displayed video picture is not interrupted. And the position size of the playing window is adjusted, so that the video of the target live broadcast room is gradually restored to the original display form of the target live broadcast room, the display form of the video in the process is not mutated, the change process is friendly, great visual impact cannot be caused to audience users, and the video playing effect is good.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The above description is intended to be exemplary only and not to limit the present disclosure, and any modification, equivalent replacement, or improvement made without departing from the spirit and scope of the present disclosure is to be considered as the same as the present disclosure.
Claims (17)
1. A video playback method, the method comprising:
responding to a trigger operation of a preview window on a list page of a live broadcast room, and acquiring a first position size of the preview window, wherein the preview window is used for displaying a preview video of a target live broadcast room;
switching the live broadcast room list page to a target live broadcast room page, wherein a playing window is displayed on the target live broadcast room page, and the playing window takes the first position size as an initial position size;
and gradually adjusting the position size of the playing window until reaching a second position size, and displaying the live video of the target live broadcast room based on the playing window after each adjustment in the process of adjusting the playing window.
2. The method of claim 1, wherein the obtaining the first position size of the preview window comprises:
acquiring a first position of the preview window by calling a position acquisition function;
and respectively acquiring the width and the height of the preview window by calling a width acquisition function and a height acquisition function to obtain the first size of the preview window.
3. The method of claim 1, wherein the playback window comprises a playback control for playing a live video of the target live broadcast room, and wherein before switching the target live broadcast room listing page to a target live broadcast room page, further comprising:
and creating the playing control in the target live broadcast room page.
4. The method of claim 1, wherein the playback window comprises a playback control for playing a live video of the target live broadcast room, and wherein before switching the target live broadcast room listing page to a target live broadcast room page, further comprising:
transmitting an entity of a preview control included in the preview window into the play window;
and determining the preview control as the playing control based on the entity of the preview control.
5. The method of claim 1, wherein the first location dimension comprises a first location and a first dimension, and the second location comprises a second location and a second dimension;
the step-by-step adjustment of the position size of the playing window until reaching the second position size comprises:
in the process of controlling the playing window to be gradually adjusted from the first position to the second position, the size of the playing window is enlarged from the first size to the second size.
6. The method of claim 5, wherein the enlarging the size of the play window from the first size to the second size comprises:
and amplifying the size of the playing window from the first size to the second size in different amplification modes according to the position relation between the playing window and the target live broadcast room page.
7. The method as claimed in claim 6, wherein the enlarging the size of the playing window from the first size to the second size in different enlarging manners according to the position relationship between the playing window and the target live broadcast room page includes:
if the distance between the playing window and the upper edge of the target live broadcast room page is smaller than a first numerical value, keeping the distance unchanged, and amplifying the size of the playing window from the first size to the second size;
if the distance between the playing window and the lower edge of the target live broadcast room page is smaller than the first numerical value, keeping the distance unchanged, and amplifying the size of the playing window from the first size to the second size;
and if the distance between the playing window and the upper edge of the target live broadcast room is larger than a second numerical value, controlling the upper edge of the playing window to expand towards the upper edge of the page of the target live broadcast room and the lower edge of the playing window to expand towards the lower edge of the page of the target live broadcast room, so that the size of the playing window is enlarged from the first size to the second size.
8. The method of claim 5, wherein before displaying the live video of the target live broadcast room based on each adjusted play window, further comprising:
determining the size of each frame of video according to the first size and the second size;
cutting each frame of video in the target live broadcast room according to the size of each frame of video;
the displaying of the live video of the target live broadcast room based on the playing window adjusted each time comprises:
and displaying each frame of cut video based on the adjusted playing window.
9. The method of claim 1, further comprising:
before the position size of the playing window is adjusted to the second position size, acquiring a live video of the target live broadcast room based on a preview control of the preview window;
and after the position size of the playing window is adjusted to the second position size, acquiring the live video of the target live broadcast room based on the playing control of the playing window.
10. The method of claim 1, wherein prior to switching the live-air listing page to the target live-air page, further comprising:
and setting the transparency of other elements on the target live broadcast room page as transparent, wherein the other elements are elements on the target live broadcast room page except the playing window.
11. The method of claim 10, wherein after setting transparency of other elements on the target live room page to transparent, further comprising:
setting the execution logic of the other elements to stop executing.
12. The method of claim 10, wherein after displaying the live video of the target live broadcast room based on each adjusted play window, further comprising:
when the position size of the playing window is adjusted to the second position size, the transparency of the other elements is restored to the value before setting;
displaying the other elements based on the restored transparency.
13. The method of claim 12, wherein after displaying the other elements, further comprising:
execution logic to execute the other elements.
14. The method of any of claims 1-13, wherein after displaying the live video of the target live broadcast room based on each adjusted play window, further comprising:
responding to the closing operation of the target live broadcast room page, and acquiring the second position size of the playing window;
switching the target live broadcast room page to the live broadcast room list page, wherein the preview window is displayed on the live broadcast room list page, and the preview window takes the second position size as an initial position size;
gradually adjusting the position size of the preview window until the position size reaches the first position size, and displaying the preview video of the target live broadcast room based on the preview window after each adjustment in the process of adjusting the preview window.
15. A video playback apparatus, comprising:
the device comprises an acquisition module, a display module and a display module, wherein the acquisition module is used for responding to the triggering operation of a preview window on a live broadcast list page, and acquiring the first position size of the preview window, and the preview window is used for displaying a preview video of a target live broadcast;
the switching module is used for switching the live broadcast room list page to a target live broadcast room page, a playing window is displayed on the target live broadcast room page, and the playing window takes the first position size as an initial position size;
the adjusting module is used for gradually adjusting the position size of the playing window until the position size reaches a second position size;
and the display module is used for displaying the live video of the target live broadcast room based on the adjusted play window in the process of adjusting the play window.
16. A terminal, characterized in that the terminal comprises a processor and a memory, wherein at least one program code is stored in the memory, and the at least one program code is loaded and executed by the processor to implement the video playback method according to any one of claims 1 to 14.
17. A computer-readable storage medium, having stored therein at least one program code, which is loaded and executed by a processor, to implement the video playback method according to any one of claims 1 to 14.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202011205295.8A CN112383808A (en) | 2020-11-02 | 2020-11-02 | Video playing method, device, terminal and storage medium |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202011205295.8A CN112383808A (en) | 2020-11-02 | 2020-11-02 | Video playing method, device, terminal and storage medium |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN112383808A true CN112383808A (en) | 2021-02-19 |
Family
ID=74576539
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202011205295.8A Pending CN112383808A (en) | 2020-11-02 | 2020-11-02 | Video playing method, device, terminal and storage medium |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN112383808A (en) |
Cited By (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN114501100A (en) * | 2022-01-19 | 2022-05-13 | 上海哔哩哔哩科技有限公司 | Live broadcast page skipping method and system |
| CN114567806A (en) * | 2022-02-28 | 2022-05-31 | 上海哔哩哔哩科技有限公司 | Cross-page switching method and system |
| CN114942711A (en) * | 2022-05-31 | 2022-08-26 | 北京字节跳动网络技术有限公司 | A data playing method, device, computer equipment and storage medium |
| CN115103218A (en) * | 2022-06-16 | 2022-09-23 | 广州市百果园网络科技有限公司 | Data stream recovery method, device, apparatus, and medium |
| CN115334328A (en) * | 2022-07-26 | 2022-11-11 | 广州方硅信息技术有限公司 | Method and device for entering live broadcast room page, live broadcast system, equipment and medium |
| CN116233549A (en) * | 2023-02-24 | 2023-06-06 | 北京百度网讯科技有限公司 | A video page switching method and device |
Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20150370759A1 (en) * | 2013-04-22 | 2015-12-24 | Tencent Technology (Shenzhen) Company Limited | Method and apparatus for displaying multimedia content in browser |
| CN106028117A (en) * | 2016-05-24 | 2016-10-12 | 青岛海信电器股份有限公司 | Image processing method and device |
| US20170332036A1 (en) * | 2016-05-10 | 2017-11-16 | Rovi Guides, Inc. | Systems and methods for resizing content based on a relative importance of the content |
| CN108449641A (en) * | 2018-03-28 | 2018-08-24 | 聚好看科技股份有限公司 | Play method, apparatus, computer equipment and the storage medium of Media Stream |
| CN109246466A (en) * | 2018-10-30 | 2019-01-18 | 北京达佳互联信息技术有限公司 | Video broadcasting method, device and electronic equipment |
| CN109842818A (en) * | 2019-01-02 | 2019-06-04 | 平安科技(深圳)有限公司 | A kind of video broadcasting method, device, computer equipment and storage medium |
-
2020
- 2020-11-02 CN CN202011205295.8A patent/CN112383808A/en active Pending
Patent Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20150370759A1 (en) * | 2013-04-22 | 2015-12-24 | Tencent Technology (Shenzhen) Company Limited | Method and apparatus for displaying multimedia content in browser |
| US20170332036A1 (en) * | 2016-05-10 | 2017-11-16 | Rovi Guides, Inc. | Systems and methods for resizing content based on a relative importance of the content |
| CN106028117A (en) * | 2016-05-24 | 2016-10-12 | 青岛海信电器股份有限公司 | Image processing method and device |
| CN108449641A (en) * | 2018-03-28 | 2018-08-24 | 聚好看科技股份有限公司 | Play method, apparatus, computer equipment and the storage medium of Media Stream |
| CN109246466A (en) * | 2018-10-30 | 2019-01-18 | 北京达佳互联信息技术有限公司 | Video broadcasting method, device and electronic equipment |
| CN109842818A (en) * | 2019-01-02 | 2019-06-04 | 平安科技(深圳)有限公司 | A kind of video broadcasting method, device, computer equipment and storage medium |
Cited By (8)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN114501100A (en) * | 2022-01-19 | 2022-05-13 | 上海哔哩哔哩科技有限公司 | Live broadcast page skipping method and system |
| CN114501100B (en) * | 2022-01-19 | 2024-05-24 | 上海哔哩哔哩科技有限公司 | Live page jump method and system |
| CN114567806A (en) * | 2022-02-28 | 2022-05-31 | 上海哔哩哔哩科技有限公司 | Cross-page switching method and system |
| CN114942711A (en) * | 2022-05-31 | 2022-08-26 | 北京字节跳动网络技术有限公司 | A data playing method, device, computer equipment and storage medium |
| CN115103218A (en) * | 2022-06-16 | 2022-09-23 | 广州市百果园网络科技有限公司 | Data stream recovery method, device, apparatus, and medium |
| CN115103218B (en) * | 2022-06-16 | 2023-09-19 | 广州市百果园网络科技有限公司 | Data stream recovery method and device, equipment and medium thereof |
| CN115334328A (en) * | 2022-07-26 | 2022-11-11 | 广州方硅信息技术有限公司 | Method and device for entering live broadcast room page, live broadcast system, equipment and medium |
| CN116233549A (en) * | 2023-02-24 | 2023-06-06 | 北京百度网讯科技有限公司 | A video page switching method and device |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN109246466B (en) | Video playing method and device and electronic equipment | |
| CN110368689B (en) | Game interface display method, system, electronic equipment and storage medium | |
| CN111065001B (en) | Video production method, device, equipment and storage medium | |
| CN112383808A (en) | Video playing method, device, terminal and storage medium | |
| CN108449641B (en) | Method, device, computer equipment and storage medium for playing media stream | |
| CN111880888B (en) | Preview cover generation method and device, electronic equipment and storage medium | |
| CN108769562A (en) | The method and apparatus for generating special efficacy video | |
| CN111464830B (en) | Method, device, system, equipment and storage medium for image display | |
| CN109451343A (en) | Video sharing method, apparatus, terminal and storage medium | |
| KR20110122979A (en) | Mobile terminal and its control method | |
| CN110839174A (en) | Image processing method and device, computer equipment and storage medium | |
| CN111083526B (en) | Video transition method and device, computer equipment and storage medium | |
| CN111901658A (en) | Comment information display method and device, terminal and storage medium | |
| CN111818358A (en) | Audio file playing method and device, terminal and storage medium | |
| CN111741366A (en) | Audio playing method, device, terminal and storage medium | |
| CN109634688B (en) | Session interface display method, device, terminal and storage medium | |
| CN115334361A (en) | Material editing method, device, terminal and storage medium | |
| CN113613053A (en) | Video recommendation method and device, electronic equipment and storage medium | |
| CN109089137B (en) | Stuck detection method and device | |
| CN111897465B (en) | Popup display method, device, equipment and storage medium | |
| CN110769120A (en) | Method, device, equipment and storage medium for message reminding | |
| CN110868636B (en) | Video material intercepting method and device, storage medium and terminal | |
| CN113485596A (en) | Virtual model processing method and device, electronic equipment and storage medium | |
| CN113301422A (en) | Method, terminal and storage medium for acquiring video cover | |
| CN112637624A (en) | Live stream processing method, device, equipment 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 | ||
| RJ01 | Rejection of invention patent application after publication |
Application publication date: 20210219 |
|
| RJ01 | Rejection of invention patent application after publication |