Merge pull request #687 from robintown/hide-abort-errors
Don't log AbortErrors from videos that are never played
This commit is contained in:
commit
363ea2e669
1 changed files with 3 additions and 1 deletions
|
@ -86,7 +86,9 @@ export const useMediaStream = (
|
||||||
if (stream) {
|
if (stream) {
|
||||||
mediaEl.muted = mute;
|
mediaEl.muted = mute;
|
||||||
mediaEl.srcObject = stream;
|
mediaEl.srcObject = stream;
|
||||||
mediaEl.play();
|
mediaEl.play().catch((e) => {
|
||||||
|
if (e.name !== "AbortError") throw e;
|
||||||
|
});
|
||||||
|
|
||||||
// Unmuting the tab in Safari causes all video elements to be individually
|
// Unmuting the tab in Safari causes all video elements to be individually
|
||||||
// unmuted, so we need to reset the mute state here to prevent audio loops
|
// unmuted, so we need to reset the mute state here to prevent audio loops
|
||||||
|
|
Loading…
Add table
Reference in a new issue