
trtc.enterRoom({ autoReceiveAudio: false }).TRTC.EVENT.REMOTE_AUDIO_AVAILABLE event before entering the room. trtc.muteRemoteAudio(userId, false)method when you need to play remote audio.TRTC.EVENT.REMOTE_VIDEO_AVAILABLE event before entering the room to receive all remote user video publishing events. trtc.startRemoteVideo() method to play the remote video stream when you receive the event.trtc.on(TRTC.EVENT.REMOTE_VIDEO_AVAILABLE, ({ userId, streamType }) => {// To play the video image, you need to place an HTMLElement in the DOM, which can be a div tag, assuming its id is `${userId}_${streamType}`const view = `${userId}_${streamType}`;trtc.startRemoteVideo({ userId, streamType, view });});
Feedback