matrix-js-sdk icon indicating copy to clipboard operation
matrix-js-sdk copied to clipboard

setRemoteAudioElement fails when remoteVideoElement has not been set

Open wlinna opened this issue 8 years ago • 0 comments

I am using the following code to create a voice call:

call = matrixcs.createNewMatrixCall(client, roomName);
call.remoteVideoElement = {};
call.setRemoteAudioElement(callAudiotag);
console.info("Call %s", call);
addCallListeners(call);
call.placeVoiceCall();

The problem is that unless I create a placeholder remoteVideoElement, such as empty object, the code fails. I shouldn't need to put remoteVideoElement when I have no use for it.

The problem is in this line in setRemoteAudioElement:

this.remoteVideoElement.muted = true;

Why not allow setting the audioTag in placeVoiceCall the same way it's done in placeVideoCall?

wlinna avatar Mar 09 '17 13:03 wlinna