mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-22 19:00:01 +08:00
for rtc client demo add methond echo (#1167)
This commit is contained in:
parent
74aa2ba07f
commit
c18c8cfd94
@ -46,7 +46,8 @@
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
<label for="methond">methond(play or push):</label>
|
<label for="methond">methond(play or push or echo):</label>
|
||||||
|
<input type="radio" name="methond" value="echo" >echo
|
||||||
<input type="radio" name="methond" value="push" >push
|
<input type="radio" name="methond" value="push" >push
|
||||||
<input type="radio" name="methond" value="play" checked = true>play
|
<input type="radio" name="methond" value="play" checked = true>play
|
||||||
</p>
|
</p>
|
||||||
@ -84,17 +85,15 @@
|
|||||||
document.getElementById('streamUrl').value = url
|
document.getElementById('streamUrl').value = url
|
||||||
document.getElementsByName("methond").forEach((el,idx)=>{
|
document.getElementsByName("methond").forEach((el,idx)=>{
|
||||||
el.onclick=function(e){
|
el.onclick=function(e){
|
||||||
if(el.value == "play")
|
let url = new URL(document.getElementById('streamUrl').value);
|
||||||
{
|
url.searchParams.set("type",el.value)
|
||||||
let url = document.getElementById('streamUrl').value;
|
document.getElementById('streamUrl').value = url.toString()
|
||||||
|
|
||||||
document.getElementById('streamUrl').value = url.replace("&type=push","&type=play");
|
if(el.value == "play"){
|
||||||
recvOnly = true;
|
recvOnly = true;
|
||||||
}
|
}else if(el.value == "echo"){
|
||||||
else
|
recvOnly = false;
|
||||||
{
|
}else{
|
||||||
let url = document.getElementById('streamUrl').value;
|
|
||||||
document.getElementById('streamUrl').value = url.replace("&type=play","&type=push");
|
|
||||||
recvOnly = false;
|
recvOnly = false;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user