Posts

Post not yet marked as solved
2 Replies
695 Views
We have a web application which is having stalled html video element issue on iOS Safari. iOS Version 17.0.3. The html page contains a inline script tag for example <script> ... </script> and runs immediately when page loads. The script does following videoElement.src = url; videoElement.load(); The url is a HLS manifest url. After the DOM elements are created, we attatch the videoElement to a <div> and expecting the video reaches canplaythrough eventually and starts to playing. Actual Behavior: The video never plays videoElement readyState and networkState both stuck at value of 1 we found that "suspened" event was triggered on the video element and not sure who is triggering it. Temporary Mitigation: When video is stalled, if we call videoElement.load() manually in Safari js console, the readyState and networkState will increase and seeing HLS video segment are being fetched and video eventually reaches canplaythrough. This happens only on iOS Safari, not MacOS Safari. We suspect its because at begining when videoElement.src is set and .load() was called, the videoElement was not attached to any div so iOS decides to stop it to save battery. But its completely uneducated guess and any help would be appreciated. Thanks !
Posted
by tyrelltle.
Last updated
.