I want to make a live video player, but “DOMException: The play() request was interrupted by a call to pause()” error is shown, I just use the player.play() function but never pause, and I noticed that it was because when changing the src (changing between channels) it pauses automatically while loading. Is there any solution?
Hi @romeo11marroquin , thanks for your question. From the error “DOMException: The play() request was interrupted by a call to pause()”, it is likely to happen if the application is using
autoPlay configuration or calling
player.play() without any user interaction with the web page to start playback with audio unmuted. In this case the playback is automatically paused by underlying browser framework. This is a browser restriction to prevent autoplay of video+audio media without user interaction.
You can find more information about this browser restriction at Bitmovin Docs - Player FAQ - Why doesn’t autoplay work consistently on browsers? and Autoplay Policies » Safari 14 & Chrome 64 | Bitmovin
One simple solution is to start playback in muted mode using PlaybackConfig.muted configuration.
Please go through information in above links and let us know if it helps. In case the issue you are facing does not fit into above use case, please share more information about your use case to let us help further.
Thanks for the help, I added the muted: true configuration to the player, but stills throwing the same DOMException. Is there any configuration I can make on config.xml to avoid this (on Tizen)?
Btw, I also noticed that this behaviour isn’t only when loading the source the first time, same exception is thrown when I “change the TV channel” and the source of the player changes, It seems to pause the player while loading but throws the error when I change channel when still loading the source (and the player is paused).
Hi @romeo11marroquin , thanks for checking the suggestion. From the description, the behaviour does not seem related to browser audio restrictions.
You can find the recommended settings, configuration and sample application for Tizen at Bitmovin Docs - Player Tutorials | Getting started with the web player on Samsung Tizen
Can you please follow these and check if this helps resolve the issue. You can also try the sample application to validate the behaviour.
Thanks and Regards,