Explore Bato Web Agency Webflow Certified Partner Profile Explore Bato Web Agency Webflow Certified Partner Profile

The play() request was interrupted by a call to pause() — why does this happen?

Illustration without a description Illustration without a description

play() can still be pending when the app pauses the video, changes its source or removes the component. The browser rejects that pending request when playback is interrupted. Log the order of operations, especially when rapid clicks or navigation trigger different handlers.

 

Await the play Promise before starting work that depends on playback. If a user deliberately pauses or leaves the view, handle the interruption as part of that state change. Keep genuine playback errors visible when the media should still be playing.

 

Test quick successive actions such as Play then Pause and compare them with ordinary playback. Check that the final UI reflects what the user last requested, even when the first Promise settled later.

 

const video = document.querySelector('video'); async function playWhenReady() { if (!video) return; try { await video.play(); } catch (error) { console.warn(error.name); } }

 

Log play(), pause() and source changes with timestamps, then repeat the rapid interaction that interrupts playback.