CN116647706A - Media content playing method, device, computer equipment and storage medium - Google Patents

Media content playing method, device, computer equipment and storage medium Download PDF

Info

Publication number
CN116647706A
CN116647706A CN202310374409.9A CN202310374409A CN116647706A CN 116647706 A CN116647706 A CN 116647706A CN 202310374409 A CN202310374409 A CN 202310374409A CN 116647706 A CN116647706 A CN 116647706A
Authority
CN
China
Prior art keywords
playing
song
client
media content
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310374409.9A
Other languages
Chinese (zh)
Inventor
廖志勤
顾清波
黄卫宁
孙锐坤
陈超邦
陈健翔
李敏惠
宗泽
廖翠英
林树侨
李跃铖
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Quyan Network Technology Co ltd
Original Assignee
Guangzhou Quyan 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 Guangzhou Quyan Network Technology Co ltd filed Critical Guangzhou Quyan Network Technology Co ltd
Priority to CN202310374409.9A priority Critical patent/CN116647706A/en
Publication of CN116647706A publication Critical patent/CN116647706A/en
Pending legal-status Critical Current

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/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/21Server components or server architectures
    • H04N21/218Source of audio or video content, e.g. local disk arrays
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/21Server components or server architectures
    • H04N21/218Source of audio or video content, e.g. local disk arrays
    • H04N21/2187Live feed
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/239Interfacing the upstream path of the transmission network, e.g. prioritizing client content requests
    • H04N21/2393Interfacing the upstream path of the transmission network, e.g. prioritizing client content requests involving handling client requests
    • 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/437Interfacing the upstream path of the transmission network, e.g. for transmitting client requests to a VOD server
    • 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/438Interfacing the downstream path of the transmission network originating from a server, e.g. retrieving MPEG packets from an IP network

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Databases & Information Systems (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The present application relates to a media content playing method, apparatus, computer device, storage medium and computer program product. The method comprises the following steps: detecting a push state of a target live stream in a target live broadcasting room; the target live broadcast room is a live broadcast room for playing media content; the target live stream comprises a data stream sent by at least one first client in the target live room for playing the media content; under the condition that the push state meets the preset play mode switching condition, sending a play mode switching instruction to each second client in the target live broadcasting room; the play mode switching instruction is used for instructing each second client to synchronously play the media content based on the locally stored media content resources. By adopting the method, the stability of playing the media content in the live broadcasting room can be improved.

Description

Media content playing method, device, computer equipment and storage medium
Technical Field
The present application relates to the field of internet technologies, and in particular, to a media content playing method, apparatus, computer device, storage medium, and computer program product.
Background
With the continuous development of internet technology, more and more user accounts acquire or share media content meeting daily demands through a live room function provided by a live platform.
In the related technology, a main broadcasting client in a living broadcasting room can push a living broadcasting stream containing media content to a spectator client in the living broadcasting room in a mode of playing the media content so as to realize the function of playing the media content in the living broadcasting room; however, the anchor client often encounters some unexpected situations, for example, abnormal operation of the client, poor network environment of the client, and off-line of the account on the wheat, and these unexpected situations often make the live broadcasting room unable to smoothly play the media content, so that the stability of playing the media content in the live broadcasting room is not high.
Accordingly, the related art has a problem in that the stability of playing media contents in a live room is not high.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a media content playing method, apparatus, computer device, computer readable storage medium, and computer program product that enable a live room to play media content with stability.
In a first aspect, the present application provides a method for playing media content, the method comprising:
detecting a push state of a target live stream in a target live broadcasting room; the target live broadcasting room is a live broadcasting room for playing media content; the target live stream comprises a data stream sent by at least one first client in the target live room for playing the media content;
Sending a play mode switching instruction to each second client in the target live broadcasting room under the condition that the push state meets the preset play mode switching condition; the play mode switching instruction is used for indicating each second client to synchronously play the media content based on the locally stored media content resources.
In one embodiment, the media content includes songs, and the sending the play mode switching instruction to each second client in the target live room includes: generating song playing information; the song playing information comprises song identification information and playing progress information of a target song; the target song comprises a song played by the first client or a next song in a preset play list of the song played by the first client; sending a playing mode switching instruction containing the song playing information to each second client; and each second client is used for playing the target song based on the locally stored song resources according to the song identification information and the playing progress information.
In one embodiment, after the step of sending a play mode switching instruction to each second client in the target live room, the method further includes: responding to the received playing state report message, and executing playing timing operation aiming at the target song; the playing state report message is a message sent by the second client for playing the target song based on the locally stored song resources first; recording a play starting time stamp corresponding to the play timing operation; the starting playing time stamp is used for synchronizing the playing progress of the target song.
In one embodiment, after the step of sending a play mode switching instruction to each second client in the target live room, the method further includes: responding to a request of a third client to enter the target live broadcasting room, and sending a song playing indication message containing the playing starting time stamp to the third client; the song playing indication message is used for indicating the third client to determine the current playing progress of the target song according to the playing starting time stamp, and the target song is played from the current playing progress based on locally stored song resources.
In one embodiment, the first client includes a hosting client, and the detecting a push state of a target live stream in a target live room includes: acquiring a playing state of the media content played by the anchor client; and under the condition that the playing state characterizes that the anchor client side interrupts playing the media content, determining that the push state meets the playing mode switching condition.
In one embodiment, the obtaining the playing state of the media content played by the anchor client includes: receiving at least one heartbeat message; the heartbeat message is a message sent by the anchor client according to a preset time interval in the process of playing the media content; and under the condition that the heartbeat message is not received any more in the preset waiting time, determining that the playing state represents that the anchor client side interrupts playing the media content.
In one embodiment, the first client further includes a microphone client, and the detecting a push state of the target live stream in the target live room includes: taking the wheat-based client side playing the media content as a current wheat-based client side, and acquiring the playing state of the current wheat-based client side playing the media content; detecting whether the next on-wheat client plays the media content under the condition that the playing state characterizes that the current on-wheat client interrupts playing the media content; the next wheat-based client is the wheat-based client after the current wheat-based client is sequenced in the playing sequence; and under the condition that the next on-wheat client plays the media content, determining that the push state meets the play mode switching condition.
In a second aspect, the present application further provides a method for playing media content, where the method includes:
responding to access operation of a target live broadcast room, and playing a target live broadcast stream of the target live broadcast room; the target live broadcasting room is a live broadcasting room for playing media content; the target live stream comprises a data stream sent by at least one playing client in the target live room for playing the media content;
Responding to a received play mode switching instruction, and playing the media content based on a locally stored media content resource; the play mode switching instruction is sent by the server under the condition that the push state of the target live stream meets the preset play mode switching condition.
In one embodiment, the media content includes songs, and playing the media content based on locally stored media content resources in response to the received play mode switching instruction includes: obtaining song playing information in the playing mode switching instruction; the song playing information comprises song identification information and playing progress information of a target song; the target song comprises a song played by the playing client or a next song in a preset play list of the song played by the playing client; and playing the local song resources of the target song according to the song identification information and the playing progress information.
In one embodiment, the playing the local song resource of the target song according to the song identification information and the playing progress information includes: under the condition that the fact that the song resources corresponding to the song identification information are not stored locally is detected, a resource downloading request corresponding to the song identification information is sent to a song resource server; storing the target song resources returned by the song resource server to the local, and obtaining local song resources of the target song; and playing the local song resources of the target song according to the playing progress information.
In one embodiment, the playing the local song resource of the target song according to the playing progress information includes: determining a playing starting time stamp corresponding to the target song according to the playing progress information; acquiring a current time stamp of a client, and determining a current playing progress according to the deviation between the current time stamp and the playing starting time stamp; and starting to play the target song from the current playing progress based on the local song resources.
In one embodiment, the method further comprises: receiving a time stamp synchronization instruction; the time stamp synchronization instruction is an instruction sent by the server in response to a triggering condition of synchronizing the time stamp of the client; executing a timestamp synchronization operation in response to the timestamp synchronization instruction; the timestamp synchronization operation is used to correct a current timestamp of the client.
In a third aspect, the present application also provides a media content playing device, where the device includes:
the detection module is used for detecting the push state of the target live stream in the target live broadcasting room; the target live broadcasting room is a live broadcasting room for playing media content; the target live stream comprises a data stream sent by at least one first client in the target live room for playing the media content;
The switching module is used for sending a play mode switching instruction to each second client in the target live broadcasting room under the condition that the push state meets the preset play mode switching condition; the play mode switching instruction is used for indicating each second client to synchronously play the media content based on the locally stored media content resources.
In a fourth aspect, the present application also provides a media content playing device, including:
the system comprises a pulling and playing module, a pulling and playing module and a receiving module, wherein the pulling and playing module is used for responding to the access operation of a target live broadcast room and playing the target live broadcast stream of the target live broadcast room; the target live broadcasting room is a live broadcasting room for playing media content; the target live stream comprises a data stream sent by at least one playing client in the target live room for playing the media content;
the local playing module is used for responding to the received playing mode switching instruction and playing the media content based on the locally stored media content resources; the play mode switching instruction is sent by the server under the condition that the push state of the target live stream meets the preset play mode switching condition.
In a fifth aspect, the present application also provides a computer device. The computer device comprises a memory and a processor, the memory storing a computer program which, when executed by the processor, implements the steps of the media content playing method described above.
In a sixth aspect, the present application also provides a computer readable storage medium. The computer readable storage medium has stored thereon a computer program which, when executed by a processor, implements the steps of the media content playing method described above.
In a seventh aspect, the present application also provides a computer program product. The computer program product comprises a computer program which, when executed by a processor, implements the steps of the media content playing method described above.
The media content playing method, apparatus, computer device, storage medium and computer program product described above, by detecting a push state of a target live stream in a target live room for playing media content; the target live stream comprises a data stream sent by at least one first client in the target live room for playing media content; sending a play mode switching instruction to each second client in the target live broadcasting room under the condition that the push state meets the preset play mode switching condition so as to instruct each second client to synchronously play the media content based on the locally stored media content resources; therefore, the server can effectively control each second client to be rapidly switched from a pulling stream playing mode based on the target live stream to a local playing mode based on locally stored media content resources to synchronously play the media content by the playing mode switching instruction under the condition that the target live stream does not exist in the live broadcast room due to unexpected situations such as abnormal operation, poor network environment, downloading and the like of the client responsible for sharing the media content in the live broadcast room, so that the target live broadcast room can play the media content uninterruptedly, and the stability of playing the media content in the live broadcast room is effectively improved.
Drawings
FIG. 1 is an application environment diagram of a media content playback method in one embodiment;
FIG. 2 is a flowchart of a method for playing media content according to one embodiment;
FIG. 3 is a flowchart of a method for playing media content according to another embodiment;
FIG. 4 is a flowchart of another method for playing media content according to one embodiment;
FIG. 5 is a block diagram of a media content playback apparatus according to one embodiment;
FIG. 6 is a block diagram of a media content playback apparatus according to one embodiment;
FIG. 7 is an internal block diagram of a server in one embodiment;
fig. 8 is an internal structural diagram of a client in one embodiment.
Detailed Description
The present application will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present application more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
First, nouns involved in embodiments of the present disclosure are described:
live broadcast: it means that the user views the media in real time on different live platforms through the network, and the media content of the media is generated or uploaded by the host in real time. Users can communicate with the anchor in real time by sending messages such as barrages, comments and the like, and the method is an emerging network social mode.
Live broadcast is an emerging network social way, and users can watch different types of live broadcast on the terminal through different live broadcast platforms (i.e. live broadcast application programs). An input box exists on an interface of the live broadcast application program, a user sends a barrage or comment to a host by inputting information such as characters, numbers or expressions into the input box, and the host communicates with a user watching live broadcast in real time by reading the barrage or comment. The audience user can also perform a viewing operation on the anchor, wherein the viewing operation is performed in a form of giving cash to the anchor or giving a virtual gift representing a certain cash amount to the anchor, each anchor corresponds to a contribution list, the contribution list comprises a contribution value of a user watching live broadcast of the anchor to the anchor, and the contribution value is a value obtained by converting the virtual gift which is appreciated by the user to the anchor; the anchor may also send a virtual gift (e.g., a red envelope carrying a certain amount of money, a coupon, a lottery, etc.) in response to the user viewing the live broadcast.
The media content playing method provided by the embodiment of the application can be applied to an application environment shown in fig. 1. Wherein the first client 102 and the second client 106 communicate with the server 104 via a network. The data storage system may store data that the server 104 needs to process. The data storage system may be integrated on the server 104 or may be located on a cloud or other network server. In practical application, the server 104 detects a push state of a target live stream in a target live broadcasting room; the target live broadcast room is a live broadcast room for playing media content; the target live stream includes a data stream sent by at least one first client 102 in the target live room playing the media content; the server 104 sends a play mode switching instruction to each second client 106 in the target live broadcasting room when the push state meets a preset play mode switching condition; the play mode switching instruction is configured to instruct each second client 106 to synchronously play the media content based on the locally stored media content resource. The server 104 may be implemented as a stand-alone server or a server cluster including a plurality of servers.
In one embodiment, as shown in fig. 2, a method for playing media content is provided, and the method is applied to the server in fig. 1 for illustration, and includes the following steps:
step S202, detecting a push state of a target live stream in a target live broadcasting room.
Wherein the target live room is a live room for playing media content.
Wherein the media content may be, but is not limited to, various songs, short videos, long videos, movies, etc.
Wherein the target live stream comprises a data stream transmitted by at least one first client in the target live room playing the media content.
The first client is a client where a user account sharing media content is located. In practical applications, the first client may refer to a client where a main account of the live broadcasting room is located (i.e. a main broadcasting client), and a client where a wheat-top account of the live broadcasting room is located (a wheat-top client). In practical applications, the on-wheat client may refer to any one or more combinations of a client where a link-wheat host account is located or a client where a link-wheat viewer account is located in a living room.
Meanwhile, the first client can receive live broadcasting room audio and video data stored by the streaming media server from the streaming media server. The first client has the function of audio and video data collection, and the first client can include, but is not limited to, a computer device. The computer device may be, but not limited to, various personal computers, notebook computers, smart phones, tablet computers, internet of things devices and portable wearable devices, and the internet of things devices may be smart speakers, smart televisions, smart vehicle devices and the like. The portable wearable device may be a smart watch, smart bracelet, headset, or the like.
The push state may be used to characterize a state in which the first client pushes the target live stream to the live service platform. It should be noted that, the detailed process of detecting the push state of the target live stream in the target live broadcast room will be further described below, and will not be described in detail here.
In a specific implementation, taking a first client as a hosting client as an example, when a hosting user account needs to share media content (for example, share a certain song) through the target live broadcast room, the hosting user account can control the hosting client to play the media content; the anchor client can acquire data streams generated in the process of playing media content by the anchor client through the audio and video data acquisition function; and the anchor client sends the acquired data stream to the live broadcast service platform as a target live broadcast stream.
In this way, the client side (audience client side) where the audience account in the target live broadcasting room is located can pull the target live broadcasting stream from the live broadcasting service platform, and play the media content shared by the main broadcasting user account by adopting a mode of playing the target live broadcasting stream. In practical applications, the mode in which the viewer client plays the media content based on the target live stream may be named as a pull stream play mode.
Meanwhile, the server monitors the state that the anchor client pushes the target live stream to the live broadcast service platform, and obtains a push state aiming at the target live stream. In practical application, the anchor client can send a report message to the server according to a preset time interval in the process of pushing the target live stream to the live service platform. The server can determine the push state aiming at the target live stream according to the receiving condition of the report message.
Of course, the server may also determine the push state of the target live stream by listening to the network environment of the anchor client. In practical applications, the push state may be, but not limited to, a normal state, an abnormal state, an end state, and the like. Among other things, the abnormal state may include an interrupted state, an unstable state, and the like. For example, in the case that the server monitors that the network environment of the anchor client does not meet the preset network condition, the server may determine that the push state is an unstable state. For another example, in the case that the server does not receive the report message of the anchor client for more than a preset time, the server may determine that the push state is an interrupt state.
Step S204, when the push state meets the preset play mode switching condition, sending a play mode switching instruction to each second client in the target live broadcasting room.
The play mode switching condition may refer to a trigger condition indicating that each second client switches the play mode.
The playing mode switching instruction is used for indicating each second client to synchronously play the media content based on the locally stored media content resources. The second client is a client where a user account for obtaining the media content is located. In practical applications, the second client may refer to a client (i.e., a viewer client) where a viewer account of the living room is located. Where a viewer account may refer to a user account listening to or viewing the media content.
The media content resource may refer to a file resource corresponding to the media content. Taking a song as an example, the media content resource may refer to an audio file, such as an MP3 file, corresponding to the song.
In a specific implementation, in the process of detecting the push state of the target live stream, the server may determine whether the push state of the target live stream meets a preset play mode switching condition, for example, the server may determine whether the push state of the target live stream is in a normal state.
When the server detects that the push state of the target live stream is not a normal state, for example, detects that the push state of the target live stream is an interrupt state, an unstable state, or the like, the server determines that the push state of the target live stream satisfies a trigger condition (i.e., a play mode switching condition) indicating that each viewer client switches a play mode.
And the server responds to the push state to meet the play mode switching condition, and sends a play mode switching instruction to each audience client in the target live broadcast room so as to instruct each audience client to synchronously play the media content based on the locally stored media content resources.
Specifically, after receiving the play mode switching instruction, each viewer client can determine whether the media content resource corresponding to the media content is locally stored. Under the condition that the local storage of each audience client side is detected to have the media content resources corresponding to the media content, each audience client side synchronously plays the media content based on the media content resources.
Under the condition that the local storage of the media content resources corresponding to the media content is detected, each audience client can download the media content resources corresponding to the media content from a resource server (CDN, content distribution network) to the local storage, and synchronously play the media content based on the mode of playing the media content resources. In practical applications, the mode in which the viewer client plays the media content based on the locally stored media content resources may be named as a local play mode.
In the media content playing method, the push state of the target live stream in the target live broadcasting room for playing the media content is detected; the target live stream comprises a data stream sent by at least one first client in the target live room for playing media content; sending a play mode switching instruction to each second client in the target live broadcasting room under the condition that the push state meets the preset play mode switching condition so as to instruct each second client to synchronously play the media content based on the locally stored media content resources; therefore, the server can effectively control each second client to be rapidly switched from a pulling stream playing mode based on the target live stream to a local playing mode based on locally stored media content resources to synchronously play the media content by the playing mode switching instruction under the condition that the target live stream does not exist in the live broadcast room due to unexpected situations such as abnormal operation, poor network environment, downloading and the like of the client responsible for sharing the media content in the live broadcast room, so that the target live broadcast room can play the media content uninterruptedly, and the stability of playing the media content in the live broadcast room is effectively improved.
In another embodiment, the media content comprises songs, and sending a play mode switching instruction to each second client in the target live room comprises: generating song playing information; the song playing information comprises song identification information and playing progress information of a target song; the target song comprises a song played by the first client or a next song in a preset play list of the song played by the first client; sending a playing mode switching instruction containing song playing information to each second client; and each second client is used for playing the target song based on the locally stored song resources according to the song identification information and the playing progress information.
In a specific implementation, when the media content includes songs, the server may generate song playing information in a process of sending a playing mode switching instruction to each second client in the target live broadcast room; wherein the song playing information includes song identification information and playing progress information of the target song. Specifically, after determining that the push state of the target live stream meets the play mode switching condition, the server may determine a song ID and a start play time corresponding to the target song, and generate song play information based on the song ID and the start play time corresponding to the target song. The target song may refer to a song played by the first client or a next song in a preset playlist. Wherein the preset playlist may refer to a recommended song playlist.
After the server generates the song playing information, the server may send a playing mode switching instruction containing the song playing information to each second client, so as to instruct each second client to play the target song based on the locally stored song resources according to the song identification information and the playing progress information. Specifically, the second client may parse the play mode switching instruction to determine the song play information issued by the server. Then, the second client may acquire a local song resource of the target song based on the song identification information in the song playing information and store the local song resource in the local.
And then, the second clients can play the local song resources of the target song based on the playing progress information in the song playing information, so that the control of switching the streaming playing mode of playing the media content based on the target live stream to the local playing mode of synchronously playing the media content based on the locally stored media content resources by each second client is realized.
According to the technical scheme, the playing mode switching instruction containing the song playing information is sent to each second client side, so that each second client side plays the target song according to the song identification information and the playing progress information based on the locally stored song resources, the second client side can continuously and synchronously play the target song by adopting the local playing mode, the aim that the target live broadcasting room can continuously play the song is achieved, and the stability of playing the song in the live broadcasting room is effectively improved.
In another embodiment, after the step of sending the play mode switching instruction to each second client in the target live room, the method further includes: responding to the received playing state report message, and executing playing timing operation aiming at the target song; the playing state report message is a message sent by a second client for playing the target song based on the locally stored song resources; recording a play starting time stamp corresponding to the play timing operation; the start play time stamp is used to synchronize the play progress of the target song.
In a specific implementation, after the server sends a play mode switching instruction to each second client in the target live broadcast room, the server can respond to the received play state reporting message to execute play timing operation for the target song; the play status report message is a message sent by the second client for playing the target song based on the locally stored song resources.
Specifically, when a certain second client first starts playing the target song based on the locally stored song resource, the second client sends a playing status report message to the server to inform the server that the second client starts playing the target song. Once the server receives a playing state report message, the server executes playing timing operation aiming at the target song; the server records a play starting time stamp corresponding to the play timing operation; the start play time stamp is used to synchronize the play progress of the target song.
According to the technical scheme, the playing timing operation for the target song is executed by responding to the received playing state report message, and the playing starting time stamp corresponding to the playing timing operation is recorded, so that the second client can accurately determine the current playing progress of the target song by utilizing the deviation between the local current time stamp and the playing starting time stamp, and the target song can be synchronously played based on the current playing progress.
In another embodiment, after the step of sending the play mode switching instruction to each second client in the target live room, the method further includes: responding to a request of the third client to enter a target live broadcasting room, and sending a song playing indication message containing a playing starting time stamp to the third client; the song playing indication message is used for indicating the third client to determine the current playing progress of the target song according to the starting playing time stamp, and the target song is played from the current playing progress based on the locally stored song resources.
In a specific implementation, after the server sends a play mode switching instruction to each second client in the target live broadcast room, the server may send a song play instruction message including a play start time stamp to the third client in response to a request from the third client to enter the target live broadcast room, so as to instruct the third client to determine a current play progress of the target song according to the play start time stamp, and play the target song from the current play progress based on locally stored song resources.
In particular, the third client may determine a start play time stamp for the target song. The third client may obtain the current timestamp and determine a deviation between the current timestamp and the start play timestamp. The third client may determine the current playing progress of the target song according to the deviation. Finally, the client starts playing the target song from the current playing progress based on the local song resources.
According to the technical scheme, the third client which subsequently enters the target live broadcasting room can be realized, and the current playing progress of the target song can be accurately determined by utilizing the deviation between the local current time stamp and the starting playing time stamp, so that the third client can synchronously play the song with the second client.
In another embodiment, the first client includes a hosting client, and detecting a push state of a target live stream in the target live room includes: acquiring a playing state of media content played by a host client; and under the condition that the playing state characterizes that the anchor client interrupts playing of the media content, determining that the push state meets the playing mode switching condition.
In a specific implementation, under the condition that the first client comprises a main broadcasting client, in the process of detecting the push state of a target live broadcast stream in a target live broadcasting room, the server can acquire the play state of the main broadcasting client for playing media content; the server may then determine whether the play status characterizes the anchor client interrupting playing the media content; and under the condition that the playing state characterizes that the anchor client side interrupts playing the media content, the server determines that the push state meets the playing mode switching condition.
Specifically, the server monitors the playing state of the media content played by the anchor client, and the server can control the heartbeat message sent to the server by the anchor client according to a preset time interval in the process of playing the media content; the server may determine, based on the receipt of the heartbeat message, whether the play status characterizes that the anchor client interrupts playing the media content.
According to the technical scheme, the playing state of the media content played by the anchor client is obtained, and under the condition that the playing state characterizes the anchor client to interrupt playing of the media content, the push state is determined to meet the playing mode switching condition, so that under the condition that no target live stream exists in the live broadcasting room, the second clients are effectively controlled to continuously and synchronously play the media content based on locally stored media content resources through the playing mode switching instruction, and the target live broadcasting room can continuously play the media content.
In another embodiment, obtaining a play status of a media content played by a hosting client includes: receiving at least one heartbeat message; the heartbeat message is a message sent according to a preset time interval in the process of playing the media content by the anchor client; and under the condition that the heartbeat message is not received any more in the preset waiting time, determining that the playing state represents that the media content is interrupted to be played by the anchor client.
In a specific implementation, in the process of acquiring the playing state of the media content played by the anchor client, the anchor client sends a heartbeat message to the server according to a preset time interval in the process of playing the media content, for example, the anchor client sends a piece of heartbeat message to the server every 1 second, so as to inform the server that the anchor client is normally playing the media content at present to perform streaming. If the server does not receive the heartbeat message any more within a preset waiting period (for example, 2 seconds), the server determines that the playing state of the anchor client indicates that the anchor client interrupts playing the media content.
According to the technical scheme, by monitoring the heartbeat message generated in the process of playing the media content by the anchor client, the playing state of playing the media content by the anchor client is effectively detected, so that the second clients are conveniently controlled to switch the media content playing mode in time to continuously and synchronously play the media content under the condition that the anchor client is detected to interrupt playing of the media content, and the media content is continuously played by the target living room.
In another embodiment, the first client further includes a microphone client, and detecting a push state of a target live stream in the target live room includes: taking the wheat-based client side playing the media content as a current wheat-based client side, and acquiring the playing state of the current wheat-based client side playing the media content; under the condition that the playing state represents that the current on-wheat client side interrupts playing the media content, detecting whether the next on-wheat client side plays the media content or not; the next wheat-based client is a wheat-based client which is sequenced after the current wheat-based client in the playing sequence; and under the condition that the next on-wheat client plays the media content, determining that the push state meets the play mode switching condition.
In a specific implementation, when the first client includes a microphone client, the server may use the microphone client that is playing the media content as the current microphone client in a process of detecting a push state of the target live stream in the target live broadcasting room, so as to obtain a playing state of playing the media content by the current microphone client. The principle that the server obtains the playing state of the media content played by the current on-wheat client is the same as the principle that the server obtains the playing state of the media content played by the anchor client, and the description is omitted here.
The server detects whether the next on-wheat client plays the media content or not under the condition that the play state is determined to represent that the current on-wheat client interrupts playing the media content; the next on-wheat client is the on-wheat client whose play order is ordered after the current on-wheat client.
And under the condition that the server determines that the next on-wheat client plays the media content, the next on-wheat client plays the media content so as to push the target live stream to the live broadcast service platform, and each second client still plays the media content in a pull stream playing mode.
And under the condition that the server determines that the next on-wheat client plays the media content, the server determines that the push state meets the play mode switching condition and subsequently controls each second client to continue playing the media content by adopting the local play mode.
According to the technical scheme, the wheat-top client side playing the media content is used as the current wheat-top client side, and the playing state of the current wheat-top client side playing the media content is obtained; and under the condition that the playing state characterizes that the current on-wheat client side interrupts playing of the media content and the next on-wheat client side does not exist, determining that the push state meets the playing mode switching condition, accurately detecting whether the first client side pushing the target live stream exists in the target live broadcasting room or not, conveniently and accurately controlling the playing mode of the media content of the second client side, and ensuring that the target live broadcasting room can play the media content uninterruptedly.
In another embodiment, as shown in fig. 3, a method for playing media content is provided, and the method is applied to the server in fig. 1 for illustration, and includes the following steps:
step S302, receiving at least one heartbeat message; the heartbeat message is a message sent according to a preset time interval in the process of playing the media content by the anchor client.
Step S304, determining that the playing state characterizes the media content is interrupted by the anchor client under the condition that the heartbeat message is not received any more in the preset waiting time.
Step S306, under the condition that the playing state characterizes that the anchor client side interrupts playing the media content, song playing information is generated; the song playing information comprises song identification information and playing progress information of a target song; the target song includes a song played by the first client or a next song in a preset playlist of songs played by the first client.
Step S308, sending a playing mode switching instruction containing song playing information to each audience client; and each audience client is used for playing the target song based on the locally stored song resources according to the song identification information and the playing progress information.
Step S310, in response to the received play status report message, performing play timing operation for the target song; the play status report message is a message sent by the audience client that plays the target song based on the locally stored song resources first.
Step S312, recording a play starting time stamp corresponding to the play timing operation; the start play time stamp is used to synchronize the play progress of the target song.
In step S314, in response to the request of the viewer client to enter the target live broadcasting room, a song playing instruction message including a playing start time stamp is sent to the viewer client to instruct the viewer client to determine the current playing progress of the target song according to the playing start time stamp, and play the target song from the current playing progress based on the locally stored song resources.
It should be noted that, the specific limitation of the above steps may be referred to the specific limitation of a media content playing method, which is not described herein.
In one embodiment, as shown in fig. 4, another media content playing method is provided, and the method is applied to a viewer client in a target living room for illustration, and includes the following steps:
step S402, in response to the access operation to the target live broadcast room, playing the target live broadcast stream of the target live broadcast room; the target live broadcast room is a live broadcast room for playing media content; the target live stream includes a data stream sent by at least one playback client in the target live room to play the media content.
Step S404, responding to the received playing mode switching instruction, and playing the media content based on the locally stored media content resource; the play mode switching instruction is sent by the server when the situation that the push state of the target live stream meets the preset play mode switching condition is detected.
It should be noted that, the specific limitation of the steps and the playing client in the steps may be referred to the specific limitation of a media content playing method, which is not described herein.
According to the media content playing method, the push state of the target live stream in the target live broadcasting room for playing the media content is detected; the target live stream comprises a data stream sent by at least one playing client in the target live room for playing media content; sending a play mode switching instruction to each audience client in the target live broadcasting room under the condition that the push state meets the preset play mode switching condition so as to instruct each audience client to synchronously play the media content based on the locally stored media content resources; therefore, the server can effectively control each audience client to rapidly switch from a pulling stream playing mode based on the target live stream to a local playing mode based on locally stored media content resources to synchronously play the media content by the playing mode switching instruction under the condition that the target live stream does not exist in the live broadcast room due to unexpected situations such as abnormal operation, poor network environment, downloading and the like of the client responsible for sharing the media content in the live broadcast room, so that the target live broadcast room can play the media content uninterruptedly, and the stability of playing the media content in the live broadcast room is effectively improved.
In another embodiment, the media content comprises songs, and playing the media content based on locally stored media content assets in response to receiving the play mode switch instruction comprises: obtaining song playing information in a playing mode switching instruction; the song playing information comprises song identification information and playing progress information of a target song; and playing the local song resources of the target song according to the song identification information and the playing progress information.
The target song comprises a song played by the playing client or a next song in a preset play list.
In a specific implementation, when the media content includes a song, the audience client can analyze the play mode switching instruction to determine song play information issued by the server in a process of responding to the received play mode switching instruction and playing the media content based on the locally stored media content resource. Then, the audience client can acquire local song resources of the target song based on song identification information in the song playing information and store the local song resources to the local; and then, the audience clients can play the local song resources of the target songs based on the playing progress information in the song playing information, so that the audience clients are effectively controlled to switch from a streaming playing mode for playing the media content based on the target live stream to a local playing mode for synchronously playing the media content based on the locally stored media content resources based on the playing mode switching instruction.
It should be noted that, the steps of playing the local song resources of the target song according to the song identification information and the playing progress information will be further limited hereinafter, and will not be described herein.
According to the technical scheme, the target song which needs to be played by the local playing mode at the moment of the client side of the audience is accurately determined by responding to the received playing mode switching instruction and utilizing the song playing information carried by the playing mode switching instruction, so that the client side of the audience can continuously play the song based on the locally stored song resources, the aim that the song can be continuously played in the live broadcasting room is achieved, and the stability of playing the song in the live broadcasting room is effectively improved.
In another embodiment, playing the local song resources of the target song according to the song identification information and the playing progress information includes: under the condition that the local condition that song resources corresponding to the song identification information are not stored is detected, a resource downloading request corresponding to the song identification information is sent to a song resource server; storing the target song resources returned by the song resource server to the local to obtain local song resources of the target song; and playing the local song resources of the target song according to the playing progress information.
The song resource server may refer to a server or a server cluster in which song resources are stored. For example, the song resource server may be implemented using a CDN (content delivery network) provided by a song resource download platform.
In a specific implementation, during the process of playing the local song resources of the target song according to the song identification information and the playing progress information, the viewer client can detect whether the local song resources corresponding to the song identification information, such as the audio file of the song, are stored.
When the audience client detects that the song resources corresponding to the song identification information are locally stored, the audience client plays the local song resources of the target song according to the playing progress information. When the audience client detects that the song resources corresponding to the song identification information are not stored locally, the audience client can send a resource downloading request corresponding to the song identification information to the song resource server.
After receiving and responding to the resource downloading request, the song resource server inquires out the target song resource corresponding to the song identification information by utilizing the song identification information, and returns the target song resource to the audience client. And the audience client receives the target song resources returned by the song resource server, stores the target song resources to the local and obtains the local song resources of the target song. Finally, the audience client plays the local song resources of the target song according to the playing progress information.
According to the technical scheme, whether the song resources corresponding to the song identification information are stored locally or not is detected, and a resource downloading request corresponding to the song identification information is sent to the song resource server under the condition that the song resources corresponding to the song identification information are not stored locally, so that the local song resources of the target song can be effectively and rapidly obtained, and the client of the audience can conveniently play the target song in a local play mode based on the locally stored song resources.
In another embodiment, playing the local song resources of the target song according to the playing progress information includes: determining a playing starting time stamp corresponding to the target song according to the playing progress information; acquiring a current time stamp, and determining the current playing progress according to the deviation between the current time stamp and the playing starting time stamp; and playing the target song from the current playing progress based on the local song resources.
In a specific implementation, in a process of playing a local song resource of a target song according to the playing progress information, the client of the audience can determine a playing start time stamp corresponding to the target song according to the playing progress information. Then, the audience client acquires the current time stamp, and determines the current playing progress according to the deviation between the current time stamp and the playing starting time stamp. Finally, the viewer client plays the target song from the current play progress based on the local song resources.
For example, the viewer client may determine, based on the playback progress information, that the start playback time stamp of the target song may be denoted as "20XX/11/11 20:10:10". The viewer client obtains the current timestamp, which may be denoted as "20 XX/11/11:11:15", and determines that the deviation between the current timestamp and the start play timestamp is 1 minute 05 seconds. The viewer client may determine that the current playing progress of the target song is 1 minute 05 seconds after the target song has been played according to the deviation. Finally, the viewer client starts playing the target song from 1 minute 05 seconds of the target song based on the local song resources.
According to the technical scheme, the current playing progress of the target song is accurately determined by determining the playing starting time stamp corresponding to the target song and utilizing the deviation between the local current time stamp and the playing starting time stamp, so that each audience client in the local playing mode can synchronously play the target song effectively based on the current playing progress.
In another embodiment, the method further comprises: receiving a time stamp synchronization instruction; the time stamp synchronization instruction is an instruction sent by the server in response to a triggering condition of synchronizing the time stamp of the client; executing a timestamp synchronization operation in response to the timestamp synchronization instruction; the timestamp synchronization operation is used to correct a current timestamp of the client.
In a specific implementation, the server can issue a timestamp synchronization instruction to the audience client in the live broadcast room at regular time; the server responds to a triggering condition for synchronizing the time stamps of the audience clients, for example, a preset time stamp synchronizing time point is reached, and a time stamp synchronizing instruction is issued to each audience client in the live broadcasting room. The viewer client receives and responds to the timestamp synchronization instruction to perform a timestamp synchronization operation to correct the current timestamp of the viewer client. In practical applications, the viewer client synchronizes the current timestamp of the viewer client with the timestamp on the current network by performing a timestamp synchronization operation.
According to the technical scheme, the server issues the timestamp synchronization instruction to the audience clients in the live broadcasting room at regular time, so that local timestamps of all the audience clients are synchronized, the current playing progress of the media content can be accurately determined by all the subsequent audience clients, and the synchronous playing of the media content by all the audience clients in the local playing mode can be realized based on the current playing progress of the media content.
It should be understood that, although the steps in the flowcharts related to the embodiments described above are sequentially shown as indicated by arrows, these steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in the flowcharts described in the above embodiments may include a plurality of steps or a plurality of stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of the steps or stages is not necessarily performed sequentially, but may be performed alternately or alternately with at least some of the other steps or stages.
Based on the same inventive concept, the embodiment of the application also provides a media content playing device for realizing the above related media content playing method. The implementation of the solution provided by the device is similar to the implementation described in the above method, so the specific limitation of one or more embodiments of the media content playing device provided below may refer to the limitation of a media content playing method hereinabove, and will not be repeated herein.
In one embodiment, as shown in fig. 5, there is provided a media content playing device, including:
the detection module 510 is configured to detect a push state of a target live stream in the target live broadcast room; the target live broadcasting room is a live broadcasting room for playing media content; the target live stream comprises a data stream sent by at least one first client in the target live room for playing the media content;
the switching module 520 is configured to send a play mode switching instruction to each second client in the target live broadcast room when the push state meets a preset play mode switching condition; the play mode switching instruction is used for indicating each second client to synchronously play the media content based on the locally stored media content resources.
In one embodiment, the media content includes songs, and the switching module 520 is specifically configured to generate song playing information; the song playing information comprises song identification information and playing progress information of a target song; the target song comprises a song played by the first client or a next song in a preset play list of the song played by the first client; sending a playing mode switching instruction containing the song playing information to each second client; and each second client is used for playing the target song based on the locally stored song resources according to the song identification information and the playing progress information.
In one embodiment, the device is further configured to perform a play timing operation for the target song in response to the received play status report message; the playing state report message is a message sent by the second client for playing the target song based on the locally stored song resources first; recording a play starting time stamp corresponding to the play timing operation; the starting playing time stamp is used for synchronizing the playing progress of the target song.
In one embodiment, the apparatus is further configured to send a song playing indication message including the start playing timestamp to a third client in response to a request from the third client to enter the target live room; the song playing indication message is used for indicating the third client to determine the current playing progress of the target song according to the playing starting time stamp, and the target song is played from the current playing progress based on locally stored song resources.
In one embodiment, the first client includes a hosting client, and the detection module 510 is specifically configured to obtain a playing state of the media content played by the hosting client; and under the condition that the playing state characterizes that the anchor client side interrupts playing the media content, determining that the push state meets the playing mode switching condition.
In one embodiment, the detecting module 510 is specifically configured to receive at least one heartbeat message; the heartbeat message is a message sent by the anchor client according to a preset time interval in the process of playing the media content; and under the condition that the heartbeat message is not received any more in the preset waiting time, determining that the playing state represents that the anchor client side interrupts playing the media content.
In one embodiment, the first client further includes a microphone client, and the detection module 510 is specifically configured to use the microphone client that is playing the media content as a current microphone client, and obtain a playing state of the current microphone client for playing the media content; detecting whether the next on-wheat client plays the media content under the condition that the playing state characterizes that the current on-wheat client interrupts playing the media content; the next wheat-based client is the wheat-based client after the current wheat-based client is sequenced in the playing sequence; and under the condition that the next on-wheat client plays the media content, determining that the push state meets the play mode switching condition.
In one embodiment, as shown in fig. 6, another media content playing device is provided, the device comprising:
a pull stream playing module 610, configured to respond to an access operation to a target live broadcast room, and play a target live broadcast stream of the target live broadcast room; the target live broadcasting room is a live broadcasting room for playing media content; the target live stream comprises a data stream sent by at least one playing client in the target live room for playing the media content;
A local play module 620, configured to play the media content based on a locally stored media content resource in response to the received play mode switching instruction; the play mode switching instruction is sent by the server under the condition that the push state of the target live stream meets the preset play mode switching condition.
In one embodiment, the media content includes songs, and the local playing module 620 is specifically configured to obtain song playing information in the playing mode switching instruction; the song playing information comprises song identification information and playing progress information of a target song; the target song comprises a song played by the playing client or a next song in a preset play list of the song played by the playing client; and playing the local song resources of the target song according to the song identification information and the playing progress information.
In one embodiment, the local playing module 620 is specifically configured to send a resource download request corresponding to the song identifier information to a song resource server when it is detected that no song resource corresponding to the song identifier information is locally stored; storing the target song resources returned by the song resource server to the local, and obtaining local song resources of the target song; and playing the local song resources of the target song according to the playing progress information.
In one embodiment, the local playing module 620 is specifically configured to determine, according to the playing progress information, a playing start time stamp corresponding to the target song; acquiring a current time stamp of a client, and determining a current playing progress according to the deviation between the current time stamp and the playing starting time stamp; and starting to play the target song from the current playing progress based on the local song resources.
In one embodiment, the apparatus is further configured to receive a timestamp synchronization instruction; the time stamp synchronization instruction is an instruction sent by the server in response to a triggering condition of synchronizing the time stamp of the client; executing a timestamp synchronization operation in response to the timestamp synchronization instruction; the timestamp synchronization operation is used to correct a current timestamp of the client.
Each of the modules in the above-described one media content playing device may be implemented in whole or in part by software, hardware, and combinations thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a computer device is provided, which may be a server, the internal structure of which may be as shown in fig. 7. The computer device includes a processor, a memory, and a network interface connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of the computer device is used to store data for performing the media content playback method. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a method of playing media content.
In one embodiment, a computer device is provided, which may be a terminal, and the internal structure thereof may be as shown in fig. 8. The computer device includes a processor, a memory, a communication interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless mode can be realized through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. The computer program is executed by a processor to implement a method of playing media content. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, can also be keys, a track ball or a touch pad arranged on the shell of the computer equipment, and can also be an external keyboard, a touch pad or a mouse and the like.
It will be appreciated by persons skilled in the art that the structures shown in fig. 7 and 8 are block diagrams of only portions of structures associated with the present inventive arrangements and are not limiting of the computer device to which the present inventive arrangements are applied, and that a particular computer device may include more or fewer components than shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided that includes a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the steps of a media content playback method as described above. The steps of a media content playing method herein may be the steps of a media content playing method of the above embodiments.
In one embodiment, a computer readable storage medium is provided, storing a computer program which, when executed by a processor, causes the processor to perform the steps of a method for playing media content as described above. The steps of a media content playing method herein may be the steps of a media content playing method of the above embodiments.
In one embodiment, a computer program product is provided, comprising a computer program which, when executed by a processor, causes the processor to perform the steps of a method of playing media content as described above. The steps of a media content playing method herein may be the steps of a media content playing method of the above embodiments.
The user information (including but not limited to user equipment information, user personal information, etc.) and the data (including but not limited to data for analysis, stored data, presented data, etc.) related to the present application are information and data authorized by the user or sufficiently authorized by each party.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, database, or other medium used in embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high density embedded nonvolatile Memory, resistive random access Memory (ReRAM), magnetic random access Memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric Memory (Ferroelectric Random Access Memory, FRAM), phase change Memory (Phase Change Memory, PCM), graphene Memory, and the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, and the like. By way of illustration, and not limitation, RAM can be in the form of a variety of forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), and the like. The databases referred to in the embodiments provided herein may include at least one of a relational database and a non-relational database. The non-relational database may include, but is not limited to, a blockchain-based distributed database, and the like. The processor referred to in the embodiments provided in the present application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, or the like, but is not limited thereto.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The foregoing examples illustrate only a few embodiments of the application and are described in detail herein without thereby limiting the scope of the application. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the application, which are all within the scope of the application. Accordingly, the scope of the application should be assessed as that of the appended claims.

Claims (17)

1. A method of playing media content, the method comprising:
detecting a push state of a target live stream in a target live broadcasting room; the target live broadcasting room is a live broadcasting room for playing media content; the target live stream comprises a data stream sent by at least one first client in the target live room for playing the media content;
sending a play mode switching instruction to each second client in the target live broadcasting room under the condition that the push state meets the preset play mode switching condition; the play mode switching instruction is used for indicating each second client to synchronously play the media content based on the locally stored media content resources.
2. The method of claim 1, wherein the media content comprises songs, and wherein the sending a play mode switch instruction to each second client in the target live room comprises:
generating song playing information; the song playing information comprises song identification information and playing progress information of a target song; the target song comprises a song played by the first client or a next song in a preset play list of the song played by the first client;
sending a playing mode switching instruction containing the song playing information to each second client; and each second client is used for playing the target song based on the locally stored song resources according to the song identification information and the playing progress information.
3. The method of claim 2, wherein after the step of sending a play mode switch instruction to each second client in the target live room, the method further comprises:
responding to the received playing state report message, and executing playing timing operation aiming at the target song; the playing state report message is a message sent by the second client for playing the target song based on the locally stored song resources first;
Recording a play starting time stamp corresponding to the play timing operation; the starting playing time stamp is used for synchronizing the playing progress of the target song.
4. The method of claim 3, wherein after the step of sending a play mode switch instruction to each second client in the target live room, the method further comprises:
responding to a request of a third client to enter the target live broadcasting room, and sending a song playing indication message containing the playing starting time stamp to the third client;
the song playing indication message is used for indicating the third client to determine the current playing progress of the target song according to the playing starting time stamp, and the target song is played from the current playing progress based on locally stored song resources.
5. The method of claim 1, wherein the first client comprises a hosting client, and wherein the detecting the push status of the target live stream in the target live room comprises:
acquiring a playing state of the media content played by the anchor client;
and under the condition that the playing state characterizes that the anchor client side interrupts playing the media content, determining that the push state meets the playing mode switching condition.
6. The method of claim 5, wherein the obtaining the play status of the anchor client to play the media content comprises:
receiving at least one heartbeat message; the heartbeat message is a message sent by the anchor client according to a preset time interval in the process of playing the media content;
and under the condition that the heartbeat message is not received any more in the preset waiting time, determining that the playing state represents that the anchor client side interrupts playing the media content.
7. The method of claim 1, wherein the first client further comprises a microphone client, and wherein the detecting the push state of the target live stream in the target live room comprises:
taking the wheat-based client side playing the media content as a current wheat-based client side, and acquiring the playing state of the current wheat-based client side playing the media content;
detecting whether the next on-wheat client plays the media content under the condition that the playing state characterizes that the current on-wheat client interrupts playing the media content; the next wheat-based client is the wheat-based client after the current wheat-based client is sequenced in the playing sequence;
And under the condition that the next on-wheat client plays the media content, determining that the push state meets the play mode switching condition.
8. A method of playing media content, the method comprising:
responding to access operation of a target live broadcast room, and playing a target live broadcast stream of the target live broadcast room; the target live broadcasting room is a live broadcasting room for playing media content; the target live stream comprises a data stream sent by at least one playing client in the target live room for playing the media content;
responding to a received play mode switching instruction, and playing the media content based on a locally stored media content resource; the play mode switching instruction is sent by the server under the condition that the push state of the target live stream meets the preset play mode switching condition.
9. The method of claim 8, wherein the media content comprises a song, and wherein playing the media content based on locally stored media content resources in response to receiving a play mode switch instruction comprises:
obtaining song playing information in the playing mode switching instruction; the song playing information comprises song identification information and playing progress information of a target song; the target song comprises a song played by the playing client or a next song in a preset play list of the song played by the playing client;
And playing the local song resources of the target song according to the song identification information and the playing progress information.
10. The method of claim 9, wherein playing the local song resources of the target song according to the song identification information and the playing progress information comprises:
under the condition that the fact that the song resources corresponding to the song identification information are not stored locally is detected, a resource downloading request corresponding to the song identification information is sent to a song resource server;
storing the target song resources returned by the song resource server to the local, and obtaining local song resources of the target song;
and playing the local song resources of the target song according to the playing progress information.
11. The method of claim 10, wherein playing the local song resources of the target song according to the playing progress information comprises:
determining a playing starting time stamp corresponding to the target song according to the playing progress information;
acquiring a local current time stamp, and determining a current playing progress according to the deviation between the current time stamp and the playing starting time stamp;
And starting to play the target song from the current playing progress based on the local song resources.
12. The method of claim 11, wherein the method further comprises:
receiving a time stamp synchronization instruction; the time stamp synchronization instruction is an instruction sent by the server in response to a triggering condition of synchronizing the time stamp of the client;
executing a timestamp synchronization operation in response to the timestamp synchronization instruction; the timestamp synchronization operation is to correct the local current timestamp.
13. A media content playing device, the device comprising:
the detection module is used for detecting the push state of the target live stream in the target live broadcasting room; the target live broadcasting room is a live broadcasting room for playing media content; the target live stream comprises a data stream sent by at least one first client in the target live room for playing the media content;
the switching module is used for sending a play mode switching instruction to each second client in the target live broadcasting room under the condition that the push state meets the preset play mode switching condition; the play mode switching instruction is used for indicating each second client to synchronously play the media content based on the locally stored media content resources.
14. A media content playing device, the device comprising:
the system comprises a pulling and playing module, a pulling and playing module and a receiving module, wherein the pulling and playing module is used for responding to the access operation of a target live broadcast room and playing the target live broadcast stream of the target live broadcast room; the target live broadcasting room is a live broadcasting room for playing media content; the target live stream comprises a data stream sent by at least one playing client in the target live room for playing the media content;
the local playing module is used for responding to the received playing mode switching instruction and playing the media content based on the locally stored media content resources; the play mode switching instruction is sent by the server under the condition that the push state of the target live stream meets the preset play mode switching condition.
15. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any one of claims 1 to 12 when the computer program is executed.
16. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 12.
17. A computer program product comprising a computer program, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any one of claims 1 to 12.
CN202310374409.9A 2023-04-07 2023-04-07 Media content playing method, device, computer equipment and storage medium Pending CN116647706A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310374409.9A CN116647706A (en) 2023-04-07 2023-04-07 Media content playing method, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310374409.9A CN116647706A (en) 2023-04-07 2023-04-07 Media content playing method, device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116647706A true CN116647706A (en) 2023-08-25

Family

ID=87621857

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310374409.9A Pending CN116647706A (en) 2023-04-07 2023-04-07 Media content playing method, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116647706A (en)

Similar Documents

Publication Publication Date Title
US9787523B2 (en) Managing data in a data queue including synchronization of media on multiple devices
US11736749B2 (en) Interactive service processing method and system, device, and storage medium
CN106657257B (en) Method and apparatus for generating audio and video for interactive multimedia application
US9055193B2 (en) System and method of a remote conference
US11025967B2 (en) Method for inserting information push into live video streaming, server, and terminal
CN102298947B (en) A kind of for carrying out the method and apparatus playing switching between multimedia player
US20130074133A1 (en) Managing related digital content
US9635073B1 (en) Interactive applications implemented in video streams
WO2016127687A1 (en) Media file playback progress synchronization method, device and system
CN105072146B (en) Music information sharing method and device
CN108174233A (en) A kind of live broadcasting method, device, server and medium
US20150177958A1 (en) Providing context information relating to media content that is being presented
US20210044863A1 (en) System and method for management and delivery of secondary syndicated companion content of discovered primary digital media presentations
CN104965874A (en) Information processing method and apparatus
CN112969093A (en) Interactive service processing method, device, equipment and storage medium
WO2020097803A1 (en) Overlay comment processing method and apparatus, electronic device, and computer-readable storage medium
CN110602529A (en) Live broadcast monitoring method and device, electronic equipment and machine-readable storage medium
WO2020233171A1 (en) Song list switching method, apparatus and system, terminal, and storage medium
US20230283813A1 (en) Centralized streaming video composition
CN116647706A (en) Media content playing method, device, computer equipment and storage medium
CN111031354B (en) Multimedia playing method, device and storage medium
CN108696762A (en) A kind of synchronous broadcast method, device and system
CN112653896A (en) House source information playback method and device with watching assistant, electronic equipment and medium
US20170289500A1 (en) Synchronization of Media Rendering in Heterogeneous Networking Environments
JP2019012973A (en) Video distribution system, communication device, video distribution server, and video distribution method

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