diff --git a/www/webrtc/index.html b/www/webrtc/index.html
index 44ab4dae..c090a55a 100644
--- a/www/webrtc/index.html
+++ b/www/webrtc/index.html
@@ -161,38 +161,41 @@
);
player.on(ZLMRTCClient.Events.WEBRTC_ICE_CANDIDATE_ERROR,function(e)
- {// ICE 协商出错
- console.log('ICE 协商出错');
+ {
+ // ICE 协商出错
+ console.log('ICE 协商出错');
});
player.on(ZLMRTCClient.Events.WEBRTC_ON_REMOTE_STREAMS,function(e)
- {//获取到了远端流,可以播放
- console.log('播放成功',e.streams);
+ {
+ //获取到了远端流,可以播放
+ console.log('播放成功',e.streams);
});
player.on(ZLMRTCClient.Events.WEBRTC_OFFER_ANWSER_EXCHANGE_FAILED,function(e)
- {// offer anwser 交换失败
- console.log('offer anwser 交换失败',e);
- stop();
+ {
+ // offer anwser 交换失败
+ console.log('offer anwser 交换失败',e);
+ stop();
});
player.on(ZLMRTCClient.Events.WEBRTC_ON_LOCAL_STREAM,function(s)
- {// 获取到了本地流
-
+ {
+ // 获取到了本地流
document.getElementById('selfVideo').srcObject=s;
document.getElementById('selfVideo').muted = true;
-
- //console.log('offer anwser 交换失败',e)
+ //console.log('offer anwser 交换失败',e)
});
player.on(ZLMRTCClient.Events.CAPTURE_STREAM_FAILED,function(s)
- {// 获取本地流失败
-
+ {
+ // 获取本地流失败
console.log('获取本地流失败');
});
player.on(ZLMRTCClient.Events.WEBRTC_ON_CONNECTION_STATE_CHANGE,function(state)
- {// RTC 状态变化 ,详情参考 https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnection/connectionState
+ {
+ // RTC 状态变化 ,详情参考 https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnection/connectionState
console.log('当前状态==>',state);
});