字段名 | 类型 | 字段说明 | 具体说明 |
---|---|---|---|
camera | string | 相机说明 | FC30这一代固定传参为“39-0-7” |
video | string | 镜头说明 | FC30这一代固定传参为“normal-0” |
video_expire | int64 | 拉流参数有效时间 | 不传默认为7200,两小时 |
video_quality | int64 | 清晰度 | 建议传0自适应,对网络有充足自信的可以传4,会有更佳直播质量 |
字段名 | 类型 | 字段说明 | 具体说明 |
---|---|---|---|
url_type | string | 直播协议类型 | FC30这一代返回是“agora”,为声网直播协议,后续可能会因为追求更低延迟等原因替换其他直播协议 |
url | string | 直播拉流参数 | FC30这一代返回有uid token channel等信息 |
var clien = null
// Step1: create and initAgora client
init()
function init(){
client = AgoraRTC.createClient({mode: "live". codec:"h264"):
handleSubscribe();
}
// Step 2:join channel
async function join() {
client.join(options.appid, options.channel, unescape( options.token)|| null, options.uid));
}
// Step 3: subscribestreams
function handleSubscribe(){
client.on("user-published",handleuUserPublished):
client.on("user-unpublished", handleUserUnpublished) ;
}