hyuk
Member
I've learned that during video broadcasting, it's possible to remove only the audio without interrupting the video. I understand that I can use addTrack to reintroduce the audio without interrupting the video. However, I'm unsure how to create an audio stream. Could you advise me on the methods I can use for this? I've used createRoom from RoomApi.sdk to generate the stream. Thank you.
Below is code that does not work and is written as an example.
I would like the recording to be natural as well. Is this a possible scenario?
Code:
const audioTrack = localVideo.childNodes[0].srcObject.getAudioTracks()[0];
if (audioTrack) {
await localVideo.childNodes[0].srcObject.removeTrack(audioTrack);
audioTrack.stop();
}
Below is code that does not work and is written as an example.
Code:
//const audioStream =RoomApi.sdk.createStream({audio:true, video:false});
await localVideo.childNodes[0].srcObject.addTrack(audioStream.getAudioTrack());
Last edited: