mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-22 19:00:01 +08:00
fix(www/webrtc): update 1080x720~1280x720 as default selected resolution in webrtc. (#2645)
This commit is contained in:
parent
d41afa5d48
commit
15d752d6ae
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user