Merge pull request #434 from matrix-org/matthew/uninterrupted-audio

use a top-level audio tag for playing all VoIP audio.
This commit is contained in:
Matthew Hodgson 2016-09-01 16:12:37 +01:00 committed by GitHub
commit 031daf7b3c
2 changed files with 12 additions and 4 deletions

View file

@ -95,8 +95,10 @@ module.exports = React.createClass({
if (call) {
call.setLocalVideoElement(this.getVideoView().getLocalVideoElement());
call.setRemoteVideoElement(this.getVideoView().getRemoteVideoElement());
// give a separate element for audio stream playback - both for voice calls
// and for the voice stream of screen captures
// always use a separate element for audio stream playback.
// this is to let us move CallView around the DOM without interrupting remote audio
// during playback, by having the audio rendered by a top-level <audio/> element.
// rather than being rendered by the main remoteVideo <video/> element.
call.setRemoteAudioElement(this.getVideoView().getRemoteAudioElement());
}
if (call && call.type === "video" && call.call_state !== "ended" && call.call_state !== "ringing") {