update zlmrtcclient.js sdk and demo

This commit is contained in:
xiongguangjie
2024-12-20 19:31:05 +08:00
committed by 夏楚
parent 5e32199661
commit 3f5923337e
5 changed files with 26 additions and 17 deletions

View File

@@ -240,10 +240,13 @@
console.log('ICE 协商出错');
});
player.on(ZLMRTCClient.Events.WEBRTC_ON_REMOTE_STREAMS,function(e)
player.on(ZLMRTCClient.Events.WEBRTC_ON_REMOTE_STREAMS,function(s)
{
//获取到了远端流,可以播放
console.log('播放成功',e.streams);
//获取到了远端流,可以播放,如果element 为null 或者不传,可以在这里播放(如下注释代码)
/*
document.getElementById('video').srcObject=s;
*/
console.log('播放成功',s);
});
player.on(ZLMRTCClient.Events.WEBRTC_OFFER_ANWSER_EXCHANGE_FAILED,function(e)