diff --git a/src/components/views/voip/AudioFeed.tsx b/src/components/views/voip/AudioFeed.tsx index 3049d80c727..d6d1261343f 100644 --- a/src/components/views/voip/AudioFeed.tsx +++ b/src/components/views/voip/AudioFeed.tsx @@ -72,7 +72,7 @@ export default class AudioFeed extends React.Component { } }; - private playMedia() { + private async playMedia() { const element = this.element.current; if (!element) return; this.onAudioOutputChanged(MediaDeviceHandler.getAudioOutput()); @@ -90,7 +90,7 @@ export default class AudioFeed extends React.Component { // should serialise the ones that need to be serialised but then be able to interrupt // them with another load() which will cancel the pending one, but since we don't call // load() explicitly, it shouldn't be a problem. - Dave - element.play(); + await element.load(); } catch (e) { logger.info("Failed to play media element with feed", this.props.feed, e); } diff --git a/src/components/views/voip/VideoFeed.tsx b/src/components/views/voip/VideoFeed.tsx index 1430a7974a9..4607b750eba 100644 --- a/src/components/views/voip/VideoFeed.tsx +++ b/src/components/views/voip/VideoFeed.tsx @@ -112,7 +112,7 @@ export default class VideoFeed extends React.PureComponent { } } - private playMedia() { + private async playMedia() { const element = this.element; if (!element) return; // We play audio in AudioFeed, not here @@ -129,7 +129,7 @@ export default class VideoFeed extends React.PureComponent { // should serialise the ones that need to be serialised but then be able to interrupt // them with another load() which will cancel the pending one, but since we don't call // load() explicitly, it shouldn't be a problem. - Dave - element.play(); + await element.play(); } catch (e) { logger.info("Failed to play media element with feed", this.props.feed, e); }