Skip to content

Commit

Permalink
Be more defensive about triggering play()
Browse files Browse the repository at this point in the history
  • Loading branch information
janlelis committed May 20, 2020
1 parent 52f8b74 commit 474e28b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/webrtc.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export function attachMediaStream(element, stream, muted = false) {
}
element.srcObject = stream
if (element.paused) {
element.play()
element.play().catch(() => {})
}
} else {
if (element.srcObject) { element.pause() }
Expand Down

0 comments on commit 474e28b

Please sign in to comment.