From 326038f26261815ebe28f503e294cf19e086ec02 Mon Sep 17 00:00:00 2001 From: TheRockYT <91672537+TheRockYT@users.noreply.github.com> Date: Thu, 4 Apr 2024 23:05:09 +0200 Subject: [PATCH] Remove custom implementation of MediaSessionService. It is disabled anyway. --- src/preload.ts | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/src/preload.ts b/src/preload.ts index 9bf463b..b1f6109 100644 --- a/src/preload.ts +++ b/src/preload.ts @@ -493,23 +493,6 @@ function getTrackID() { return window.location; } -function updateMediaSession(options: Options) { - if ("mediaSession" in navigator) { - navigator.mediaSession.metadata = new MediaMetadata({ - title: options.title, - artist: options.artists, - album: options.album, - artwork: [ - { - src: options.icon, - sizes: "640x640", - type: "image/png", - }, - ], - }); - } -} - /** * Watch for song changes and update title + notify */ @@ -574,9 +557,6 @@ setInterval(function () { } }).then(() => { updateMediaInfo(options, titleOrArtistsChanged); - if (titleOrArtistsChanged) { - updateMediaSession(options); - } }); } else { // just update the time