📜  agora 视频通话 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:04:25.789000             🧑  作者: Mango

代码示例1
import AgoraRTC from 'agora-rtc-sdk';

let client = AgoraRTC.createClient({ mode: "rtc", codec: "vp8" });
client.init(appid);
var localStream = AgoraRTC.createStream({ audio: true, video: true })
localStream.init();  
localStream.play(elementID);
client.join(token, channel, uid);
client.publish(localStream);
remoteStream.play("elementID");
client.leave();