rx-player icon indicating copy to clipboard operation
rx-player copied to clipboard

setPlaybackRate(0) when playback stalled causes infinity freeze on some Hisense device

Open KunXi-Fox opened this issue 6 months ago • 2 comments

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 ?

KunXi-Fox avatar Aug 28 '25 03:08 KunXi-Fox

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?

peaBerberian avatar Aug 28 '25 12:08 peaBerberian

The issue been reported from third-part (Hisense TV), so let me check with them and get more details. Thanks for reply.

KunXi-Fox avatar Aug 29 '25 02:08 KunXi-Fox