📅  最后修改于: 2022-03-11 15:04:25.789000             🧑  作者: Mango
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();