scala-js/scala-js-dom

HTMLAudioElement.play should return Promise, not Unit

strelec opened this issue · 0 comments

This should be a backwards-compatible change.

https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/play

The HTMLMediaElement play() method attempts to begin playback of the media. It returns a Promise which is resolved when playback has been successfully started. Failure to begin playback for any reason, such as permission issues, result in the promise being rejected.