MarcoS
MarcoS

Reputation: 17721

HTML5 p2p communication

I am required to build a web application to inject live subtitles on a live stream. Subtitles will be produced by an operator with a speech-recognition software (or by a typist), filling a textarea on a browser. The consumer will be an HTML5 video tag in a browser.

The rationale is quite simple, probably simpler than a web chat (it's a one-way communication).

This is my current implementation:

This implementation works, but it looks quite convolute, I'm not quite satisfacted with it... Any suggestion for a "smarter" or cleaner architecture?

Upvotes: 1

Views: 2352

Answers (1)

Hans Wassink
Hans Wassink

Reputation: 2577

Sockets / nodejs. Sockets will open the connection to the browsers for you every time there is new data. No need to poll!

Check this for example...

Upvotes: 2

Related Questions