A non-transitory computer readable storage medium having stored therein instructions that, when executed by a processor of a device, causes the device to perform acts comprising:
- sending a first audio data packet contained in a multimedia file to an audio player device, wherein the first audio data packet comprises a data test identifier such that the audio player device returns a first timestamp according to the data test identifier, wherein the first timestamp is a timestamp at which the audio player device receives the first audio data packet;
- sending a first video data packet contained in the multimedia file to a video player device, wherein the first video data packet comprises the data test identifier such that the video player device returns a second timestamp according to the data test identifier, wherein the second timestamp is a timestamp at which the video player device receives the first video data packet;
- and
- sending a second audio data packet to the audio player device and sending a second video data packet to the video player device respectively according to the first timestamp and the second timestamp when receiving the first timestamp and the second timestamp, so as to play the second audio data packet and the second video data packet synchronously, wherein the second audio data packet is an audio data packet sent after the first audio data packet, and the second video data packet is a video data packet sent after the first video data packet, wherein the acts further comprise:
- determining a transmission time interval of the first audio data packet according to the first timestamp and a sending time of the first audio data packet, so as to obtain an audio transmission time interval;
- determining a transmission time interval of the first video data packet according to the second timestamp and a sending time of the first video data packet, so as to obtain a video transmission time interval;
- calculating a difference between the audio transmission time interval and the video transmission time interval so as to determine whether to delay the second audio data packet or the second video data packet;
- and
- when determining to delay the second audio data packet or the second video data packet, determining a delay of the second audio data packet or the second video data packet based on the difference between the audio transmission time interval and the video transmission time interval and sending the second audio data packet to the audio player device and sending the second video data packet to the video player device respectively according to the delay of the second audio data packet or the second video data packet to ensure the second audio data packet and the second video data packet are played synchronously.