Remove custom implementation of MediaSessionService. It is disabled anyway.

This commit is contained in:
TheRockYT 2024-04-04 23:05:09 +02:00
parent 2e31b5d913
commit 326038f262

View File

@ -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