Closed ashokpal100 closed 4 years ago
client.on("user-info-updated", (uid, msg) => {
switch (msg) {
case "mute-audio": ...
case "mute-video": ...
}
});
In most cases, you just need user-published
and user-unpublished
. This event is only used to receive Agora Native SDK's user info event
client.on("user-info-updated", (uid, msg) => { switch (msg) { case "mute-audio": ... case "mute-video": ... } });
In most cases, you just need
user-published
anduser-unpublished
. This event is only used to receive Agora Native SDK's user info event
thanks for the reply. ok got it =============== Agora sdk =============== mute local audio and video just call a localStream.muteAudio() localStream.unmuteAudio() localStream.unmuteVideo() localStream.muteVideo() these are works fine
=============== Agora NG sdk============= but how to mute local audio and video code below we have used client = AgoraRTC.createClient({ mode: "rtc", codec: "h264" }); client.on("user-published", handleUserPublished); client.on("user-unpublished", handleUserUnpublished); options.uid = await client.join(options.appid, options.channel, options.token || null); localTracks.audioTrack = await AgoraRTC.createMicrophoneAudioTrack(); localTracks.videoTrack = await AgoraRTC.createCameraVideoTrack() localTracks.videoTrack.play("local-player"); await client.publish(Object.values(localTracks)) above code working fine but not able to achieve mute or unmute local audio and video call
How to mute or unmute local audio and video call ? Please help
you can use setEnabled
you can use setEnabled
await localTracks.videoTrack.setEnabled(false) ?
Are you using v4.0.1 ?
Are you using v4.0.1 ?
Yes thanks for help im able to do all the things
Hi,
Please prove the solution of user-info-updated function implementation
user-info-updated(uid: UID, msg: "mute-audio" | "mute-video" | "enable-local-video" | "unmute-audio" | "unmute-video" | "disable-local-video"): void