Skip to content

Fix #488 HTMLMediaElement.play() should return Promise #491

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions api-reports/2_12.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4288,7 +4288,7 @@ raw/HTMLAudioElement[JC] var parentElement: HTMLElement
raw/HTMLAudioElement[JC] def parentNode: Node
raw/HTMLAudioElement[JC] def pause(): Unit
raw/HTMLAudioElement[JC] def paused: Boolean
raw/HTMLAudioElement[JC] def play(): Unit
raw/HTMLAudioElement[JC] def play(): js.UndefOr[js.Promise[Unit]]
raw/HTMLAudioElement[JC] var playbackRate: Double
raw/HTMLAudioElement[JC] def played: TimeRanges
raw/HTMLAudioElement[JC] def prefix: String
Expand Down Expand Up @@ -9311,7 +9311,7 @@ raw/HTMLMediaElement[JC] var parentElement: HTMLElement
raw/HTMLMediaElement[JC] def parentNode: Node
raw/HTMLMediaElement[JC] def pause(): Unit
raw/HTMLMediaElement[JC] def paused: Boolean
raw/HTMLMediaElement[JC] def play(): Unit
raw/HTMLMediaElement[JC] def play(): js.UndefOr[js.Promise[Unit]]
raw/HTMLMediaElement[JC] var playbackRate: Double
raw/HTMLMediaElement[JC] def played: TimeRanges
raw/HTMLMediaElement[JC] def prefix: String
Expand Down Expand Up @@ -14890,7 +14890,7 @@ raw/HTMLVideoElement[JC] var parentElement: HTMLElement
raw/HTMLVideoElement[JC] def parentNode: Node
raw/HTMLVideoElement[JC] def pause(): Unit
raw/HTMLVideoElement[JC] def paused: Boolean
raw/HTMLVideoElement[JC] def play(): Unit
raw/HTMLVideoElement[JC] def play(): js.UndefOr[js.Promise[Unit]]
raw/HTMLVideoElement[JC] var playbackRate: Double
raw/HTMLVideoElement[JC] def played: TimeRanges
raw/HTMLVideoElement[JC] var poster: String
Expand Down
6 changes: 3 additions & 3 deletions api-reports/2_13.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4288,7 +4288,7 @@ raw/HTMLAudioElement[JC] var parentElement: HTMLElement
raw/HTMLAudioElement[JC] def parentNode: Node
raw/HTMLAudioElement[JC] def pause(): Unit
raw/HTMLAudioElement[JC] def paused: Boolean
raw/HTMLAudioElement[JC] def play(): Unit
raw/HTMLAudioElement[JC] def play(): js.UndefOr[js.Promise[Unit]]
raw/HTMLAudioElement[JC] var playbackRate: Double
raw/HTMLAudioElement[JC] def played: TimeRanges
raw/HTMLAudioElement[JC] def prefix: String
Expand Down Expand Up @@ -9311,7 +9311,7 @@ raw/HTMLMediaElement[JC] var parentElement: HTMLElement
raw/HTMLMediaElement[JC] def parentNode: Node
raw/HTMLMediaElement[JC] def pause(): Unit
raw/HTMLMediaElement[JC] def paused: Boolean
raw/HTMLMediaElement[JC] def play(): Unit
raw/HTMLMediaElement[JC] def play(): js.UndefOr[js.Promise[Unit]]
raw/HTMLMediaElement[JC] var playbackRate: Double
raw/HTMLMediaElement[JC] def played: TimeRanges
raw/HTMLMediaElement[JC] def prefix: String
Expand Down Expand Up @@ -14890,7 +14890,7 @@ raw/HTMLVideoElement[JC] var parentElement: HTMLElement
raw/HTMLVideoElement[JC] def parentNode: Node
raw/HTMLVideoElement[JC] def pause(): Unit
raw/HTMLVideoElement[JC] def paused: Boolean
raw/HTMLVideoElement[JC] def play(): Unit
raw/HTMLVideoElement[JC] def play(): js.UndefOr[js.Promise[Unit]]
raw/HTMLVideoElement[JC] var playbackRate: Double
raw/HTMLVideoElement[JC] def played: TimeRanges
raw/HTMLVideoElement[JC] var poster: String
Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/org/scalajs/dom/raw/Html.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3159,7 +3159,7 @@ abstract class HTMLMediaElement extends HTMLElement {
*
* MDN
*/
def play(): Unit = js.native
def play(): js.UndefOr[js.Promise[Unit]] = js.native

/**
* Begins loading the media content from the server.
Expand Down