Commit 15d752d6 by johzzy Committed by GitHub

fix(www/webrtc): update 1080x720~1280x720 as default selected resolution in webrtc. (#2645)

parent d41afa5d
...@@ -122,16 +122,16 @@ ...@@ -122,16 +122,16 @@
}; };
}); });
ZLMRTCClient.GetAllScanResolution().forEach((r,i)=>{ ZLMRTCClient.GetAllScanResolution().forEach((r,i) => {
opt = document.createElement('option'); opt = document.createElement('option');
opt.text = r.label +"("+r.width+"x"+r.height+")"; opt.text = `${r.label}(${r.width}x${r.height})`;
opt.value = r; opt.value = r;
if (1080*720 <= r.width * r.height && r.width * r.height <= 1280*720) {
opt.selected = true;
}
document.getElementById("resolution").add(opt,null) document.getElementById("resolution").add(opt,null)
});
//console.log(opt.text.match(/\d+/g))
})
function start_play(){ function start_play(){
let elr = document.getElementById("resolution"); let elr = document.getElementById("resolution");
let res = elr.options[elr.selectedIndex].text.match(/\d+/g); let res = elr.options[elr.selectedIndex].text.match(/\d+/g);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论