Presences
Presences copied to clipboard
YouTube Music | music.youtube.com - Correct Timestamps after resuming playback
Presence name
YouTube Music
Description
After resuming playback, the timestamps get reset as if the video started midway.
Alternatives
No response
Additional context
After looking through the code of the presence, it should be fairly simple to fix, I believe just one change in the last function of the presence should fix it (snippet - YouTube Music // presence.ts - Lines 268 - 279)
function updateSongTimestamps() {
const element = document
.querySelector<HTMLSpanElement>("#left-controls > span")
.textContent.trim()
.split(" / "),
[currTimes, totalTimes] = element;
mediaTimestamps = presence.getTimestamps(
presence.timestampFromFormat(currTimes),
presence.timestampFromFormat(totalTimes)
);
}