setPlaybackRate(0) when playback stalled causes infinity freeze on some Hisense device
Hi there,
We've been told from Hisense team that setPlaybackRate(0) may causes infinity freeze on some of their devices, I saw we set playback rate to 0 when we try to start build buffer.
https://github.com/canalplus/rx-player/blob/f78710eed852631dcb8416c3c2eaec3b914ad3da/src/main_thread/init/utils/rebuffering_controller.ts#L523-L531
Could we change it to call videoElment.pause() instead ?
Hi @KunXi-Fox,
Yes we set the playback rate to 0 to ensure playback stay in place when we want to rebuffer.
We prefer relying on this property than on the pause API for many reasons: pause is linked to many other concepts and browser behavior (e.g. browser media controls), so playback rate is the less disruptive way with which we can tell the browser to temporarily stop decoding data.
The same trick is done by other players, I just re-checked the shaka-player and they also do still seem to rely on this same behavior, so it's common.
from Hisense
We're on Hisense devices on production and for now we haven't heard of an issue, as long as we later reset the playbackRate at the right value. Did you reproduce such issues?
The issue been reported from third-part (Hisense TV), so let me check with them and get more details. Thanks for reply.