CN108521598B - Method and device for video preview and computer equipment - Google Patents

Method and device for video preview and computer equipment Download PDF

Info

Publication number
CN108521598B
CN108521598B CN201810298031.8A CN201810298031A CN108521598B CN 108521598 B CN108521598 B CN 108521598B CN 201810298031 A CN201810298031 A CN 201810298031A CN 108521598 B CN108521598 B CN 108521598B
Authority
CN
China
Prior art keywords
room
live broadcast
preview
video
target live
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810298031.8A
Other languages
Chinese (zh)
Other versions
CN108521598A (en
Inventor
徐超
张文明
陈少杰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wuhan Douyu Network Technology Co Ltd
Original Assignee
Wuhan Douyu Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wuhan Douyu Network Technology Co Ltd filed Critical Wuhan Douyu Network Technology Co Ltd
Priority to CN201810298031.8A priority Critical patent/CN108521598B/en
Publication of CN108521598A publication Critical patent/CN108521598A/en
Application granted granted Critical
Publication of CN108521598B publication Critical patent/CN108521598B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/431Generation of visual interfaces for content selection or interaction; Content or additional data rendering
    • H04N21/4312Generation 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements or protocols for real-time communications
    • H04L65/40Services or applications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements or protocols for real-time communications
    • H04L65/60Media handling, encoding, streaming or conversion
    • H04L65/601Media manipulation, adaptation or conversion
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/442Monitoring of processes or resources, e.g. detecting the failure of a recording device, monitoring the downstream bandwidth, the number of times a movie has been viewed, the storage space available from the internal hard disk
    • H04N21/44213Monitoring of end-user related data
    • H04N21/44222Analytics of user selections, e.g. selection of programs or purchase activity

Abstract

The invention provides a method, a device and computer equipment for video preview, wherein the method comprises the following steps: monitoring whether a triggering operation signal for previewing videos of a target live broadcast room is received or not in a room list layer of a live broadcast page; if a trigger operation signal is received, acquiring the number of target live broadcast rooms currently performing video preview; judging whether the number of the target live broadcast rooms currently undergoing video preview exceeds a preset preview threshold value, if not, creating a dynamic preview control for each live broadcast room in a corresponding video preview layer according to the sequence of occurrence of the trigger operation signals, and acquiring a room ID of each target live broadcast room; generating a corresponding live video preview request based on the room ID of each target live broadcast room, and acquiring a video stream address of each target live broadcast room; and in the corresponding video preview layer, simultaneously previewing the live videos of a plurality of target live broadcast rooms based on the video stream address of each target live broadcast room.

Description

Method and device for video preview and computer equipment
Technical Field
The invention belongs to the technical field of live video, and particularly relates to a method and device for video preview and computer equipment.
Background
With the progress of network communication technology and the increasing speed of broadband networks, the video live broadcast technology is developed and applied more and more.
At present, with the increase of live broadcast users, live broadcast types are more and more, and users can select live broadcast video preview to know whether a live broadcast room is an interested live broadcast room when unfamiliar with live broadcast content.
Therefore, the technical problem that live video of a plurality of live rooms cannot be previewed simultaneously exists in live website video previewing in the prior art.
Disclosure of Invention
Aiming at the problems in the prior art, the embodiments of the present invention provide a method, an apparatus and a computer device for video preview, and the technical problems in the prior art are that live video preview of a live website cannot be performed simultaneously and live video of a plurality of live rooms cannot be previewed simultaneously.
The embodiment of the invention provides a method for video preview, which is applied to a live broadcast website and comprises the following steps:
monitoring whether a triggering operation signal for previewing videos of a target live broadcast room is received or not in a room list layer of a live broadcast page; the live broadcast page comprises a room list layer and a plurality of video preview layers, and when the video preview layers are displayed, the room list layer is in a hidden state;
if the trigger operation signal is received, acquiring the number of target live broadcast rooms currently performing video preview;
judging whether the number of the target live broadcast rooms currently undergoing video preview exceeds a preset preview threshold value, if not, creating a dynamic preview control for each live broadcast room in a corresponding video preview layer according to the sequence of the trigger operation signals, and sequentially acquiring the room ID of each target live broadcast room;
generating a corresponding live video preview request based on the room ID of each target live broadcast room, and sending the live video preview request to a server to obtain a video stream address of each target live broadcast room;
and in the corresponding video preview layer, based on the video stream address of each target live broadcast room, previewing live broadcast videos of a plurality of target live broadcast rooms simultaneously by using the corresponding preview control.
In the foregoing solution, if the preset preview threshold is exceeded, the method further includes:
acquiring a network interface of a target live broadcast room with the longest preview duration;
the network interface is distributed to a next target live broadcast room needing video preview;
acquiring a room ID and a room serial number of the next target live broadcast room needing video preview;
determining coordinate information of the next target live broadcast room needing video preview on a live broadcast page according to the room ID and the room serial number;
determining the coordinates of a video preview layer corresponding to a target live broadcast room with the longest preview duration according to the coordinate information;
acquiring the video stream address of the next target live broadcast room needing video preview through the network interface;
and previewing the live video of the next target live broadcast room needing video preview based on the video stream address of the next target live broadcast room needing video preview in the video preview layer corresponding to the target live broadcast room with the longest preview duration.
In the above scheme, a timer control is further arranged in the video preview layer, and the timer control is used for controlling the display duration of the live video.
In the foregoing scheme, the acquiring the room ID of each target live broadcast room includes:
and acquiring a room ID of a corresponding target live broadcast room according to the message thrown by each trigger operation signal, wherein the message carries the room ID of the target live broadcast room.
In the above scheme, in the corresponding video preview layer, based on the video stream address of each target live broadcast room, previewing live broadcast videos of a plurality of target live broadcast rooms simultaneously by using the corresponding preview control, includes:
acquiring video stream information of each target live broadcast room based on a video stream address of each target live broadcast room;
and in the corresponding video preview layer, sequentially loading each piece of video stream information into a preview player control in the corresponding preview control, playing each piece of video stream information through each preview player control, and simultaneously previewing the live video of each target live broadcast room.
In the above scheme, when the live video of the target live broadcast room is played and previewed based on the video stream address, the room information of the target live broadcast room is completely displayed in the video preview layer.
The present invention also provides an apparatus for video preview, the apparatus comprising:
the monitoring unit is used for monitoring whether a plurality of trigger operation signals for previewing videos of a target live broadcast room are received in a room list layer of a live broadcast page; the live broadcast page comprises a room list layer and a plurality of video preview layers, and when the video preview layers are displayed, the room list layer is in a hidden state;
the acquisition unit is used for acquiring the number of target live broadcast rooms currently performing video preview when receiving the trigger operation signal;
the judging unit is used for judging whether the number of the target live broadcast rooms currently performing video preview exceeds a preset preview threshold value;
the creating unit is used for creating a dynamic preview control for each live broadcast room in the corresponding video preview layer according to the sequence of the trigger operation signals and sequentially acquiring the room ID of each target live broadcast room;
the generating unit is used for generating a corresponding live video preview request based on the room ID of each target live broadcast room when the preset preview threshold value is not exceeded, and sending the live video preview request to a server to acquire the video stream address of each target live broadcast room;
and the previewing unit is used for previewing the live videos of the target live broadcasting rooms simultaneously by utilizing the corresponding previewing control based on the video stream address of each target live broadcasting room in the corresponding video previewing layer.
In the above scheme, the apparatus further comprises: a distribution unit and a determination unit; wherein the content of the first and second substances,
the acquisition unit is also used for acquiring a network interface of a target live broadcast room with the longest continuous preview duration when the preset preview threshold is exceeded; acquiring a room ID and a room serial number of the next target live broadcast room needing video preview; acquiring the video stream address of the next target live broadcast room needing video preview through the network interface;
the distribution unit is used for distributing the network interface to a next target live broadcast room needing video preview;
the determining unit is used for determining the coordinate information of the next target live broadcast room needing video preview on a live broadcast page according to the room ID and the room serial number;
determining the coordinates of a video preview layer corresponding to a target live broadcast room with the longest preview duration according to the coordinate information;
the preview unit is further configured to: and previewing the live video of the next target live broadcast room needing video preview based on the video stream address of the next target live broadcast room needing video preview in the video preview layer corresponding to the target live broadcast room with the longest preview duration.
The invention also provides a computer-readable storage medium, on which a computer program is stored which, when executed by a processor, implements the method of any one of the above.
The invention also provides a computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the method of any one of the above when executing the program.
The invention provides a method, a device and computer equipment for video preview, wherein the method comprises the following steps: monitoring whether a triggering operation signal for previewing videos of a target live broadcast room is received or not in a room list layer of a live broadcast page; the live broadcast page comprises a room list layer and a plurality of video preview layers, and when the video preview layers are displayed, the room list layer is in a hidden state; if the trigger operation signal is received, acquiring the number of target live broadcast rooms currently performing video preview; judging whether the number of the target live broadcast rooms currently undergoing video preview exceeds a preset preview threshold value, if not, creating a dynamic preview control for each live broadcast room in a corresponding video preview layer according to the sequence of the trigger operation signals, and acquiring a room ID of each target live broadcast room; generating a corresponding live video preview request based on the room ID of each target live broadcast room, and sending the live video preview request to a server to obtain a video stream address of each target live broadcast room; in a corresponding video preview layer, based on the video stream address of each target live broadcast room, previewing live broadcast videos of a plurality of target live broadcast rooms simultaneously by using corresponding preview controls; therefore, the live broadcast page comprises a room list surface layer and a plurality of video preview layers, the room list surface layer displays all live broadcast rooms, when the live broadcast videos of a plurality of target live broadcast rooms need to be previewed, the mouse sequentially moves to the target live broadcast rooms, the trigger operation signals for previewing the videos of the target live broadcast rooms are received, dynamic preview controls are created according to the trigger operation signals, and room IDs of the target live broadcast rooms are obtained; and then video stream addresses of a plurality of live broadcast rooms are obtained from the server according to the room ID, and the video stream addresses are fed back to the corresponding video preview layers, so that the video preview layers can respectively play the live broadcast video of each target live broadcast room by using the preview controls based on the video stream addresses, and thus, when previewing the video, a user can simultaneously preview the live broadcast video of the plurality of live broadcast rooms.
Drawings
Fig. 1 is a schematic flowchart of a video preview method according to an embodiment of the present invention;
FIG. 2 is a schematic structural diagram of a video previewing apparatus according to a second embodiment of the present invention;
fig. 3 is a schematic overall structural diagram of a computer device for video preview according to a third embodiment of the present invention.
Detailed Description
The invention provides a method and a device for video preview, which are used for solving the technical problem that live videos of a plurality of live broadcast rooms cannot be previewed simultaneously when live broadcast websites preview videos in the prior art.
The technical scheme in the embodiment of the application has the following general idea:
monitoring whether a triggering operation signal for previewing videos of a target live broadcast room is received or not in a room list layer of a live broadcast page; the live broadcast page comprises a room list layer and a plurality of video preview layers, and when the video preview layers are displayed, the room list layer is in a hidden state; if the trigger operation signal is received, acquiring the number of target live broadcast rooms currently performing video preview; judging whether the number of the target live broadcast rooms currently undergoing video preview exceeds a preset preview threshold value, if not, creating a dynamic preview control for each live broadcast room in a corresponding video preview layer according to the sequence of the trigger operation signals, and acquiring a room ID of each target live broadcast room; generating a corresponding live video preview request based on the room ID of each target live broadcast room, and sending the live video preview request to a server to obtain a video stream address of each target live broadcast room; and in the corresponding video preview layer, based on the video stream address of each target live broadcast room, previewing live broadcast videos of a plurality of target live broadcast rooms simultaneously by using the corresponding preview control.
The technical solution of the present invention is further described in detail by the accompanying drawings and the specific embodiments.
Example one
The embodiment provides a method for video preview, which is applied to a live broadcast website, and as shown in fig. 1, the method includes:
s101, monitoring whether a plurality of trigger operation signals for previewing videos of a target live broadcast room are received in a room list layer of a live broadcast page;
in this step, because the live broadcast rooms include a plurality of live broadcast rooms, the server has a roomManager room manager, each live broadcast room has a room interface of the live broadcast room, the server can communicate with the room interface on the terminal through the roomManager, and the management of each live broadcast room is realized. The live page may be implemented by:
a1: creating a window object Qt, inheriting the window object QQuickView and instantiating the window object,
a2: creating a QQQmlApplicationEngine engine object in Qt for analyzing and creating an interface control, wherein the program is realized as follows:
m_engine=new QQmlApplicationEngine(this);
wherein m _ engine is an engine object, QQMlAplicationEngine is an engine, this is a parent class of QQMlAplicationEngine.
A3: acquiring a QQQmlContext address in a QQQmlApplicationEngine object, and using the QQmlContext address to bind the object in the Qt, wherein the program is realized as follows:
QQmlContext*context=m_engine->rootContext();
wherein, QQmlContext is the context of qml files, and rootContext () is the calling method for obtaining the context of the root node of Contex;
a4: the preset qml file path is set, and the following is realized:
context->setContextPdoperty("_app_path",appPath);
wherein context- > setcontextproperty is a method for calling a file path, and appPath is a main window file path in a window object.
Load all ui interface controls of live page through this path
A5: binding the roomManager objects to the QML context facilitates the invocation of roomManager at QML, since each live interface requires a request for a web interface, each live interface has an interface room interface for requesting a server, and there is a list of all room interfaces (room web interfaces) in roomManager.
The live broadcast page comprises two layers, namely a room list layer and a plurality of video preview layers, wherein when the video preview layers are displayed, the room list layer is in a hidden state; and the user can conveniently watch the preview video of the video preview layer. The video preview layer comprises a preview control, and the preview control is provided with a video preview player control, a room information display control, a room title, heat information, label information and the like.
In a specific implementation process, the room list layer includes a list implementation portion and a data implementation portion, where the list implementation portion is specifically as follows:
b1: adding a view display control in a preset qml script file: the gridView control is used for displaying the panel style of the live broadcast room;
b2: setting general attributes of the gridView control, wherein the general attributes are used for setting the format of the panel style of the live broadcast room, such as the position, the size and the size of each node; each node is each live broadcast room in the live broadcast page;
b3: and adding a view display agent for realizing panel styles of all live rooms, wherein the panel styles of all the live rooms are the same and only the data is different. The room panel style refers to a style of each live room node in the list, and the panel style is fixed. And data is provided by the model set by the gridView control.
The data implementation part is specifically implemented as follows:
c1: after the window object of the live broadcast page is established, sending a get request to a server to acquire list information of all live broadcast rooms;
c2: acquiring room list information in json format (JavaScript Object Notation, JS Object Notation, which is a lightweight data exchange format) returned by a server, and analyzing the room list information; the server returns array information in a json format, so that the array information needs to be analyzed to obtain list information of each room; the list information includes: room name, anchor name, number of people online, etc.
C3: constructing a view display model, adding the analyzed list information into the view display model,
c4: setting the constructed view display model to a view display control: and setting data of a view display model in the gridView control, and supplementing the data into a room list.
The implementation process of the preview control is described as follows:
d1: adding a Component in a preset qml file; the Component is a UI interface Component.
D2: adding a preview player control in the Component for playing a preview video;
d3: adding room information display control, room title, heat, classification and label information and the like in the Component.
S102, if the trigger operation signal is received, acquiring the number of target live broadcast rooms currently performing video preview; judging whether the number of the target live broadcast rooms currently undergoing video preview exceeds a preset preview threshold value, if not, creating a dynamic preview control for each live broadcast room in a corresponding video preview layer according to the sequence of the trigger operation signals, and sequentially acquiring the room ID of each target live broadcast room;
in the step, after the information is set, a gridView control monitors whether a plurality of trigger operation signals for previewing videos of target live broadcast rooms are received in a room list surface layer of a live broadcast page, and if the plurality of trigger operation signals are received, the number of the target live broadcast rooms currently undergoing video previewing is acquired; and judging whether the number of the target live broadcast rooms currently undergoing video preview exceeds a preset preview threshold value, if not, creating a dynamic preview control for each live broadcast room in a corresponding video preview layer according to the sequence of the trigger operation signals, and sequentially acquiring the room ID of each target live broadcast room.
For example, if the preset preview threshold is 3, that is, live videos of 3 live broadcast rooms can be previewed simultaneously, and the number of live broadcast rooms currently being previewed is 2, then a dynamic preview control can be created for each live broadcast room in the corresponding video preview layer according to the sequence of occurrence of the trigger operation signals.
Here, if a user wants to preview live videos of two target live broadcast rooms, the user moves (does not need to click) a mouse to the two target live broadcast rooms in the room list layer in sequence, then the user monitors two trigger operation signals in sequence, and when the trigger operation signals are monitored, a dynamic preview control is created for each live broadcast room in a corresponding video preview layer according to the sequence of occurrence of the trigger operation signals, so that the live videos of the live broadcast rooms are played in different video preview layers at the same time. When the live video of the target live broadcast room does not need to be previewed, the corresponding preview control can be deleted.
And after a dynamic preview control is created for each live broadcast room in the corresponding video preview layer according to the sequence of the trigger operation signals, acquiring the room ID of each target live broadcast room. Specifically, after receiving the trigger operation signal each time, the trigger operation signal throws a message, and then the room ID of each target live broadcast room can be respectively obtained according to the message thrown by each trigger operation signal, where each message carries the room ID of each target live broadcast room. The trigger operation signal includes: a mouse move-in signal; that is, when the user previews the live video of the target live room, it is the mouse-in signal that is monitored.
S103, generating a corresponding live video preview request based on the room ID of each target live broadcast room, sending the live video preview request to a server, and acquiring a video stream address of each target live broadcast room;
after the room ID of each live broadcast room is obtained, generating a corresponding live broadcast video preview request based on the room ID of each target live broadcast room, and sending the live broadcast video preview request to a server to obtain a video stream address of each target live broadcast room;
specifically, after the room ID of the target live broadcast room is obtained each time, the live broadcast video preview request may be converted into a signal by the terminal based on the room ID of the target live broadcast room, and then the live broadcast video preview request is generated according to the converted signal and the basic information of the terminal, where the basic information of the terminal may be an identifier of a terminal user. And the server receives the live video preview request, and returns video stream address information of the room to the terminal based on the room ID of the target live broadcast room, wherein the video stream address information is information in a json format.
After the ID of the target live broadcast room is acquired each time, the video stream address of each target live broadcast room is acquired according to the above implementation manner, but the time for acquiring the room ID is different each time because the occurrence time of the trigger operation signal is different.
And S104, previewing live videos of a plurality of target live broadcast rooms simultaneously by utilizing the corresponding preview control based on the video stream address of each target live broadcast room in the corresponding video preview layer.
After the terminal obtains the video stream address, in the corresponding video preview layer, based on the video stream address of each target live broadcast room, the corresponding preview control is utilized to simultaneously preview live broadcast videos of a plurality of target live broadcast rooms.
Taking a certain live broadcast room as an example, the specific implementation process is as follows: acquiring video stream information of the target live broadcast room based on the video stream address; and loading the video stream information into a preview player control in the video preview layer, playing the video stream information through the preview player control, and previewing the live video of the target live broadcast room. Therefore, each player control independently plays the live video of each live broadcast room, and a user can simultaneously preview the live video of a plurality of live broadcast rooms.
Of course, the present embodiment can also preview live videos of multiple live rooms simultaneously in one live window.
In addition, if in step S102, after receiving each trigger operation signal, if the number of target live broadcast rooms currently performing video preview exceeds a preset preview threshold, acquiring a network interface of the target live broadcast room with the longest preview duration; the network interface is distributed to a next target live broadcast room needing video preview; acquiring a room ID and a room serial number of the next target live broadcast room needing video preview; determining coordinate information of the next target live broadcast room needing video preview on a live broadcast page according to the room ID and the room serial number; determining the coordinates of a video preview layer corresponding to a target live broadcast room with the longest preview duration according to the coordinate information; acquiring the video stream address of the next target live broadcast room needing video preview through the network interface; and previewing the live video of the next target live broadcast room needing video preview based on the video stream address of the next target live broadcast room needing video preview in the video preview layer corresponding to the target live broadcast room with the longest preview duration. Here, the implementation of the preview video is completely the same as the above-described flow, and is not described here again.
In addition, a timer control is further arranged in each video preview layer and used for controlling the display duration of the live video of each live broadcast room, and the general timing duration is set to be about 1 min. And after the preview time reaches the timing duration, automatically closing the corresponding video preview layer and the network interface of the live broadcast room.
It should be noted that, when the video preview layer detects the mouse-in signal again, the timer space in the video preview layer will reset the timing time when the video preview layer does not end.
Here, the coordinate information of the next target live broadcast room requiring video preview on the live broadcast page is determined according to the room ID and the room number, and the following is implemented:
determining abscissa information of a next target live broadcast room needing video preview in the live broadcast page according to a formula (1);
x=index%columnCount*cellWidth(1)
determining the ordinate information of the next target live broadcast room needing video preview in the live broadcast page according to the formula (2);
y=(cellHeight*((index-index%columnCount)/.columnCount))-contentY(2)
the system comprises a room, a columnCount line and a contentY line, wherein x is the horizontal coordinate, y is the vertical coordinate, index is the room serial number, cellWidth is the width of a next target live broadcast room needing video preview, the number of live broadcast rooms in the columnCount line, cellHeight is the height of the next target live broadcast room needing video preview, and contentY.
Colloquially, for example, if the preset preview threshold is 3, live broadcast videos of 3 live broadcast rooms can be previewed simultaneously, the number of the live broadcast rooms currently only previewed is 3, the target live broadcast room with the longest preview duration is a first target live broadcast room, and after a fourth trigger operation signal is received (i.e. the live broadcast video of a fourth live broadcast room is to be previewed), a network interface of the first target live broadcast room is allocated to the fourth live broadcast room, and a room ID and a room serial number of the fourth live broadcast room are obtained through the network interface; determining coordinate information of a fourth live broadcast room on a live broadcast page according to the room ID and the room serial number; determining and modifying the coordinates of the video preview layer corresponding to the first target live broadcast room according to the coordinate information, namely calling the video preview layer corresponding to the first live broadcast room to a fourth live broadcast room for use, and finally acquiring a video stream address of the fourth target live broadcast room through a network interface; and previewing the live video of a fourth target live broadcast room based on the video stream address of the fourth target live broadcast room in the video preview layer corresponding to the first target live broadcast room.
The room sequence number refers to the sequence number of the live broadcast room on the live broadcast page, for example, 9 live broadcast rooms are on the live broadcast page, and the sequence number is similar to a style of a nine-square grid, so that the sequence numbers of the rooms are sequentially arranged from left to right and from top to bottom.
Further, when the live video of the target live broadcast room is watched or previewed based on the video stream address, the room information of the target live broadcast room can be completely displayed in the video preview layer, namely in the preview interface, and the room information can be completely displayed no matter how much. The trigger operation signal may include: a mouse click signal or a mouse move-in signal; namely, when the user directly watches the live video of the target live broadcasting room, the user monitors a mouse click signal; when the user previews the live video of the target live broadcast room, a mouse-in signal is monitored.
The specific implementation process is as follows:
if the trigger operation signal is monitored, acquiring a room ID and a room serial number of a target live broadcast room; here, if the user moves or clicks the mouse to the live broadcast room of the list of rooms, the trigger operation signal is triggered, the trigger operation signal throws out a message, and the room ID and the room number of the target live broadcast room are obtained according to the message thrown out by the trigger operation signal, where the message carries the room ID and the room number of the target live broadcast room. After the room ID and the room serial number of a target live broadcast room are obtained, the room ID and the room subscript of the target live broadcast room are transmitted to a gridView control, and coordinate information of the target live broadcast room in a live broadcast page is determined according to the room ID and the room serial number of the target live broadcast room; the specific implementation process can be obtained according to the above formulas (1) and (2), and will not be described herein again.
And determining a display coordinate value (x, y) of the target live broadcast room according to the coordinate information of the target live broadcast room in the live broadcast page.
The method comprises the steps of acquiring a display coordinate value of a target live broadcast room, setting the display coordinate value in a room information display control, and adjusting the position of a video playing layer in real time by taking the display coordinate value as a reference when a video is previewed or played so that the position of the video playing layer relative to the target live broadcast room is always in a central position.
And then the roomManager object sends a get request to the server through a network interface of the target live broadcast room to acquire the room information of the target live broadcast room, wherein the request carries the room ID of the target live broadcast room. The server returns the room information of the room based on the room ID, and the terminal displays the room information in the video preview layer after receiving the room information. Here, the room information includes: room name, anchor name, room tag information, online population, etc.; the room information is also in json format.
After the terminal receives the room information of the target live broadcast room, the room information is fed back to the room information display control, so that the room information can be displayed in a preview interface of a video preview layer through the room information display control, and the room information can be completely displayed in the preview or viewing interface because the coordinate position of the preview interface relative to the target live broadcast room is always in a central state.
As an optional implementation manner, when the trigger operation signal is detected to be removed, the video preview layer is hidden and the live video of the target live broadcast room is paused to be played.
Based on the same inventive concept, the invention further provides a device for video preview, which is specifically referred to as embodiment two.
Example two
The present embodiment provides an apparatus for video preview, referring to fig. 2, the apparatus further includes: a monitoring unit 21, an acquisition unit 22, a judgment unit 23, a creation unit 24, a generation unit 25, and a preview unit 26; wherein the content of the first and second substances,
because the live broadcast rooms comprise a plurality of rooms, the server is provided with a roommager room manager, each live broadcast room is provided with a room interface of a live broadcast room network interface, the server can communicate with the room interface on the terminal through the roommager, and the management of each live broadcast room is realized. The live page may be implemented by:
a1: creating a window object Qt, inheriting the window object QQuickView and instantiating the window object,
a2: creating a QQQmlApplicationEngine engine object in Qt for analyzing and creating an interface control, wherein the program is realized as follows:
m_engine=new QQmlApplicationEngine(this);
wherein m _ engine is an engine object, QQMlAplicationEngine is an engine, this is a parent class of QQMlAplicationEngine.
A3: acquiring a QQQmlContext address in a QQQmlApplicationEngine object, and using the QQmlContext address to bind the object in the Qt, wherein the program is realized as follows:
QQmlContext*context=m_engine->rootContext();
wherein, QQmlContext is the context of qml files, and rootContext () is the calling method for obtaining the context of the root node of Contex;
a4: the preset qml file path is set, and the following is realized:
context->setContextPdoperty("_app_path",appPath);
wherein context- > setcontextproperty is a method for calling a file path, and appPath is a main window file path in a window object.
Load all ui interface controls of live page through this path
A5: binding the roomManager objects to the QML context facilitates the invocation of roomManager at QML, since each live interface requires a request for a web interface, each live interface has an interface room interface for requesting a server, and there is a list of all room interfaces (room web interfaces) in roomManager.
The live broadcast page comprises two layers, namely a room list layer and a plurality of video preview layers, wherein when the video preview layers are displayed, the room list layer is in a hidden state; and the user can conveniently watch the preview video of the video preview layer. The video preview layer comprises a preview control, and the preview control is provided with a video preview player control, a room information display control, a room title, heat information, label information and the like.
In a specific implementation process, the room list layer includes a list implementation portion and a data implementation portion, where the list implementation portion is specifically as follows:
b1: adding a view display control in a preset qml script file: the gridView control is used for displaying the panel style of the live broadcast room;
b2: setting general attributes of the gridView control, wherein the general attributes are used for setting the format of the panel style of the live broadcast room, such as the position, the size and the size of each node; each node is each live broadcast room in the live broadcast page;
b3: and adding a view display agent for realizing panel styles of all live rooms, wherein the panel styles of all the live rooms are the same and only the data is different. The room panel style refers to a style of each live room node in the list, and the panel style is fixed. And data is provided by the model set by the gridView control.
The data implementation part is specifically implemented as follows:
c1: after the window object of the live broadcast page is established, sending a get request to a server to acquire list information of all live broadcast rooms;
c2: acquiring room list information in json format (JavaScript Object Notation, JS Object Notation, which is a lightweight data exchange format) returned by a server, and analyzing the room list information; the server returns array information in a json format, so that the array information needs to be analyzed to obtain list information of each room; the list information includes: room name, anchor name, number of people online, etc.
C3: constructing a view display model, adding the analyzed list information into the view display model,
c4: setting the constructed view display model to a view display control: and setting data of a view display model in the gridView control, and supplementing the data into a room list.
The implementation process of the video preview layer is described as follows:
d1: adding a Component in a preset qml file; the Component is a UI interface Component.
D2: adding a preview player control in the Component for playing a preview video;
d3: adding room information display control, room title, heat, classification and label information and the like in the Component.
After the above information is set, the monitoring unit 21 monitors whether a plurality of trigger operation signals for previewing videos of target live broadcast rooms are received in a room list layer of a live broadcast page, and if a plurality of trigger operation signals are received, the acquiring unit 22 is configured to acquire the number of target live broadcast rooms currently undergoing video previewing; a determining unit 23, configured to determine whether the number of the target live broadcast rooms currently performing video preview exceeds a preset preview threshold; if the preset preview threshold is not exceeded, the creating unit 24 creates a dynamic preview control for each live broadcast room in the corresponding video preview layer according to the sequence of the trigger operation signals, and sequentially obtains the room ID of each target live broadcast room.
For example, if the preset preview threshold is 3, that is, live videos of 3 live broadcast rooms can be previewed simultaneously, and the number of the live broadcast rooms currently only previewed is 2, then a dynamic preview control can be created for each live broadcast room in the corresponding video preview layer according to the sequence of the occurrence of the trigger operation signals.
Here, if a user wants to preview live videos of two target live broadcast rooms, the user moves (does not need to click) a mouse to the two target live broadcast rooms in the room list layer in sequence, then the user monitors two trigger operation signals in sequence, and when the trigger operation signals are monitored, a dynamic preview control is created for each live broadcast room in a corresponding video preview layer according to the sequence of occurrence of the trigger operation signals, so that the live videos of the live broadcast rooms are played in different video preview layers at the same time. When the live video of the target live broadcast room does not need to be previewed, the corresponding preview control can be deleted.
And after a dynamic preview control is created for each live broadcast room in the corresponding video preview layer according to the sequence of the trigger operation signals, acquiring the room ID of each target live broadcast room. Specifically, after receiving the trigger operation signal each time, the trigger operation signal throws a message, and then the room ID of each target live broadcast room can be respectively obtained according to the message thrown by each trigger operation signal, where each message carries the room ID of each target live broadcast room. The trigger operation signal includes: a mouse move-in signal; that is, when the user previews the live video of the target live room, it is the mouse-in signal that is monitored.
After the room ID of each live broadcast room is obtained, the generating unit 25 is configured to generate a corresponding live broadcast video preview request based on the room ID of each target live broadcast room, and send the live broadcast video preview request to the server, so as to obtain a video stream address of each target live broadcast room.
Specifically, after the room ID of the target live broadcast room is obtained each time, the live broadcast video preview request may be converted into a signal by the terminal based on the room ID of the target live broadcast room, and then the live broadcast video preview request is generated according to the converted signal and the basic information of the terminal, where the basic information of the terminal may be an identifier of a terminal user. And the server receives the live video preview request, and returns video stream address information of the room to the terminal based on the room ID of the target live broadcast room, wherein the video stream address information is information in a json format.
After acquiring the ID of the target live broadcast room, the generating unit 25 acquires the video stream address of each target live broadcast room according to the above-described implementation manner, but the time for acquiring the room ID is different because the occurrence time of the trigger operation signal is different.
After the terminal acquires the video stream address, the preview unit 26 is configured to preview, in the corresponding video preview layer, the live videos in the target live broadcast rooms simultaneously by using the corresponding preview control based on the video stream address of each target live broadcast room.
Taking a certain live broadcast room as an example, the specific implementation process is as follows: acquiring video stream information of the target live broadcast room based on the video stream address; and loading the video stream information into a preview player control in the video preview layer, playing the video stream information through the preview player control, and previewing the live video of the target live broadcast room. Therefore, each player control independently plays the live video of each live broadcast room, and a user can simultaneously preview the live video of a plurality of live broadcast rooms.
Here, the apparatus further includes: an assigning unit 27 and a determining unit 28; in the above, after receiving each trigger operation signal, if the number of target live broadcast rooms currently performing video preview exceeds a preset preview threshold, the obtaining unit 22 is further configured to: acquiring a network interface of a target live broadcast room with the longest preview duration; the distribution unit 27 is configured to distribute the network interface to a target live broadcast room to be subjected to video preview next;
the obtaining unit 22 is further configured to obtain a room ID and a room number of the next target live broadcast room that needs to be subjected to video preview;
the determining unit 28 is configured to determine, according to the room ID and the room number, coordinate information of the next target live broadcast room that needs to be subjected to video preview on a live broadcast page; determining the coordinates of a video preview layer corresponding to a target live broadcast room with the longest preview duration according to the coordinate information;
the obtaining unit 22 is further configured to obtain, through the network interface, the video stream address of the next target live broadcast room where video preview is required;
the previewing unit 26 is further configured to preview, in a video preview layer corresponding to the target live broadcast room with the longest preview duration, a live broadcast video of the next target live broadcast room that needs to be video previewed based on the video stream address of the next target live broadcast room that needs to be video previewed. Here, the implementation of the preview video is completely the same as the above-described flow, and is not described here again.
In addition, a timer control is further arranged in each video preview layer and used for controlling the display duration of the live video of each live broadcast room, and the general timing duration is set to be about 1 min. And after the preview time reaches the timing duration, automatically closing the corresponding video preview layer and the network interface of the live broadcast room.
It should be noted that, when the video preview layer detects the mouse-in signal again, the timer space in the video preview layer will reset the timing time when the video preview layer does not end.
Here, the determining unit 28 determines, according to the room ID and the room number, the coordinate information of the next target live broadcast room in which video preview is required to be performed on the live broadcast page, and implements the following:
determining abscissa information of a next target live broadcast room needing video preview in the live broadcast page according to a formula (1);
x=index%columnCount*cellWidth (1)
determining the ordinate information of the next target live broadcast room needing video preview in the live broadcast page according to the formula (2);
y=(cellHeight*((index-index%columnCount)/.columnCount))-contentY (2)
the system comprises a room, a columnCount line and a contentY line, wherein x is the horizontal coordinate, y is the vertical coordinate, index is the room serial number, cellWidth is the width of a next target live broadcast room needing video preview, the number of live broadcast rooms in the columnCount line, cellHeight is the height of the next target live broadcast room needing video preview, and contentY.
Colloquially, for example, if the preset preview threshold is 3, live broadcast videos of 3 live broadcast rooms can be previewed simultaneously, the number of the live broadcast rooms currently only previewed is 3, the target live broadcast room with the longest preview duration is a first target live broadcast room, and after a fourth trigger operation signal is received (i.e. the live broadcast video of a fourth live broadcast room is to be previewed), a network interface of the first target live broadcast room is allocated to the fourth live broadcast room, and a room ID and a room serial number of the fourth live broadcast room are obtained through the network interface; determining coordinate information of a fourth live broadcast room on a live broadcast page according to the room ID and the room serial number; determining and modifying the coordinates of the video preview layer corresponding to the first target live broadcast room according to the coordinate information, namely calling the video preview layer corresponding to the first live broadcast room to a fourth live broadcast room for use, and finally acquiring a video stream address of the fourth target live broadcast room through a network interface; and previewing the live video of a fourth target live broadcast room based on the video stream address of the fourth target live broadcast room in the video preview layer corresponding to the first target live broadcast room.
The room sequence number refers to the sequence number of the live broadcast room on the live broadcast page, for example, 9 live broadcast rooms are on the live broadcast page, and the sequence number is similar to a style of a nine-square grid, so that the sequence numbers of the rooms are sequentially arranged from left to right and from top to bottom.
Further, when the live video of the target live broadcast room is watched or previewed based on the video stream address, the room information of the target live broadcast room can be completely displayed in the video preview layer, namely in the preview interface, and the room information can be completely displayed no matter how much. The trigger operation signal may include: a mouse click signal or a mouse move-in signal; namely, when the user directly watches the live video of the target live broadcasting room, the user monitors a mouse click signal; when the user previews the live video of the target live broadcast room, a mouse-in signal is monitored.
The specific implementation process is as follows:
if the trigger operation signal is monitored, acquiring a room ID and a room serial number of a target live broadcast room; here, if the user moves or clicks the mouse to the live broadcast room of the list of rooms, the trigger operation signal is triggered, the trigger operation signal throws out a message, and the room ID and the room number of the target live broadcast room are obtained according to the message thrown out by the trigger operation signal, where the message carries the room ID and the room number of the target live broadcast room. After the room ID and the room serial number of a target live broadcast room are obtained, the room ID and the room subscript of the target live broadcast room are transmitted to a gridView control, and coordinate information of the target live broadcast room in a live broadcast page is determined according to the room ID and the room serial number of the target live broadcast room; the specific implementation process can be obtained according to the above formulas (1) and (2), and will not be described herein again.
And determining a display coordinate value (x, y) of the target live broadcast room according to the coordinate information of the target live broadcast room in the live broadcast page.
The method comprises the steps of acquiring a display coordinate value of a target live broadcast room, setting the display coordinate value in a room information display control, and adjusting the position of a video playing layer in real time by taking the display coordinate value as a reference when a video is previewed or played so that the position of the video playing layer relative to the target live broadcast room is always in a central position.
And then the roomManager object sends a get request to the server through a network interface of the target live broadcast room to acquire the room information of the target live broadcast room, wherein the request carries the room ID of the target live broadcast room. The server returns the room information of the room based on the room ID, and the terminal displays the room information in the video preview layer after receiving the room information. Here, the room information includes: room name, anchor name, room tag information, online population, etc.; the room information is also in json format.
After the terminal receives the room information of the target live broadcast room, the room information is fed back to the room information display control, so that the room information can be displayed in a preview interface of a video preview layer through the room information display control, and the room information can be completely displayed in the preview or viewing interface because the coordinate position of the preview interface relative to the target live broadcast room is always in a central state.
As an optional implementation manner, when the trigger operation signal is detected to be removed, the video preview layer is hidden and the live video of the target live broadcast room is paused to be played.
Based on the same inventive concept, the invention also provides a computer device for video preview, which is specifically referred to as embodiment three.
The present embodiment further provides a computer device for video preview, as shown in fig. 3, the computer device includes: radio Frequency (RF) circuitry 310, memory 320, input unit 330, display unit 340, audio circuitry 350, WiFi module 360, processor 370, and power supply 380. Those skilled in the art will appreciate that the computer device configuration illustrated in FIG. 3 does not constitute a limitation of computer devices, and may include more or fewer components than those illustrated, or some components may be combined, or a different arrangement of components.
The following describes the components of the computer device in detail with reference to fig. 3:
RF circuitry 310 may be used for receiving and transmitting signals, and in particular, for receiving downlink information from base stations and processing the received downlink information to processor 370. In general, the RF circuit 310 includes, but is not limited to, at least one Amplifier, transceiver, coupler, Low Noise Amplifier (LNA), duplexer, and the like.
The memory 320 may be used to store software programs and modules, and the processor 370 may execute various functional applications of the computer device and data processing by operating the software programs and modules stored in the memory 320. The memory 320 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required for at least one function, and the like; the storage data area may store data created according to use of the computer device, and the like. Further, the memory 320 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The input unit 330 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the computer apparatus. Specifically, the input unit 330 may include a keyboard 331 and other input devices 332. The keyboard 331 can collect the input operation of the user thereon and drive the corresponding connection device according to a preset program. The keyboard 331 collects the output information and sends it to the processor 370. The input unit 330 may include other input devices 332 in addition to the keyboard 331. In particular, other input devices 332 may include, but are not limited to, one or more of a touch panel, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
The display unit 340 may be used to display information input by a user or information provided to the user and various menus of the computer device. The Display unit 340 may include a Display panel 341, and optionally, the Display panel 341 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like. Further, the keyboard 331 may cover the display panel 341, and when the keyboard 331 detects a touch operation on or near the keyboard 331, the keyboard 331 transmits the touch event to the processor 370 to determine the type of the touch event, and then the processor 370 provides a corresponding visual output on the display panel 341 according to the type of the input event. Although the keyboard 331 and the display panel 341 are shown in fig. 3 as two separate components to implement input and output functions of the computer device, in some embodiments, the keyboard 331 and the display panel 341 may be integrated to implement input and output functions of the computer device.
Audio circuitry 350, speaker 351, microphone 352 may provide an audio interface between a user and a computer device. The audio circuit 350 may transmit the electrical signal converted from the received audio data to the speaker 351, and the electrical signal is converted into a sound signal by the speaker 351 and output;
WiFi belongs to short-distance wireless transmission technology, and computer equipment can help a user to receive and send e-mails, browse webpages, access streaming media and the like through the WiFi module 360, and provides wireless broadband internet access for the user. Although fig. 3 shows the WiFi module 360, it is understood that it does not belong to the essential constitution of the computer device, and may be omitted entirely as needed within the scope not changing the essence of the invention.
The processor 370 is a control center of the computer device, connects various parts of the entire computer device using various interfaces and lines, performs various functions of the computer device and processes data by operating or executing software programs and/or modules stored in the memory 320 and calling data stored in the memory 320, thereby monitoring the computer device as a whole. Alternatively, processor 370 may include one or more processing units; preferably, the processor 370 may be integrated with an application processor, wherein the application processor primarily handles operating systems, user interfaces, application programs, and the like.
The computer device also includes a power supply 380 (such as a power adapter) for powering the various components, which may preferably be logically connected to the processor 370 through a power management system.
The method, the device and the computer equipment for video preview provided by the embodiment of the invention have the following beneficial effects that:
the invention provides a method for video preview, which is applied to a live broadcast website and comprises the following steps: monitoring whether a triggering operation signal for previewing videos of a target live broadcast room is received or not in a room list layer of a live broadcast page; the live broadcast page comprises a room list layer and a plurality of video preview layers, and when the video preview layers are displayed, the room list layer is in a hidden state; if the trigger operation signal is received, acquiring the number of target live broadcast rooms currently performing video preview; judging whether the number of the target live broadcast rooms currently undergoing video preview exceeds a preset preview threshold value, if not, creating a dynamic preview control for each live broadcast room in a corresponding video preview layer according to the sequence of the trigger operation signals, and acquiring a room ID of each target live broadcast room; generating a corresponding live video preview request based on the room ID of each target live broadcast room, and sending the live video preview request to a server to obtain a video stream address of each target live broadcast room; in a corresponding video preview layer, based on the video stream address of each target live broadcast room, previewing live broadcast videos of a plurality of target live broadcast rooms simultaneously by using corresponding preview controls; therefore, the live broadcast page comprises a room list surface layer and a plurality of video preview layers, the room list surface layer displays all live broadcast rooms, when the live broadcast videos of a plurality of target live broadcast rooms need to be previewed, the mouse is sequentially moved to the target live broadcast rooms, the triggering operation signals of the videos of the plurality of target live broadcast rooms can be received, and the room IDs of the plurality of target live broadcast rooms are obtained; then video stream addresses of a plurality of live broadcast rooms are obtained from the server according to the room ID, the video stream addresses are fed back to the corresponding video preview layers, the video preview layers can respectively play the live broadcast video of each target live broadcast room based on the video stream addresses, and therefore when a user previews the video, the user can simultaneously preview the live broadcast video of the plurality of live broadcast rooms, and whether the previewed live broadcast room is the live broadcast room in which the user is interested can be accurately judged; and because the preview page is always in a central state relative to the live broadcast room, when live broadcast video is previewed, room information can be completely displayed on the preview interface, and better experience can be brought to a user.
The algorithms and displays presented herein are not inherently related to any particular computer, virtual machine, or other apparatus. Various general purpose systems may also be used with the teachings herein. The required structure for constructing such a system will be apparent from the description above. Moreover, the present invention is not directed to any particular programming language. It is appreciated that a variety of programming languages may be used to implement the teachings of the present invention as described herein, and any descriptions of specific languages are provided above to disclose the best mode of the invention.
In the description provided herein, numerous specific details are set forth. It is understood, however, that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be interpreted as reflecting an intention that: that the invention as claimed requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this invention.
Those skilled in the art will appreciate that the modules in the device in an embodiment may be adaptively changed and disposed in one or more devices different from the embodiment. The modules or units or components of the embodiments may be combined into one module or unit or component, and furthermore they may be divided into a plurality of sub-modules or sub-units or sub-components. All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or elements of any method or apparatus so disclosed, may be combined in any combination, except combinations where at least some of such features and/or processes or elements are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Furthermore, those skilled in the art will appreciate that while some embodiments herein include some features included in other embodiments, rather than other features, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments. For example, in the following claims, any of the claimed embodiments may be used in any combination.
The various component embodiments of the invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art will appreciate that a microprocessor or Digital Signal Processor (DSP) may be used in practice to implement some or all of the functionality of some or all of the components of a gateway, proxy server, system according to embodiments of the present invention. The present invention may also be embodied as apparatus or device programs (e.g., computer programs and computer program products) for performing a portion or all of the methods described herein. Such programs implementing the present invention may be stored on a computer-readable storage medium or may be in the form of one or more signals. Such a signal may be downloaded from an internet website or provided on a carrier signal or in any other form.
It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names.
The above description is only exemplary of the present invention and should not be taken as limiting the scope of the present invention, and any modifications, equivalents, improvements, etc. that are within the spirit and principle of the present invention should be included in the present invention.

Claims (10)

1. A method for video preview, which is applied to a live website, and comprises the following steps:
monitoring whether a triggering operation signal for previewing videos of a target live broadcast room is received or not in a room list layer of a live broadcast page; the live broadcast page comprises a room list layer and a plurality of video preview layers, and when the video preview layers are displayed, the room list layer is in a hidden state;
if a plurality of trigger operation signals are received, acquiring the number of target live broadcast rooms currently performing video preview;
judging whether the number of the target live broadcast rooms currently undergoing video preview exceeds a preset preview threshold value, if not, creating a dynamic preview control for each live broadcast room in a corresponding video preview layer according to the sequence of the trigger operation signals, and sequentially acquiring the room ID of each target live broadcast room;
generating a corresponding live video preview request based on the room ID of each target live broadcast room, and sending the live video preview request to a server to obtain a video stream address of each target live broadcast room;
and in the corresponding video preview layer, based on the video stream address of each target live broadcast room, previewing live broadcast videos of a plurality of target live broadcast rooms simultaneously by using the corresponding preview control.
2. The method of claim 1, wherein if the preset preview threshold is exceeded, further comprising:
acquiring a network interface of a target live broadcast room with the longest preview duration;
the network interface is distributed to a next target live broadcast room needing video preview;
acquiring a room ID and a room serial number of the next target live broadcast room needing video preview;
determining coordinate information of the next target live broadcast room needing video preview on a live broadcast page according to the room ID and the room serial number;
determining the coordinates of a video preview layer corresponding to a target live broadcast room with the longest preview duration according to the coordinate information;
acquiring the video stream address of the next target live broadcast room needing video preview through the network interface;
and previewing the live video of the next target live broadcast room needing video preview based on the video stream address of the next target live broadcast room needing video preview in the video preview layer corresponding to the target live broadcast room with the longest preview duration.
3. The method of claim 1 or 2, wherein a timer control is further arranged in the video preview layer, and the timer control is used for controlling the display duration of the live video.
4. The method of claim 1, wherein the obtaining the room ID for each target live room comprises:
and acquiring a room ID of a corresponding target live broadcast room according to the message thrown by each trigger operation signal, wherein the message carries the room ID of the target live broadcast room.
5. The method of claim 1, wherein previewing live video of a plurality of target live rooms simultaneously in a corresponding video preview layer using corresponding preview controls based on a video stream address of each target live room comprises:
acquiring video stream information of each target live broadcast room based on a video stream address of each target live broadcast room;
in a corresponding video preview layer, sequentially loading each piece of video stream information into the corresponding preview player control, playing each piece of video stream information through each preview player control, and simultaneously previewing live video of each target live broadcast room; the preview control is provided with the preview player control.
6. The method of claim 1, wherein room information for the target live room is displayed in its entirety in the video preview layer when the live video of the target live room is played and previewed based on the video stream address.
7. An apparatus for video preview, the apparatus comprising:
the monitoring unit is used for monitoring whether a plurality of trigger operation signals for previewing videos of a target live broadcast room are received in a room list layer of a live broadcast page; the live broadcast page comprises a room list layer and a plurality of video preview layers, and when the video preview layers are displayed, the room list layer is in a hidden state;
the acquisition unit is used for acquiring the number of target live broadcast rooms currently performing video preview when receiving a plurality of trigger operation signals;
the judging unit is used for judging whether the number of the target live broadcast rooms currently performing video preview exceeds a preset preview threshold value;
the creating unit is used for creating a dynamic preview control for each live broadcast room in the corresponding video preview layer according to the sequence of the trigger operation signals and sequentially acquiring the room ID of each target live broadcast room;
the generating unit is used for generating a corresponding live video preview request based on the room ID of each target live broadcast room when the preset preview threshold value is not exceeded, and sending the live video preview request to a server to acquire the video stream address of each target live broadcast room;
and the previewing unit is used for previewing the live videos of the target live broadcasting rooms simultaneously by utilizing the corresponding previewing control based on the video stream address of each target live broadcasting room in the corresponding video previewing layer.
8. The apparatus of claim 7, wherein the apparatus further comprises: a distribution unit and a determination unit; wherein the content of the first and second substances,
the acquisition unit is also used for acquiring a network interface of a target live broadcast room with the longest continuous preview duration when the preset preview threshold is exceeded; acquiring a room ID and a room serial number of a next target live broadcast room needing video preview; acquiring the video stream address of the next target live broadcast room needing video preview through the network interface;
the distribution unit is used for distributing the network interface to a next target live broadcast room needing video preview;
the determining unit is used for determining the coordinate information of the next target live broadcast room needing video preview on a live broadcast page according to the room ID and the room serial number;
determining the coordinates of a video preview layer corresponding to a target live broadcast room with the longest preview duration according to the coordinate information;
the preview unit is further configured to: and previewing the live video of the next target live broadcast room needing video preview based on the video stream address of the next target live broadcast room needing video preview in the video preview layer corresponding to the target live broadcast room with the longest preview duration.
9. A computer-readable storage medium, on which a computer program is stored, which program, when being executed by a processor, is adapted to carry out the method of any one of claims 1 to 6.
10. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the method of any one of claims 1 to 6 when executing the program.
CN201810298031.8A 2018-03-30 2018-03-30 Method and device for video preview and computer equipment Active CN108521598B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810298031.8A CN108521598B (en) 2018-03-30 2018-03-30 Method and device for video preview and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810298031.8A CN108521598B (en) 2018-03-30 2018-03-30 Method and device for video preview and computer equipment

Publications (2)

Publication Number Publication Date
CN108521598A CN108521598A (en) 2018-09-11
CN108521598B true CN108521598B (en) 2020-10-16

Family

ID=63431457

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810298031.8A Active CN108521598B (en) 2018-03-30 2018-03-30 Method and device for video preview and computer equipment

Country Status (1)

Country Link
CN (1) CN108521598B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109905759A (en) * 2019-03-14 2019-06-18 广州华多网络科技有限公司 A kind of list methods of exhibiting, device, equipment and medium applied to Android client

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101358485B1 (en) * 2012-08-13 2014-02-07 한국과학기술원 Method and system for providing time information of interactive broadcasting program using mobile instant messenger
CN103957447A (en) * 2014-05-08 2014-07-30 济南四叶草信息技术有限公司 Multi-window floating playing system
CN104869429A (en) * 2015-05-19 2015-08-26 乐视致新电子科技(天津)有限公司 Video previewing method and apparatus
CN105472437A (en) * 2015-11-24 2016-04-06 广州华多网络科技有限公司 Video playing method and apparatus thereof
CN106534953A (en) * 2016-12-09 2017-03-22 北京小米移动软件有限公司 Video rebroadcasting method for live streaming application and control terminal
CN107333162A (en) * 2017-06-26 2017-11-07 广州华多网络科技有限公司 A kind of method and apparatus for playing live video

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070253677A1 (en) * 2006-04-26 2007-11-01 Kang-Yu Wang System for simultaneous playback of multiple video angles from multimedia content onto a display device and method thereof

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101358485B1 (en) * 2012-08-13 2014-02-07 한국과학기술원 Method and system for providing time information of interactive broadcasting program using mobile instant messenger
CN103957447A (en) * 2014-05-08 2014-07-30 济南四叶草信息技术有限公司 Multi-window floating playing system
CN104869429A (en) * 2015-05-19 2015-08-26 乐视致新电子科技(天津)有限公司 Video previewing method and apparatus
CN105472437A (en) * 2015-11-24 2016-04-06 广州华多网络科技有限公司 Video playing method and apparatus thereof
CN106534953A (en) * 2016-12-09 2017-03-22 北京小米移动软件有限公司 Video rebroadcasting method for live streaming application and control terminal
CN107333162A (en) * 2017-06-26 2017-11-07 广州华多网络科技有限公司 A kind of method and apparatus for playing live video

Also Published As

Publication number Publication date
CN108521598A (en) 2018-09-11

Similar Documents

Publication Publication Date Title
CN104113787B (en) Based on the comment method of program, terminal, server and system
CN102523492B (en) Comment method for interactive comment system, television and mobile terminal
CN102572557B (en) Current device location advertisement distribution method and system
CN103118295B (en) Information processing unit, information processing method, program and information processing system
JP2011523737A (en) Apparatus and method for interacting with multiple forms of information between multiple types of computing devices
US20130254685A1 (en) Seamless browsing between devices
CN102546608B (en) For synchronously playing the method for media information, device, equipment and system
CN105049423B (en) Rights Management System, device and method
CN102244812A (en) Video content recommendation
CN107526610A (en) In the system of equipment upper tube reason application program, method and device
CN105933739A (en) Program interactive system and method, client side and background server
CN108881930B (en) Method and system for presenting gift and electronic equipment
US20120266091A1 (en) Method and apparatus for representing user device and service as social objects
CN108810594A (en) It is a kind of remotely to throw screen method, apparatus and system
CN107257986A (en) Dynamic content shows time adjustment
CN108933948A (en) A kind of video playing progress synchronous method and device
US20110163858A1 (en) Information processing apparatus, information processing method, program, control target device, and information processing system
CN108429918A (en) The method and apparatus of net cast
CN108600848A (en) Smart television and the method for showing content on a user interface
CN102932678A (en) Media content scheduling method, system and device
CN108600817A (en) Smart television and convenient in browse displays equipment apply installation progress method
CN108521598B (en) Method and device for video preview and computer equipment
CN105898596A (en) Display control method and display control device for live webcast room
CN109151517A (en) Shopping centre interactive approach, device, system, storage medium and computer equipment
CN108810602B (en) Method and device for displaying information of live broadcast room and computer equipment

Legal Events

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