From 5e08e43e9a1fb7dcdcb5b94231f61d9e86d108ba Mon Sep 17 00:00:00 2001 From: Dw9 Date: Thu, 5 May 2022 16:34:49 +0800 Subject: [PATCH] =?UTF-8?q?webrtc=E6=B5=8B=E8=AF=95=E7=BD=91=E9=A1=B5?= =?UTF-8?q?=E6=96=B0=E5=A2=9Edatachannel=20echo=E6=98=BE=E7=A4=BA=E6=A1=86?= =?UTF-8?q?=20(#1613)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- www/webrtc/index.html | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/www/webrtc/index.html b/www/webrtc/index.html index e8e4ebde..a2ec0d4f 100644 --- a/www/webrtc/index.html +++ b/www/webrtc/index.html @@ -64,8 +64,12 @@

- - + + +

+

+ +

@@ -185,6 +189,7 @@ player.on(ZLMRTCClient.Events.WEBRTC_ON_DATA_CHANNEL_MSG,function(event) { console.log('rtc datachannel 消息 :',event.data) + document.getElementById('msgrecv').value = event.data }); player.on(ZLMRTCClient.Events.WEBRTC_ON_DATA_CHANNEL_ERR,function(event) { @@ -237,7 +242,7 @@ function send(){ if(player){ //send msg refernece https://developer.mozilla.org/en-US/docs/Web/API/RTCDataChannel/send - player.sendMsg(document.getElementById('msg').value) + player.sendMsg(document.getElementById('msgsend').value) } }