YouTube Remaining Time

Show the remaining time of a YouTube video inside the player.

< Feedback on YouTube Remaining Time

प्रश्न/टिप्पणी

h_h
§
पोस्ट केले: 2021-06-30

Correction for divideTime():

With SHOW_REAL_TIME_REMAINING on, the minute value is often wrong for long videos. You already use the % modulo operator on the seconds property. But it must also be used on minutes and hours, like so:

        hours: Math.floor(newTimeSeconds / (60 * 60)) % 24,
        minutes: Math.floor(newTimeSeconds / 60) % 60,

You can use this test video (10 hours long): https://www.youtube.com/watch?v=L_LUpnjgPso

Without this change, with playback speed 1x, only the minute value is wrong. With playback speed 0.25x, the hour value is also wrong.

उत्तर पोस्ट करा

उत्तर पोस्ट करण्यासाठी साइन इन करा.