From 5e9ddf64c386b3fe05030e9ecad2194626474ba2 Mon Sep 17 00:00:00 2001 From: Deepslient <1154547394@qq.com> Date: Tue, 24 Oct 2023 22:31:50 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=9F=E4=B8=80index=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E6=B3=A8=E9=87=8A=E6=A0=BC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- www/webrtc/index.html | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) 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); });