Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. However, the exemplary embodiments can be embodied in many different forms and should not be construed as limited to the examples set forth herein, but rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of the exemplary embodiments to those skilled in the art.
Furthermore, the described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the application. One skilled in the relevant art will recognize, however, that the application may be practiced without one or more of the specific details, or with other methods, components, devices, steps, etc. In other instances, well-known methods, devices, implementations, or operations are not shown or described in detail to avoid obscuring aspects of the application.
The block diagrams depicted in the figures are merely functional entities and do not necessarily correspond to physically separate entities. That is, the functional entities may be implemented in software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor devices and/or microcontroller devices.
The flow diagrams depicted in the figures are exemplary only, and do not necessarily include all of the elements and operations/steps, nor must they be performed in the order described. For example, some operations/steps may be decomposed, and some operations/steps may be combined or partially combined, so that the order of actual execution may be changed according to actual situations.
It should be noted that the term "plurality" as used herein means two or more. "and/or" describes the association relationship of the association object, and indicates that there may be three relationships, for example, a and/or B may indicate that there are three cases of a alone, a and B together, and B alone. The character "/" generally indicates that the context-dependent object is an "or" relationship.
Before the detailed description, the terms involved in the present scheme are explained as follows:
hover states are control response states triggered when the cursor moves above a certain control.
And the live window is an area for playing live video on the interface.
And the on-demand window is an area for playing the on-demand video on the interface.
Live broadcasting room refers to a network live program opened by a person or an organization.
Video on demand, namely uploading the video to a background for storage, and downloading and playing the video from the background in real time when the front end initiates a watching signal.
FIG. 1 is a schematic diagram of an implementation environment according to an embodiment of the application. As shown in fig. 1, the implementation environment includes a terminal 110, an on-demand server 120, and a live server 130, and the terminal device 110 may establish a communication connection with the on-demand server 120 and with the live server 130 through a wired or wireless network. The terminal 110 may be, but is not limited to, an electronic device capable of playing video, such as a smart phone, a tablet computer, a notebook computer, a desktop computer, and a smart television.
The terminal 110 may run a video playback application as a client of the video playback application. The terminal 110 may display a video play page therein. In the scheme of the application, an on-demand window 111 and a live broadcast window 112 are arranged in the video playing page, the on-demand window 111 is used for playing on-demand video, and the live broadcast window 112 is used for playing live video streams.
In a specific embodiment, in the video playing page, only the on-demand window 111 may be triggered to play the on-demand video, or only the live broadcast window 112 may be triggered to play the live video stream, or the on-demand window 111 may be triggered to play the on-demand video and the live broadcast window 112 may be triggered to play the live video stream. Therefore, the video-on-demand and live video streams can be selectively played without interface or page switching.
The on-demand server 120 may provide the terminal 110 with a video-on-demand service, for example, if the terminal 110 sends an on-demand video request, the on-demand server 120 may return the requested on-demand video to the terminal 110 according to the on-demand video request, and the terminal 110 correspondingly caches the on-demand video to play the on-demand video in the on-demand window 111 based on the cached on-demand video.
The live broadcast server 130 may provide a live broadcast service for the terminal 110, specifically, when a live broadcast trigger operation is triggered in a video broadcast page of the terminal 110, the terminal 110 initiates a live broadcast video stream request to the live broadcast server 130 according to a target live broadcast address associated with the video broadcast page, the live broadcast server 130 transmits a live broadcast video stream to the terminal 110 correspondingly, and after receiving the live broadcast video stream, the live broadcast video stream is played in the live broadcast window 112. It can be understood that, in the live broadcast process, the live video stream returned by the live broadcast server 130 to the terminal 110 corresponds to the real-time video stream in the live broadcast room, and the live broadcast window 112 also plays the live video stream in real-time.
In the solution of the present application, the on-demand server 120 and the live broadcast server 130 may be independent physical servers, or may be a server cluster or a distributed system formed by a plurality of physical servers, or may be a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network ), and basic cloud computing services such as big data and artificial intelligence platforms.
The implementation details of the technical scheme of the embodiment of the application are described in detail below:
Fig. 2 is a flowchart of a video playing method according to an embodiment of the present application, which may be performed by a computer device having processing capabilities, such as the terminal in fig. 1, and the like, and is not particularly limited herein. Referring to fig. 2, the method at least includes steps 210 to 220, which are described in detail as follows:
Step 210, displaying a video playing page, where the video playing page is provided with an on-demand window and a live broadcast window, and the on-demand window is used for playing the on-demand video.
In the scheme, at least two video players are embedded in the video playing page, wherein one video player corresponds to a video-on-demand window and is used for playing video-on-demand, and one video player corresponds to a live window and is used for playing live video streams.
In some embodiments, a video-on-demand video may be associated with a video-on-demand page, i.e., the page address of the video-on-demand page is the video-on-demand address of the video-on-demand. In this case, the video playing page displayed in step 210 is the playing page of the target video to be played. Correspondingly, the on-demand window in the video playing page is used for playing the on-demand video. The method comprises the steps of presetting page play addresses corresponding to video-on-demand videos at a video server (for example, the video-on-demand server in fig. 1), wherein the page play addresses correspond to video play pages pointing to the video-on-demand videos, so that the page play addresses of the video-on-demand videos are associated with video identifications of the video-on-demand videos, and linking the page play addresses of the video-on-demand videos with display icons corresponding to the video-on-demand videos in a video play client, so that when a user clicks the display icons of the video-on-demand videos, the video play pages of the video-on-demand videos can be accessed based on the page play addresses linked with the display icons.
In some embodiments of the present application, the video playing page may further display video basic information associated with the target video, such as a video name, a video profile, a participant, a director, and the like of the target video. Similarly, the video playing page may further display information of a live broadcast room associated with the video playing page, such as a live broadcast subject, which is not specifically limited herein.
Step 220, if the live broadcast command is obtained, playing the live video stream in the live broadcast window.
In some embodiments of the present application, live broadcast trigger operation detection may be performed in a video play page, and if the live broadcast trigger operation is detected, it is determined that a live broadcast command is obtained.
In some embodiments of the present application, a live trigger area may be set in advance in a video playing page, and a specified operation triggered in the live trigger area may be set as a live trigger operation. The designation operation may be a click operation (e.g., a single click operation, a double click operation, a right click operation of a mouse, a left click of a mouse, etc.), a touch operation, a slide operation, an operation of drawing a designated pattern in a live trigger area, an operation of a cursor in a live trigger area, etc., and is not particularly limited herein.
The live broadcast trigger area may be all areas where live broadcast windows are located in the video playing page, or may be a partial area in the areas where live broadcast windows are located in the video playing page, a set range area surrounding the areas where live broadcast windows are located, other areas except the display area of the live broadcast windows in the video playing page, an area where live broadcast trigger buttons are located, and the like, which are not particularly limited herein.
In some embodiments, the live trigger area may be an area where a live window is located, and the specified operation may be that a cursor of a mouse is located in the area where the live window is located. In this case, if it is detected that the cursor of the mouse is located in the live window, it is confirmed that the live play instruction is acquired. Further, if the cursor of the mouse is detected to be positioned outside the live window, acquiring a live broadcast pause playing instruction is confirmed, and playing of the live broadcast video stream in the live window is correspondingly paused.
Fig. 3 is a schematic display diagram of a live window and an on-demand window in a video playing page according to an embodiment of the present application. As shown in fig. 3, a first area 310 in the video playing page 300 is an area where a video-on-demand window is located, and a second area 320 is an area where a live window is located. In this embodiment, the area defined by the dashed box 330 surrounding the second area 320 is set as a live trigger area, which can be seen to be slightly larger than the second area. When the specified operation is detected in the live broadcast trigger area, the live broadcast trigger operation is determined to be detected, for example, if the cursor is detected to be located in the live broadcast trigger area, the live broadcast trigger operation is determined to be detected, and further, if the cursor is detected not to be located in the live broadcast trigger area, the live broadcast pause operation is determined to be detected, and the live broadcast video stream is correspondingly stopped to be played.
The video playing page shown in fig. 3 may be a Web page or a client page, which is not specifically limited herein. It should be noted that the setting positions, window sizes, window shapes, etc. of the on-demand window and the live window in the video playing page shown in fig. 3 are merely exemplary examples, and are not to be construed as limiting the scope of use of the present solution.
In some embodiments of the present application, in the video playing page, if the live broadcast instruction is not acquired, the content displayed in the live broadcast window may be text content, or may be image content, where the text content is, for example, live broadcast introduction information of the associated live broadcast room, and the image content is, for example, live broadcast preview image of the live broadcast room, a picture local to the client, a preconfigured picture, and the like, and is not limited herein specifically. After the live broadcast playing instruction is acquired, the content displayed in the live broadcast window is correspondingly replaced by the live broadcast video stream due to the need of playing the live broadcast video stream.
In some embodiments of the present application, if a live broadcast command is obtained, a live broadcast video stream request is correspondingly performed to a live broadcast server, and a live broadcast video stream is correspondingly played in real time in a live broadcast window. As shown in fig. 4, step 220 further includes:
Step 410, in response to the live broadcast command, a live broadcast video stream request is initiated to the live broadcast server according to the target live broadcast address. Step 420, receiving a live video stream returned by the live video server according to the live video stream request. And step 430, playing the received live video stream in the live window.
In some embodiments, the target live address may be a live address associated with a video playback page. And at the on-demand server, storing the page address of the video playing page in association with the live broadcast address, wherein the live broadcast address stored in association with the page address of the video playing page is the live broadcast address associated with the video playing page.
The live address (i.e., target live address) associated with the video playing page indicates a pulling address of the video stream in the live broadcasting server side in the corresponding live broadcasting room, so that in the live broadcasting process, the corresponding live broadcasting video stream can be requested to the corresponding live broadcasting server according to the live broadcasting address. After the client acquires the live broadcast playing instruction, the client initiates a live broadcast video stream request to the live broadcast server according to a target live broadcast address associated with the video playing page where the client is currently located, and based on the live broadcast video stream request, the live broadcast server can correspondingly push the live broadcast video stream to the client where the video playing page where the target broadcast video is located in real time so as to display the live broadcast video stream in the live broadcast window until the live broadcast pause playing instruction is acquired or until the live broadcast is stopped in a live broadcast room corresponding to the target live broadcast address.
In some embodiments of the present application, the on-demand server may acquire live information from the live server, where the live information may include a live subject, a live content introduction, and a live address of a live room in a current time period, so that the on-demand server may select a target live room from the live rooms in the current time according to the acquired live information live room screening, and associate the target live address of the target live room with a video playing page of the target on-demand video, so that after the terminal acquires the video playing page of the target on-demand video, the terminal may correspondingly determine the target live room associated with the video playing page of the target on-demand video.
In other embodiments of the present application, the on-demand server may further obtain live broadcast forecast information from the live broadcast server, where the live broadcast forecast information may include a live broadcast theme, a live broadcast content introduction, a live broadcast room identifier, and so on, so that the on-demand server may screen a live broadcast room according to the live broadcast forecast information, select a target live broadcast room, and associate a target live broadcast address of the target live broadcast room with a video playing page of the target broadcast video.
In some embodiments, the on-demand server may screen the live broadcast room with the same content classification as the target on-demand video associated with the video playing page as the target live broadcast room, for example, if the target on-demand video associated with the video playing page is a XX basketball game video, the content classified as a basketball game, the live broadcast room with the live broadcast content classified as the basketball game may be selected as the target live broadcast room. Of course, in other embodiments, the target live broadcast room may be selected and determined based on other principles, such as the number of people in the live broadcast room, and the like, which is not specifically limited herein.
In a specific embodiment, the on-demand server may store the page address of the video playing page of the on-demand video in association with the live broadcast address of the target live broadcast room, so that after the client requests the video playing page of the on-demand video, the associated live broadcast address is correspondingly issued to the client, or when the user triggers a live broadcast triggering operation on the video playing page, the client responds to the live broadcast triggering operation to perform a live broadcast request to the on-demand server, the on-demand server obtains the target live broadcast address stored in association with the current video playing page, and initiates a live broadcast video stream request to the live broadcast server based on the target live broadcast address, so that the live broadcast server returns a live broadcast video stream to the client.
It can be understood that the live broadcasting rooms opened at different time points and the live broadcasting contents carried out by each live broadcasting room are different, and the live broadcasting information and the live broadcasting forecast information obtained by the on-demand server from the live broadcasting server are correspondingly different, so that the on-demand server correspondingly carries out live broadcasting room screening again according to the live broadcasting information (or the live broadcasting forecast information) obtained from the live broadcasting server, and updates the live broadcasting address associated with the video playing page of the on-demand video. Thus, at different points in time, the live room that is entered from the video play page of the target on-demand video may be different for the client. The on-demand server updates the live broadcast address associated with the video playing page of each on-demand video according to the live broadcast information acquired from the live broadcast server, so that the live broadcast room in which the video playing page of the on-demand video enters is ensured to be the live broadcast room in which live broadcast is being performed, and user experience is improved.
In some embodiments of the present application, the on-demand server may further combine the historical play record of the client user, the user interest tag, and other live broadcast information to pertinently perform live broadcast room screening on the client user, where the live broadcast room with the same type of the live broadcast content as the historical play content of the client user or matched with the user interest tag of the client user is used as the target live broadcast room. In this case, the on-demand server may store the live-broadcast room identifier or live-broadcast address of the target live-broadcast room determined by the screening in association with the user identifier of the client user. Thus, after receiving a page request initiated by the client (the page request is used for requesting a video playing page of a target live broadcast video), the video playing page is configured according to a live broadcast room identifier or a live broadcast address stored in association with a user identifier of the client user, so as to display content related to the target live broadcast room, such as live broadcast profile information, live broadcast preview images and the like of the target live broadcast room, in the video playing page.
In some embodiments of the present application, the target live broadcasting room screened and determined by the on-demand server may be one or more, and in the case that there are a plurality of target live broadcasting rooms, a live broadcasting list may be further displayed in a video playing page of the target live broadcasting video, where the live broadcasting list is used to display information of the plurality of target live broadcasting rooms, and the user may select one target live broadcasting room from the live broadcasting list, so as to play a live video stream of the target live broadcasting room selected by the user in the live broadcasting window.
In some embodiments of the present application, the live video stream includes a designated live video segment, the designated live video segment is a live video segment of a live room associated with a video playing page in a marked time period, in this embodiment, before step 220, the method further includes determining that a live play instruction is acquired if the designated live video segment actively pushed by the live server is received, wherein the live server actively pushes the designated live video segment corresponding to the marked time period to the live window upon detecting that the live time is located in the marked time period, in this embodiment, step 220 further includes playing the designated live video segment in the live window in response to the live play instruction.
Under the condition that the video playing page is associated with the target live address, as the target live address uniquely points to one live room, the live room indicated by the target live address associated with the video playing page is the live room associated with the video playing page.
In some embodiments of the present application, in the live broadcast process, an operator may perform time period marking according to the live broadcast progress, where the marked time period may be a high-energy stage in the live broadcast room or a time period corresponding to the key content. The operator marks the time period of the corresponding live broadcasting room according to the live broadcasting progress, and the method can also be called as the operator dotting. The marked time period is the marked time period, and the corresponding live video segment generated in the marked time period by the live broadcasting room is the designated live video segment. In a specific embodiment, in an operation client of the live broadcast application, a time period marking option may be displayed, based on the time period marking option, an operator may select a period from a current time to a time after the current time as the high-energy phase, and correspondingly, the selected period from the current time to the time after the current time is the marked time period. For example, if the live content in the live broadcast room is basketball game live broadcast, if the current time is 20 minutes 15 seconds (the time may be the live time length in the live broadcast room), the operator may mark 20 minutes 15 seconds to 23 minutes as the high-energy stage, and the corresponding time period of 20 minutes 15 seconds to 23 minutes is the marked time period.
And then the client side where the operator is located sends marking information indicating the marked time period to the live broadcast server side, so that the live broadcast server side actively pushes the appointed live broadcast video clip in the marked time period to the on-demand client side associated with the live broadcast room when detecting that the current live broadcast time of the corresponding live broadcast room is located in the marked time period. And correspondingly, playing the appointed live fragment by a live window in the video playing page of the target video.
In some embodiments of the present application, an active intervention button is provided at a client where an operator is located for a live broadcasting room, if the operator is located at the client where the active intervention button is turned on, and indication information indicating that the active intervention button is turned on is sent to a live broadcasting server, so that the live broadcasting server, after receiving marking information sent by the operator client, according to the indication information, if it is detected that a current live broadcasting time of a corresponding live broadcasting room is located in a marked time period, actively pushes a specified live broadcasting segment in the marked time period to a live broadcasting client associated with the live broadcasting room, so as to automatically trigger a live broadcasting window in the live broadcasting client to play the specified live broadcasting segment.
Fig. 5 is a flowchart of automatically triggering a live broadcast window according to an embodiment of the present application, and as shown in fig. 5, the method specifically includes a step 510 of clicking a live broadcast room by a live broadcast room operator, a step 520 of starting an "active intervention" control button by an operation client, a step 530 of actively issuing a designated live broadcast segment in a marked time period by a live broadcast server, a step 540 of receiving the designated live broadcast segment by the client, and a step 550 of automatically playing the designated live broadcast segment by the live broadcast window.
In this embodiment, the live broadcast server may actively push the live video stream to the client where the video playing page of the target on-demand video is located when detecting that the current live broadcast time is located in the marked time period, and play the live video stream in the marked time period in the live broadcast window, so that a user can conveniently learn important video segments in the live broadcast room.
In the scheme of the application, the video-on-demand window for playing the video-on-demand and the live window for playing the live video stream are arranged in the video-on-demand playing page, so that the video-on-demand and live video streams can be selectively watched by a user in the same video-on-demand playing page without switching the page or switching the application, or simultaneously opening the video-on-demand playing page for playing the video-on-demand and the live video page for playing the live video stream, thereby improving the video playing efficiency, facilitating the user to watch the live video stream while watching the video-on-demand, meeting the diversified requirements of the user and improving the user experience.
In the related art, if a user needs to conveniently switch between watching an on-demand video and a live video, the user needs to firstly open the page of the on-demand video and the page of the live video, and adjust the page of the on-demand video and the page of the live video, so that the page of the on-demand video and the page of the live video can be displayed in a display screen at the same time, and further, the on-demand video and/or the live video can be selectively watched.
For video-on-demand, the video-on-demand server stores video files of the video-on-demand, so that after the video-on-demand server receives a first request for the video-on-demand initiated by the client, the video-on-demand server sends the video files of the video-on-demand to the client, and after the video files of the video-on-demand are received, the client caches the video files of the video-on-demand, and plays the video-on-demand according to the video files of the cached video-on-demand. Thus, in the case where the video playback page is a playback page of the on-demand video, in order to play the on-demand video in the on-demand window, as shown in fig. 6, the method further includes:
step 610, request video files of the target on-demand video from the on-demand server.
Step 620, receiving the video file of the target video returned by the on-demand server, and caching the video file.
Furthermore, even if the video-on-demand window is triggered to pause playing of the video, the client still requests the video file of the video-on-demand from the on-demand server and caches the video file obtained by the request to the local client, so that when the video-on-demand needs to be played, the video-on-demand based on the cached video-on-demand can be played continuously. It can be understood that the playing may be continued from the progress position of the last paused playing, and if the user triggers the progress skip operation, the user skips to the new progress position to play.
For live video, after receiving a live video stream request, the live video server sends live video streams to the client in real time, and displays the live video streams in real time in a live window, and if a live pause instruction is obtained, the client pauses to request the live video streams from the live video server.
Further, in some embodiments of the present application, after step 620, the method further includes playing the on-demand video in the on-demand window according to the cached video file if the on-demand play pause instruction is not acquired during playing the live video stream in the live window.
In this embodiment, the live window and the on-demand window in the video playing page can play the video at the same time, so that the user can watch the on-demand video and the live video stream as required, without performing page switching or application switching.
Fig. 7 is a schematic diagram of a video playback interface according to an embodiment of the present application. In the video playing interface 700 shown in fig. 7, video playing is performed simultaneously in the on-demand window 111 and the live window 112, that is, the on-demand window 111 plays the on-demand video, and the live window 112 plays the live video stream of the corresponding live room.
Fig. 8 is a flowchart illustrating video playback in a live window and an on-demand window according to an embodiment of the present application. Specifically, FIG. 8A shows a flow chart of video playback in the on-demand window, as shown in FIG. 8A, including step 811, on-demand playback activation. In a specific embodiment, an on-demand play button may be set in the video play page, and if the user triggers the on-demand play button, the on-demand play button is switched to Hover states, and it is determined that an on-demand play instruction is obtained.
Step 812, requesting the on-demand server to issue the video file of the on-demand video, step 813, detecting whether the on-demand window is paused, if yes, executing step 814, and if no, executing step 817, wherein the on-demand window plays the on-demand video.
Step 814, the on-demand window pauses the playing, step 815, detecting whether to close the video playing page, if yes, step 816 is executed, if not, step 818 is executed, and after the on-demand video is downloaded, the on-demand server is paused to request to issue the video file of the on-demand video.
In step 816, the pause request on-demand server issues the video file of the on-demand video.
Fig. 8B shows a flowchart of video playing in a live window, as shown in fig. 8B, after detecting that the live playing is not activated, the video playing is performed in the live window according to the following steps, including:
Step 821, detecting whether the cursor is located in the region of the live window, if yes, executing step 822, and if no, repeating step 821. And if the cursor is detected to be positioned in the area where the live broadcast window is positioned, confirming that the live broadcast triggering operation is detected.
Step 822, requesting a live video stream from a live server.
Step 823, playing the live video stream in real time in the live window.
Step 824, it is detected whether the cursor moves out of the region where the live window is located, if yes, step 825 is executed, and if no, step 822 is executed. And if the cursor is detected to move out of the area where the live broadcast window is located, confirming that the live broadcast pause operation is detected.
In step 825, the live window pauses playback.
In this embodiment, it is realized that the video on demand and the live video stream can be played simultaneously in the same video playing page, and the playing of the video on demand does not affect the playing state (playing or pausing) of the live video stream, and the playing of the live video stream also does not affect the playing (playing or pausing) of the video on demand, and the playing of the video on demand and the playing of the live video stream can be individually controlled, so that the user can conveniently control the video playing according to actual needs, and user experience is improved.
In some embodiments of the present application, as shown in fig. 9, the method further includes a step 910 of obtaining volume information of a live broadcast window and volume information of an on-demand window in response to a live broadcast command, wherein the target broadcast window is at least one of the live broadcast window and the on-demand window, and a step 920 of adjusting the volume in the target broadcast window according to the volume information of the on-demand window and the volume information of the live broadcast window, so that the volume in the on-demand window after adjustment is lower than the volume in the live broadcast window.
In the solution of this embodiment, the volume in the live window may be adjusted only, or the volume in the on-demand window may be adjusted only, or the volume in the live window and the on-demand window may be adjusted at the same time, so that the volume in the on-demand window after adjustment is lower than the volume in the live window. Of course, if the volume indicated by the acquired volume information of the live window is higher than the volume indicated by the volume information of the on-demand window, no volume adjustment may be performed.
In some embodiments of the present application, a first volume range for the live window and a second volume range for the on-demand window may be preset, where the volume in the first volume range is higher than the volume in the second volume range, and if the volume indicated by the volume information in the live window is acquired to be lower (e.g., lower than the minimum volume in the first volume range) and the volume indicated by the volume information in the on-demand window is acquired to be higher (e.g., higher than the maximum volume in the first volume range), the volume in the live window may be adjusted to the first volume range, and/or the volume in the on-demand window may be adjusted to the second volume range.
In a specific scene, if a user triggers a live video playing operation, the live video stream in a live broadcasting room is indicated to be focused by the user currently, therefore, in the case, the volume in the on-demand window and/or the live broadcasting window is adjusted according to the live broadcasting instruction, so that the volume in the on-demand window after adjustment is lower than the volume in the live broadcasting window, thereby avoiding the influence of the overhigh volume in the on-demand window on the audio in the live broadcasting window, and improving the watching experience of the user.
In some embodiments of the present application, the target playing window includes an on-demand window, and as shown in fig. 9, after step 920, the method further includes step 930 of restoring the volume in the on-demand window to the volume before adjustment in response to the live pause playing instruction if the live pause playing instruction is obtained.
In some embodiments, the live pause playing instruction may be generated according to a live pause playing operation triggered by a user in the video playing interface, where the live pause playing operation, for example, the user triggers a live pause triggering area in the video playing interface, and the live pause triggering area may be a display area where a live pause button is located, or may be a preset area in a live window, which is not specifically limited herein.
And under the scene that the live broadcast server actively pushes the designated live broadcast video clips in the marked time period to the client, if the client receives the designated live broadcast video clips and does not receive the live broadcast video stream pushed by the live broadcast server at a first set time interval, the client confirms that the live broadcast pause playing instruction is acquired.
In this embodiment, after the volume in the on-demand window is adjusted in response to the live broadcast playing instruction, the volume in the on-demand window is restored to the volume before adjustment according to the live broadcast pause playing instruction, so that the volume in the on-demand window can be automatically restored to the volume before adjustment, without the need for the user to manually adjust the volume in the on-demand window again, and the on-demand window can be quickly restored to the state before adjustment.
In some embodiments, only the volume of the on-demand window may be adjusted in step 920, and correspondingly, in step 930, only the volume in the on-demand window is restored to the volume before adjustment.
In some embodiments, if the volume in the on-demand window and the live window is adjusted in step 920, after the live pause playing instruction is acquired, the volume in the on-demand window may be restored to the volume before adjustment, instead of restoring the volume in the live window to the volume before adjustment, or the volume in the on-demand window may be restored to the volume before adjustment, and the volume in the live window may be restored to the volume before adjustment.
In some embodiments, if only the volume in the live window is adjusted in step 920, after the live pause playing command is acquired, the volume in the live window may be restored to the volume before adjustment, or the volume in the live window may not be restored to the volume before adjustment.
In some embodiments of the application, the method further comprises the steps of acquiring display size information of the live window in the video playing interface if the live playing instruction is acquired, and increasing the display size of the live window in the video playing page according to the display size information of the live window in the video playing interface.
The display size information indicates the size of the region in which the live window is located in the video playback interface. In a specific embodiment, the first display size range may be preset, and if the display size indicated by the display size information of the live window is located in the first display size range, the display size of the live window may not be adjusted. If the obtained display size information indicates that the display size of the live window in the video playing interface is lower than the minimum size value in the first display size range, the display size of the live window in the video playing page can be increased, so that after the display size of the live window in the video playing interface is increased, the display size of the live window in the video playing interface is located in the first display size range, and the viewing experience of a user for viewing the live video stream can be improved due to the fact that the display size of the live window in the video playing interface is increased.
In some embodiments, the display range of the first display size may be set in combination with the display size of the on-demand window in the video playing interface, that is, the display area of the live broadcast window defined by the maximum display size defined by the first display size does not interfere with the display area where the on-demand window is located in the video playing page.
In some embodiments of the present application, in order to avoid interference between an area where a live window is located and an area where a video-on-demand window is located in a video playing interface after the live window is enlarged, before the display size of the live window in the video playing interface is enlarged, the display size of the live window may be adjusted by combining the display size information of the video-on-demand window in the video playing interface. In a specific embodiment, if the display size of the on-demand window in the video playing interface is determined, the display size of the on-demand window in the video playing interface can be reduced while the display size of the live window in the video playing interface is increased.
In some embodiments of the present application, the second display size range may be preset, and if the display size indicated by the obtained display size information of the live window is lower than the minimum size value in the first display size range and the display size indicated by the obtained display size information of the on-demand window in the video playing interface is greater than the maximum value in the second display size range, not only the display size of the live window is increased according to the first display size range, but also the display size of the on-demand window in the video playing interface is reduced according to the second display size range, so that the display size of the reduced on-demand window in the video playing interface is located in the second display size range. Of course, if the display size indicated by the obtained display size information of the on-demand window in the video playing interface is not greater than the maximum value in the second display size range, the display size of the on-demand window may not be adjusted.
In some embodiments, in order to ensure that after the display size (display size of the live window and/or the on-demand window) is adjusted, the display area where the live window is located does not interfere with the display area where the on-demand window is located, the display area indicated by the maximum display size defined by the set first display size range does not interfere with the display area indicated by the maximum display size defined by the second display size range in the video playing page.
In some embodiments of the present application, a first display position of the live window in the video playing interface may be preset, where the first display position may be a position indicating a position reference point corresponding to the live window, one or more position reference points may be located, and the position reference point corresponding to the live window may be a vertex on an outer edge of the live window or a center point corresponding to the live window, which is not specifically limited herein. Accordingly, the live broadcast window with the increased display size is displayed in the video playing interface according to the first display position. The first display position may be the same as or different from the display position of the live window when the live playing operation is not triggered in the video playing interface, and is not specifically limited herein. Similarly, a second display position of the on-demand window may be preset, so that the on-demand window with the reduced display size is displayed on the video playing interface according to the second display position. The second display position may be the same as or different from the display position of the on-demand window when the live broadcast operation is not triggered in the video playing interface, and may be specifically set according to actual needs.
Fig. 10 is a schematic diagram of displaying a live window in a video playing page before and after adjustment according to an embodiment of the present application. Fig. 10A shows a display schematic of the live window and the on-demand window in the video play page before the adjustment, and fig. 10B shows a display schematic of the live window and the on-demand window in the video play page after the display size adjustment. As shown in fig. 10B, compared with the adjustment (corresponding to fig. 10A), according to the acquired display size information of the on-demand window 111 and the acquired display size information of the live window 112 in the video playing page, the display size of the on-demand window 111 in the video playing page is reduced, and the display size of the live window 112 in the video playing page is increased.
In some embodiments of the present application, after increasing the display size of the live window in the video playing page according to the display size information of the live window in the video playing interface, the method further includes, if the live pause playing instruction is acquired, responding to the live pause playing instruction, and restoring the display size of the live window in the video playing page to the display size indicated by the display size information before the increase.
It can be understood that if the display size of the on-demand window is also adjusted during the process of increasing the display size of the live window in the video playing page, the display size of the on-demand window is also restored to the display size before adjustment in response to the live pause playing command.
In this embodiment, the display size of the live window in the video playing page is automatically restored to the display size before the live window is enlarged according to the live pause playing instruction, and the user does not need to manually adjust the display size of the live window or the on-demand window, so that the user can conveniently watch the video in the on-demand window.
It can be understood that after the live broadcast playing instruction is acquired, only the volume in the live broadcast window and/or the on-demand window can be adjusted, or only the display size of the live broadcast window and/or the on-demand window can be adjusted, or the volume in the live broadcast window and/or the on-demand window can be adjusted, or the display size of the live broadcast window and/or the on-demand window can be adjusted.
In some embodiments of the present application, during the process of playing the live video stream in the live window and playing the target video in the on-demand window, the user may selectively pause playing the live window or pause playing the video in the on-demand window as required. In this case, the playing state in the live broadcast window and the playing state in the on-demand window can be controlled independently, the playing state in one playing window is not affected by the playing state in the other playing window, and the user can flexibly trigger and control the playing and pause in the live broadcast window and the on-demand window according to actual needs.
In some embodiments of the present application, if the on-demand window is in a play state when the live broadcast command is acquired, the on-demand window may also be controlled to pause playing, and the live video stream is played only in the on-demand window, so as to avoid the influence on the user's viewing of the live video stream due to the playing of the on-demand video in the on-demand window. Further, after the live video stream is played in the live window, if the live play pause instruction is obtained, the on-demand window can be automatically triggered to replay the target on-demand video. Therefore, video playing is carried out by only one playing window in the live window and the on-demand window at the same time, and the influence on video watching experience of a user is avoided.
In some embodiments of the present application, after step 210, the method further includes requesting, from the live server, a live preview image associated with the target live address at a preset time interval if the live play command is not acquired, and displaying the live preview image in the live window.
The live preview image is a video frame selected from a live video stream in the live room indicated by the target live address, and is associated with the target live address because the live preview image is a video frame in a live video stream in the live room indicated by the target live address, i.e., the live preview image originates from a video stream in the live room indicated by the target live address.
Because the live broadcast server receives live broadcast video streams pushed by the main broadcast client in real time, live broadcast preview images acquired from the live broadcast server for the same live broadcast room at different times are different. In other words, after the client acquires the live broadcast preview image returned by the live broadcast server according to the preset time interval, the image displayed in the live broadcast window is correspondingly replaced by the currently acquired live broadcast preview image. In this embodiment, since live preview images of a corresponding live broadcast room are acquired according to a preset time interval and updated and displayed in a live broadcast window, a user is facilitated to know progress in the live broadcast room according to the updated and displayed live preview images.
In some embodiments of the present application, the client directly displays the live preview image after acquiring the live preview image requested from the live server, or displays the live preview image according to an operation triggered by a user.
In some embodiments of the present application, after step 220, the method further includes stopping requesting the live video stream from the live room associated with the video playing page if the live pause playing instruction is acquired, and displaying the live preview image last requested from the live server in the live window.
In some embodiments of the application, the method further comprises displaying live introduction information in a live window of the video playing page, and switching the live introduction information displayed in the live window to a live preview image in response to a first operation triggered in the video playing page.
In this embodiment, the live introduction information of the text is initially displayed in the live window, where the live introduction information includes information such as a live topic name, a live introduction, a number of viewers in the live room, whether the live is finished, and if the content that is broadcast in the live room is a sports game, for example, the live introduction information may include information such as a game name, a competitor name of the game, and a current score. It can be understood that if the live introduction information includes information that needs to be updated in real time, the client correspondingly makes an information request to the live introduction server, so as to update the live introduction information, for example, for live introduction of a game, if the live introduction information includes score of a competitor, the client requests score information of the competitor to the server according to a set time interval because the score is continuously updated.
If a first operation triggered by a user is detected in the video playing interface, the live broadcast introduction information displayed in the live broadcast window is replaced by the latest acquired live broadcast preview image correspondingly in response to the first operation.
In some embodiments of the present application, a display area in a video playing page may be set as a first trigger area, and if a first operation is detected in the first trigger area, the live broadcast introduction information displayed in the live broadcast o-window is correspondingly switched to a live broadcast preview image. The first trigger area may be a part or all of the display area in which the live introduction information of the live window is located, or may be a display area outside the live window, for example, if a preview image display trigger button is provided in the video playing page, the area in which the preview image display trigger button is located may be regarded as the first trigger area. The first operation may be a single click, a double click, a touch, a left mouse click, a right mouse click, an operation of moving a cursor into the first trigger area, etc., and is not particularly limited herein.
In some embodiments of the present application, after step 220, the method further includes stopping requesting the live video stream from the live room associated with the video playback page and displaying the live presentation information of the text in the live window if the live pause play instruction is acquired.
In the video playing page of the target video, a user can switch the live broadcast introduction information displayed in the live broadcast window to display a live broadcast preview image according to actual needs, so that the user can know the progress of the live broadcast room through the live broadcast preview image conveniently, and compared with the live broadcast introduction information with characters, the image form is more vivid and vivid to express the progress in the live broadcast room, and the diversified watching requirements of the user can be met.
Fig. 11A-11B are schematic diagrams illustrating switching of content display in a live window according to a specific embodiment of the present application. In this embodiment, the content that is directly broadcast by the direct broadcast room associated with the video playing interface is a sports match. Fig. 11A shows a schematic diagram of displaying live introduction information in a live window, where, as shown in fig. 11A, a display area where the live window is located includes a first display area 1110 and a second display area 1120, and the first display area 1110 displays live introduction information, specifically includes a game name "XX basketball team I vs II team", watching number information "56734 people in a live room", live progress information "video live", game progress information "section 4", remaining game time information "06:36", score information "105:108" of an on-spot game, identification information (including an icon and a name) of both parties of the game, and a history winning or losing situation (I team win 2, II win 1 in fig. 11A). In this embodiment, the first display area 1110 may be a first trigger area, so that if a first specified operation, such as a cursor moving into the first display area 1110, is detected in the first display area 1110, it may be regarded as triggering the live preview image display trigger operation, so that the content of the live window is switched to display the live preview image shown in fig. 11B. In a specific embodiment, the first trigger area may include a plurality of first trigger areas, for example, in this embodiment, the first trigger area may include, in addition to the first display area 1110, a display area where a member button in the video playing page is located, or other display areas in the video playing page, which is not specifically limited herein.
The second display area 1120 in fig. 11A is a button area, which is a "back live room" button, and if the second display area 1120 is triggered (e.g., clicked, double clicked, the cursor moves into the area, touched, etc.), it may be determined that a live play trigger operation is detected, so that a live video stream of the corresponding live room may be correspondingly requested from the live server, and live introduction information displayed in the live window may be switched to display the live video stream.
Fig. 11B shows a schematic diagram of displaying a live preview image in a live broadcast window, as shown in fig. 11B, a display area of the live broadcast window still includes a first display area 1110 and a second display area 1120, in fig. 11B, the second display area 1110 displays the live broadcast preview image, the second display area 1120 is a button area, and is a "back live room" button, if the second display area 1120 is triggered (for example, clicked, double clicked, a cursor moves into the area, touched, etc.), it may be determined that a live broadcast triggering operation is detected, so that a live broadcast video stream of a corresponding live room may be requested from a live broadcast server, and the live broadcast preview image displayed in the live broadcast window may be switched to display a live broadcast video stream. As can be seen from comparing fig. 11A and 11B, the second display region 1120 transitions to a solid region upon switching to fig. 11B. It can be understood that if the live broadcast window is always in a state of displaying live broadcast preview images, the live broadcast preview images displayed in the live broadcast window are dynamically updated according to new live broadcast preview images acquired from the live broadcast server.
In the embodiment, the display content in the live broadcast window can be switched among the live broadcast introduction information, the live broadcast preview image and the live broadcast video stream of the text, so that the diversified requirements of users can be met, and the users can switch the display content in the live broadcast window according to actual requirements.
The following describes embodiments of the apparatus of the present application that may be used to perform the methods of the above-described embodiments of the present application. For details not disclosed in the embodiments of the apparatus of the present application, please refer to the above-described method embodiments of the present application.
Fig. 12 is a block diagram of a video playing apparatus according to an embodiment of the present application, and as shown in fig. 12, the video playing apparatus includes a display module 1210 configured to display a video playing page, where the video playing page is provided with an on-demand window and a live window, the on-demand window is configured to play an on-demand video, and a live playing module 1220 configured to play a live video stream in the live window if a live playing instruction is acquired.
In some embodiments of the present application, the live broadcast playing module 1220 includes a live video stream requesting unit configured to initiate a live video stream request to a live broadcast server according to a target live broadcast address in response to a live broadcast playing instruction, a live video stream receiving unit configured to receive a live video stream returned by the live broadcast server according to the live video stream request, and a live video stream playing unit configured to play the received live video stream in a live broadcast window.
In some embodiments of the application, the video playing device further comprises a live preview image requesting unit for requesting a live preview image associated with a target live address from a live server according to a preset time interval if a live playing instruction is not acquired, and a live preview image display unit for displaying the live preview image in a live window.
In some embodiments of the application, the video playing device further comprises a live introduction information display unit for displaying live introduction information in a live window of the video playing page, and a switching unit for switching the live introduction information displayed in the live window into a live preview image in response to a first operation triggered in the video playing page.
In some embodiments of the present application, the video playing apparatus further includes a first determining unit, configured to determine that the live broadcast instruction is acquired if it is detected that the cursor of the mouse is located in the live broadcast window.
In other embodiments of the application, the live video stream comprises a designated live video segment, the designated live video segment is a live video segment of a live room associated with a video playing page in a marked time period, the video playing device further comprises a second determining unit, if the designated live video segment actively pushed by a live server is received, determining to acquire a live playing instruction, wherein the live server actively pushes the designated live video segment corresponding to the marked time period to a live window when detecting that the live time is located in the marked time period, and the live playing module is further configured to play the designated live video segment in the live window in response to the live playing instruction.
In some embodiments of the application, the video playing device further comprises a volume information acquisition module for responding to the live broadcast instruction to acquire volume information of the live broadcast window and volume information of the on-demand window, and a volume adjustment module for adjusting the volume in the target playing window according to the volume information of the on-demand window and the volume information of the live broadcast window so that the volume in the on-demand window after adjustment is lower than the volume in the live broadcast window, wherein the target playing window is at least one playing window of the live broadcast window and the on-demand window.
In some embodiments of the present application, the target playing window comprises an on-demand window, and the video playing device further comprises a first resuming module, configured to resume the volume in the on-demand window to the volume before adjustment in response to the live pause playing instruction if the live pause playing instruction is acquired.
In some embodiments of the application, the video playing device further comprises a display size information acquisition module for acquiring display size information of the live window in the video playing interface if the live playing instruction is acquired, and a display size increasing module for increasing the display size of the live window in the video playing page according to the display size information of the live window in the video playing interface.
In some embodiments of the present application, the video playing apparatus further includes a second resuming module, configured to, if the live pause playing instruction is acquired, resume the display size of the live window in the video playing page to the display size indicated by the display size information before the increase in response to the live pause playing instruction.
In some embodiments of the present application, the video playing apparatus further includes a video file request module for requesting a video file of the video on demand from the on demand server, and a video file receiving module for receiving the video file of the video on demand returned by the on demand server and buffering the video file.
In some embodiments of the present application, the video playing apparatus further includes an on-demand playing module, configured to play the on-demand video in the on-demand window according to the cached video file if the on-demand play pause instruction is not acquired during the playing of the live video stream in the live window.
Fig. 13 shows a schematic diagram of a computer system suitable for use in implementing an embodiment of the application.
It should be noted that, the computer system 1300 of the electronic device shown in fig. 13 is only an example, and should not impose any limitation on the functions and the application scope of the embodiments of the present application.
As shown in fig. 13, the computer system 1300 includes a central processing unit (Central Processing Unit, CPU) 1301, which can perform various appropriate actions and processes, such as performing the method in the above-described embodiment, according to a program stored in a Read-Only Memory (ROM) 1302 or a program loaded from a storage portion 1308 into a random access Memory (Random Access Memory, RAM) 1303. In the RAM 1303, various programs and data required for the system operation are also stored. The CPU1301, ROM1302, and RAM 1303 are connected to each other through a bus 1304. An Input/Output (I/O) interface 1305 is also connected to bus 1304.
Connected to the I/O interface 1305 are an input section 1306 including a keyboard, a mouse, and the like, an output section 1307 including a Cathode Ray Tube (CRT), a Liquid crystal display (Liquid CRYSTAL DISPLAY, LCD), and the like, and a speaker, and the like, a storage section 1308 including a hard disk, and the like, and a communication section 1309 including a network interface card such as a LAN (Local Area Network) card, a modem, and the like. The communication section 1309 performs a communication process via a network such as the internet. The drive 1310 is also connected to the I/O interface 1305 as needed. Removable media 1311, such as magnetic disks, optical disks, magneto-optical disks, semiconductor memory, and the like, is installed as needed on drive 1310 so that a computer program read therefrom is installed as needed into storage portion 1308.
In particular, according to embodiments of the present application, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present application include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flowcharts. In such embodiments, the computer program may be downloaded and installed from a network via the communication portion 1309 and/or installed from the removable medium 1311. When executed by a Central Processing Unit (CPU) 1301, performs various functions defined in the system of the present application.
It should be noted that, the computer readable medium shown in the embodiments of the present application may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of a computer-readable storage medium may include, but are not limited to, an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-Only Memory (ROM), an erasable programmable read-Only Memory (Erasable Programmable Read Only Memory, EPROM), a flash Memory, an optical fiber, a portable compact disc read-Only Memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present application, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, etc., or any suitable combination of the foregoing.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. Where each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units involved in the embodiments of the present application may be implemented by software, or may be implemented by hardware, and the described units may also be provided in a processor. Wherein the names of the units do not constitute a limitation of the units themselves in some cases.
As another aspect, the present application also provides a computer-readable storage medium that may be included in the electronic device described in the above embodiment, or may exist alone without being incorporated into the electronic device. The computer readable storage medium carries computer readable instructions which, when executed by a processor, implement the method of any of the above embodiments.
According to an aspect of the present application there is also provided an electronic device comprising a processor, a memory having stored thereon computer readable instructions which, when executed by the processor, implement the method of any of the embodiments described above.
According to an aspect of embodiments of the present application, there is provided a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions to cause the computer device to perform the method of any of the embodiments described above.
It should be noted that although in the above detailed description several modules or units of a device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functions of two or more modules or units described above may be embodied in one module or unit in accordance with embodiments of the application. Conversely, the features and functions of one module or unit described above may be further divided into a plurality of modules or units to be embodied.
From the above description of embodiments, those skilled in the art will readily appreciate that the example embodiments described herein may be implemented in software, or may be implemented in software in combination with the necessary hardware. Thus, the technical solution according to the embodiments of the present application may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (may be a CD-ROM, a U-disk, a mobile hard disk, etc.) or on a network, and includes several instructions to cause a computing device (may be a personal computer, a server, a touch terminal, or a network device, etc.) to perform the method according to the embodiments of the present application.
Other embodiments of the application will be apparent to those skilled in the art from consideration of the specification and practice of the embodiments disclosed herein. This application is intended to cover any variations, uses, or adaptations of the application following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the application pertains.
It is to be understood that the application is not limited to the precise arrangements and instrumentalities shown in the drawings, which have been described above, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the application is limited only by the appended claims.