chore: Prettified Code
[ci skip]
This commit is contained in:
parent
d4e23a3e75
commit
f009c4b13c
1 changed files with 21 additions and 20 deletions
|
@ -5057,35 +5057,36 @@ const app = new Vue({
|
||||||
});
|
});
|
||||||
// Load first source
|
// Load first source
|
||||||
let src = sources[0];
|
let src = sources[0];
|
||||||
if (src.includes("http")){
|
if (src.includes("http")) {
|
||||||
app.mk._services.mediaItemPlayback._currentPlayer._playAssetURL(src, false);} else {
|
app.mk._services.mediaItemPlayback._currentPlayer._playAssetURL(src, false);
|
||||||
|
} else {
|
||||||
if (Hls.isSupported()) {
|
if (Hls.isSupported()) {
|
||||||
let d = "WIDEVINE_SOFTWARE"
|
let d = "WIDEVINE_SOFTWARE";
|
||||||
let h = {
|
let h = {
|
||||||
initDataTypes: ["cenc", "keyids"],
|
initDataTypes: ["cenc", "keyids"],
|
||||||
distinctiveIdentifier: "optional",
|
distinctiveIdentifier: "optional",
|
||||||
persistentState: "required"
|
persistentState: "required",
|
||||||
}
|
};
|
||||||
let p = {
|
let p = {
|
||||||
platformInfo: { requiresCDMAttachOnStart: !0, maxSecurityLevel: d, keySystemConfig: h },
|
platformInfo: { requiresCDMAttachOnStart: !0, maxSecurityLevel: d, keySystemConfig: h },
|
||||||
appData: { serviceName: "Apple Music" }
|
appData: { serviceName: "Apple Music" },
|
||||||
}
|
};
|
||||||
if (app.radiohls != null && app.radiohls.destroy != null){
|
if (app.radiohls != null && app.radiohls.destroy != null) {
|
||||||
app.radiohls.destroy()
|
app.radiohls.destroy();
|
||||||
setTimeout(()=>{
|
setTimeout(() => {
|
||||||
app.radiohls = new CiderHls();
|
app.radiohls = new CiderHls();
|
||||||
app.radiohls.loadSource(e);
|
app.radiohls.loadSource(e);
|
||||||
app.radiohls.attachMedia(app.mk._services.mediaItemPlayback._currentPlayer._targetElement);
|
app.radiohls.attachMedia(app.mk._services.mediaItemPlayback._currentPlayer._targetElement);
|
||||||
app.mk._services.mediaItemPlayback._currentPlayer._targetElement.play()},500)
|
app.mk._services.mediaItemPlayback._currentPlayer._targetElement.play();
|
||||||
|
}, 500);
|
||||||
} else {
|
} else {
|
||||||
app.radiohls = new CiderHls();
|
app.radiohls = new CiderHls();
|
||||||
app.radiohls.loadSource(e);
|
app.radiohls.loadSource(e);
|
||||||
app.radiohls.attachMedia(app.mk._services.mediaItemPlayback._currentPlayer._targetElement);
|
app.radiohls.attachMedia(app.mk._services.mediaItemPlayback._currentPlayer._targetElement);
|
||||||
app.mk._services.mediaItemPlayback._currentPlayer._targetElement.play()}
|
app.mk._services.mediaItemPlayback._currentPlayer._targetElement.play();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue