mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-22 02:34:26 +08:00
parent
1e39594335
commit
69800632fe
@ -115,17 +115,10 @@
|
||||
document.getElementsByName("method").forEach((el,idx) => {
|
||||
el.checked = el.value === type;
|
||||
el.onclick = function(e) {
|
||||
let url = new URL(document.getElementById('streamUrl').value);
|
||||
const 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 if(el.value == "echo"){
|
||||
recvOnly = false;
|
||||
}else{
|
||||
recvOnly = false;
|
||||
}
|
||||
recvOnly = 'play' === el.value;
|
||||
};
|
||||
});
|
||||
|
||||
@ -145,6 +138,25 @@
|
||||
let h = parseInt(res.pop());
|
||||
let w = parseInt(res.pop());
|
||||
|
||||
const url = new URL(document.getElementById('streamUrl').value);
|
||||
const newUrl = new URL(window.location.href);
|
||||
let count = 0;
|
||||
if (url.searchParams.has('app')) {
|
||||
newUrl.searchParams.set('app', url.searchParams.get('app'));
|
||||
count++;
|
||||
}
|
||||
if (url.searchParams.has('stream')) {
|
||||
newUrl.searchParams.set('stream', url.searchParams.get('stream'));
|
||||
count++;
|
||||
}
|
||||
if (url.searchParams.has('type')) {
|
||||
newUrl.searchParams.set('type', url.searchParams.get('type'));
|
||||
count++;
|
||||
}
|
||||
if (count > 0) {
|
||||
window.history.pushState(null, null, newUrl);
|
||||
}
|
||||
|
||||
player = new ZLMRTCClient.Endpoint(
|
||||
{
|
||||
element: document.getElementById('video'),// video 标签
|
||||
|
Loading…
Reference in New Issue
Block a user