From 87aa98ca264f5f1f9eaa63d5c897688395399ee3 Mon Sep 17 00:00:00 2001 From: vapormusic Date: Sun, 21 Aug 2022 09:56:38 +0700 Subject: [PATCH] allow mv audio to be casted (expect massive delay) --- src/renderer/main/vueapp.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/renderer/main/vueapp.js b/src/renderer/main/vueapp.js index 4526fde8..3d17e286 100644 --- a/src/renderer/main/vueapp.js +++ b/src/renderer/main/vueapp.js @@ -194,6 +194,7 @@ const app = new Vue({ title: "", type: "", }, + MVsource: null, prevButtonBackIndicator: false, currentSongInfo: {}, page: "", @@ -992,6 +993,19 @@ const app = new Vue({ if (this.currentSongInfo === null || this.currentSongInfo === undefined) { return; } // EVIL EMPTY OBJECTS BE GONE + + try{ + if ((MusicKit.getInstance().nowPlayingItem["type"] ?? '').includes("ideo")){ + setTimeout(() => { + this.MVsource = CiderAudio.context.createMediaElementSource(document.querySelector('div#apple-music-video-player > video')); + this.MVsource.connect(CiderAudio.audioNodes.intelliGainComp); }, 300);} else { + this.MVsource.disconnect(); + this.MVsource = null + } + } catch (e) { + // console.log(e); + } + let localFiles = false; try { if (app.mk.nowPlayingItem.flavor.includes("64") && app.mk.nowPlayingItem.flavor.includes(":")) {