old mode 100644
new mode 100755
| | |
| | | zlmsdpUrl: url,//流地址 |
| | | simulecast: false, |
| | | useCamera: false, |
| | | audioEnable: false, |
| | | videoEnable: false, |
| | | audioEnable: true, |
| | | videoEnable: true, |
| | | recvOnly: true, |
| | | usedatachannel: false, |
| | | }) |
| | | webrtcPlayer.on(ZLMRTCClient.Events.WEBRTC_ICE_CANDIDATE_ERROR,(e)=>{// ICE 协商出错 |
| | | console.error('ICE 协商出错') |
| | |
| | | }); |
| | | |
| | | webrtcPlayer.on(ZLMRTCClient.Events.WEBRTC_ON_REMOTE_STREAMS,(e)=>{//获取到了远端流,可以播放 |
| | | console.error('播放成功',e.streams) |
| | | console.log('播放成功',e.streams) |
| | | this.eventcallbacK("playing", "播放成功") |
| | | }); |
| | | |
| | |
| | | console.error('offer anwser 交换失败',e) |
| | | this.eventcallbacK("OFFER ANSWER ERROR ", "offer anwser 交换失败") |
| | | if (e.code ==-400 && e.msg=="流不存在"){ |
| | | console.log("111111") |
| | | console.log("流不存在") |
| | | this.timer = setTimeout(()=>{ |
| | | this.webrtcPlayer.close(); |
| | | this.play(url) |