Add first version for crossfade plugin

This commit is contained in:
TC
2023-02-01 22:18:27 +01:00
parent d44fb5c840
commit f422b25cb6
6 changed files with 622 additions and 0 deletions

13
plugins/crossfade/back.js Normal file
View File

@ -0,0 +1,13 @@
const { ipcMain } = require("electron");
const { Innertube } = require("youtubei.js");
module.exports = async (win, options) => {
const yt = await Innertube.create();
ipcMain.handle("audio-url", async (_, videoID) => {
const info = await yt.getBasicInfo(videoID);
const url = info.streaming_data?.formats[0].decipher(yt.session.player);
return url;
});
};