It's possible by always trying to send play/pause commands. If player didn't send postMessage Event back -- it's buffering. But... Looks weird... Should be a better way to do this.
It's necessary to pause all other clients when one of them have slow internet connection and movie starts buffering. When buffering is end -- pause and seek methods should be called. To re-synchronize all the clients. After that we can start playing movie again.
bufferingStart
bufferingEnd
Using
this.emit()
in player instance.It's possible by always trying to send play/pause commands. If player didn't send postMessage Event back -- it's buffering. But... Looks weird... Should be a better way to do this.
It's necessary to pause all other clients when one of them have slow internet connection and movie starts buffering. When buffering is end --
pause
andseek
methods should be called. To re-synchronize all the clients. After that we can start playing movie again.