mirror of https://github.com/vector-im/riot-web
use a top-level audio tag for playing all VoIP audio.\n\nfixes https://github.com/vector-im/vector-web/issues/1271 and https://github.com/vector-im/vector-web/issues/621
parent
5543c126e6
commit
6c4ad49b78
|
@ -79,8 +79,7 @@ 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
|
||||
call.setRemoteAudioElement(this.getVideoView().getRemoteAudioElement());
|
||||
}
|
||||
if (call && call.type === "video" && call.call_state !== "ended" && call.call_state !== "ringing") {
|
||||
|
|
|
@ -50,7 +50,10 @@ module.exports = React.createClass({
|
|||
},
|
||||
|
||||
getRemoteAudioElement: function() {
|
||||
return this.refs.remoteAudio;
|
||||
// this needs to be somewhere at the top of the DOM which
|
||||
// always exists to avoid audio interruptions.
|
||||
// Might as well just use DOM.
|
||||
return document.getElementById("remoteAudio");
|
||||
},
|
||||
|
||||
getLocalVideoElement: function() {
|
||||
|
@ -106,7 +109,6 @@ module.exports = React.createClass({
|
|||
<div className="mx_VideoView_remoteVideoFeed">
|
||||
<VideoFeed ref="remote" onResize={this.props.onResize}
|
||||
maxHeight={maxVideoHeight} />
|
||||
<audio ref="remoteAudio"/>
|
||||
</div>
|
||||
<div className="mx_VideoView_localVideoFeed">
|
||||
<VideoFeed ref="local"/>
|
||||
|
|
Loading…
Reference in New Issue