Heron Rossi
Heron Rossi

Reputation: 701

HLS video streamming and chat message synchronization

We're using the following architecture to build a live stream / chat application for mobile devices:

Because of various factors there's a "natural" delay between the host video stream and viewers actualy seeing the video. The problem is that chat messages are delivered instantly so video and messages become total out of sync.

What would be a good strategy for keeping video and messages synchronized among viewers?

Upvotes: 1

Views: 891

Answers (1)

user1390208
user1390208

Reputation: 2106

Technically, you can use timed metadata in HLS: https://learn.microsoft.com/en-us/azure/media-services/previous/media-services-specifications-live-timed-metadata#32--apple-hls-delivery and delay your chat messages on the client side accordingly, but then your chat turns into a chat with remote galaxy, with huge delays between messages. So the practicality of such a solution is zero, considering, in addition, that HLS latency is not controllable and can fluctuate considerably around its average value.

So your real solution is to move away from HLS and use WebRTC.

Upvotes: 1

Related Questions