Gl wplay error

broken image

Now that we understand the root cause, let's see what we can do to fix this.įirst, don't ever assume a media element (video or audio) will play. You canĮntirely reset the video playback state, including the buffer, with Note: Calling video.pause() isn't the only way to interrupt a video. Since we're not handling the video play Promise in our code, an error messageĪppears in Chrome DevTools. Rejected along with an error message explaining the failure. If playback succeeds, the Promise is fulfilled and the Moreover since Chrome 50, a play() call on an a or Įlement returns a Promise, a function that returns a single resultĪsynchronously. Necessarily start immediately after ay() is executed.

broken image

_Uncaught (in promise) DOMException: The play() request was interrupted by a call to pause().Īs the video is not loaded due to preload='none', video playback doesn't

broken image

The code above results in this error message in Chrome DevTools:

broken image