Merge branch 'main' of https://github.com/ciderapp/Cider
This commit is contained in:
commit
ad08e41778
2 changed files with 31 additions and 3 deletions
3
index.js
3
index.js
|
@ -55,7 +55,8 @@ const configDefaults = {
|
|||
"animated_artwork_qualityLevel": 1,
|
||||
"bg_artwork_rotation": false,
|
||||
"hw_acceleration": "default", // default, webgpu, disabled
|
||||
"window_transparency": "disabled"
|
||||
"window_transparency": "disabled",
|
||||
"videoRes": 720
|
||||
},
|
||||
"lyrics": {
|
||||
"enable_mxm": false,
|
||||
|
|
|
@ -23260,9 +23260,36 @@
|
|||
}
|
||||
if (null != (l = "string" != typeof (h = g.pathwayID) ? im("invalid steering manifest PATHWAY-PRIORITY list item data type") : /^[\w\-\.]+$/.test(h) ? void 0 : im("steering manifest contains invalid pathway ID: " + h)))
|
||||
break;
|
||||
if (g.hdcpLevel === "NONE"){
|
||||
n.push(g)}
|
||||
let cpc = g.allowedCPCMap ? JSON.stringify(g.allowedCPCMap) : "null";
|
||||
if (!cpc.includes("WIDEVINE_HARDWARE") && !g.url.includes('trickPlay'))
|
||||
n.push(g)
|
||||
}
|
||||
|
||||
|
||||
|
||||
try{
|
||||
// console.log(n, window.screen.width)
|
||||
let ok = (n.map( function(item){return{height : item.height, content: item}}));
|
||||
let screenHeight = (app.cfg.visual.videoRes ?? window.screen.height) ;
|
||||
ok.sort(function (a, b) {
|
||||
return a.height - b.height;
|
||||
});
|
||||
for (var i = 0; i < ok.length; i++){
|
||||
if (ok[i].height > screenHeight){
|
||||
if (i == 0){n.splice(0,n.length);n.push(ok[i].content)}
|
||||
else{n.splice(0,n.length);n.push(ok[i-1].content)}
|
||||
console.log('selected' , n[0].height)
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
if (n.length > 1){
|
||||
n.splice(0,n.length - 1);
|
||||
}
|
||||
// console.log(n)
|
||||
// console.log(ok)
|
||||
} catch (e){ console.log(e)}
|
||||
return {
|
||||
variantMediaOptions: n,
|
||||
contentSteeringOption: u,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue