Product
Player
Question
We need to display buffering icon , what event we should rely from Player
We need to start buffering icon when buffering happens in player side
We need to stop buffering icon when buffering happens in player side
Please provide which event we should rely
Hi @iamdemoatirdeto ,
Our recommendation would be that you monitor StallStarted and StallEnded events, since they signal the start and end of buffering:
Best regards
system
(system)
Closed
October 22, 2024, 2:13pm
3
This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.
You can see an example of this in our default UI here:
player.on(player.exports.PlayerEvent.StallStarted, showOverlay);
player.on(player.exports.PlayerEvent.StallEnded, hideOverlay);
player.on(player.exports.PlayerEvent.Play, showOverlay);
player.on(player.exports.PlayerEvent.Playing, hideOverlay);
player.on(player.exports.PlayerEvent.Paused, hideOverlay);
player.on(player.exports.PlayerEvent.Seek, showOverlay);
player.on(player.exports.PlayerEvent.Seeked, hideOverlay);
player.on(player.exports.PlayerEvent.TimeShift, showOverlay);
player.on(player.exports.PlayerEvent.TimeShifted, hideOverlay);
player.on(player.exports.PlayerEvent.SourceUnloaded, hideOverlay);
Worth nothing that the StallStarted
/StallEnded
events are not emitted between Play → Playing, Seek → Seeked, TimeShift → TimeShifted. Therefore we also show our BufferingOverlay
in this transitions after a short timeout of 1 second.