From c18c8cfd944b0c0f2892edd63208d8b3729c9c90 Mon Sep 17 00:00:00 2001
From: xiongguangjie
- + + echo push play
@@ -84,17 +85,15 @@ document.getElementById('streamUrl').value = url document.getElementsByName("methond").forEach((el,idx)=>{ el.onclick=function(e){ - if(el.value == "play") - { - let url = document.getElementById('streamUrl').value; - - document.getElementById('streamUrl').value = url.replace("&type=push","&type=play"); + let url = new URL(document.getElementById('streamUrl').value); + url.searchParams.set("type",el.value) + document.getElementById('streamUrl').value = url.toString() + + if(el.value == "play"){ recvOnly = true; - } - else - { - let url = document.getElementById('streamUrl').value; - document.getElementById('streamUrl').value = url.replace("&type=play","&type=push"); + }else if(el.value == "echo"){ + recvOnly = false; + }else{ recvOnly = false; } };