Skip to content

Commit c8f6d46

Browse files
committed
add remoteAudioElement
1 parent 5d1ad4d commit c8f6d46

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

src/controllers/molecules/voip/CallView.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,10 @@ module.exports = {
7474
);
7575
if (call) {
7676
call.setLocalVideoElement(this.getVideoView().getLocalVideoElement());
77-
// N.B. the remote video element is used for playback for audio for voice calls
7877
call.setRemoteVideoElement(this.getVideoView().getRemoteVideoElement());
78+
// give a separate element for audio stream playback - both for voice calls
79+
// and for the voice stream of screen captures
80+
call.setRemoteAudioElement(this.getVideoView().getRemoteAudioElement());
7981
}
8082
if (call && call.type === "video" && call.state !== 'ended') {
8183
// if this call is a conf call, don't display local video as the

src/skins/vector/views/molecules/voip/VideoView.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ module.exports = React.createClass({
3434
return this.refs.remote.getDOMNode();
3535
},
3636

37+
getRemoteAudioElement: function() {
38+
return this.refs.remoteAudio.getDOMNode();
39+
},
40+
3741
getLocalVideoElement: function() {
3842
return this.refs.local.getDOMNode();
3943
},
@@ -61,6 +65,7 @@ module.exports = React.createClass({
6165
<div className="mx_VideoView" ref={this.setContainer}>
6266
<div className="mx_VideoView_remoteVideoFeed">
6367
<VideoFeed ref="remote"/>
68+
<audio ref="remoteAudio"/>
6469
</div>
6570
<div className="mx_VideoView_localVideoFeed">
6671
<VideoFeed ref="local"/>

0 commit comments

Comments
 (0)