video elements in HTML expose a
play() function. This function returns a
Promise<void>, so if you need to update some piece of UI in response to playing a piece of media and even show when it is loading, especially if you're not preloading the media, you can
Doing this can also fix some cases where
.pause() are inadvertently called in lock-step.
November 21, 2021 at 5:30 PM