Ignore media actions

Hopefully the comment explains all

Fixes https://github.com/vector-im/riot-web/issues/11118
This commit is contained in:
David Baker 2019-11-21 15:55:30 +00:00
parent 6597e0bd42
commit 5c6ef10c6b

View file

@ -495,6 +495,15 @@ async function _startCallApp(roomId, type) {
// with the dispatcher once
if (!global.mxCallHandler) {
dis.register(_onAction);
// add empty handlers for media actions, otherwise the media keys
// end up causing the audio elements with our ring/ringback etc
// audio clips in to play.
navigator.mediaSession.setActionHandler('play', function() {});
navigator.mediaSession.setActionHandler('pause', function() {});
navigator.mediaSession.setActionHandler('seekbackward', function() {});
navigator.mediaSession.setActionHandler('seekforward', function() {});
navigator.mediaSession.setActionHandler('previoustrack', function() {});
navigator.mediaSession.setActionHandler('nexttrack', function() {});
}
const callHandler = {