chore: Prettified Code

[ci skip]
This commit is contained in:
vapormusic 2022-09-14 16:58:33 +00:00 committed by cider-chore[bot]
parent d4e23a3e75
commit f009c4b13c

View file

@ -5058,34 +5058,35 @@ 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();
}
} }
} }
} }
} }
}, },