📜  agora for web - 任何代码示例

📅  最后修改于: 2022-03-11 14:56:31.998000             🧑  作者: Mango

代码示例1
import AgoraRTC from 'agora-rtc-sdk';
 
let client = AgoraRTC.createClient({ mode: "rtc", codec: "vp8" });
client.init(appid);
 
let clientRoleOptions = {level: 1};
client.setClientRole(role: “audience”, options?: clientRoleOptions);
client.join(token, channel, uid);
remoteStream.play("elementID");
client.leave();