From 474e28b3184cc72c97e958aed638bcebc707f6ec Mon Sep 17 00:00:00 2001 From: Jan Lelis Date: Wed, 20 May 2020 17:24:29 +0200 Subject: [PATCH] Be more defensive about triggering play() --- src/webrtc.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/webrtc.js b/src/webrtc.js index ab381db..e9a6fb6 100644 --- a/src/webrtc.js +++ b/src/webrtc.js @@ -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() }