Show the remaining time of a YouTube video inside the player.
< 脚本YouTube Remaining Time的反馈
Correction for divideTime():
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:
SHOW_REAL_TIME_REMAINING
%
seconds
minutes
hours
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.
登录(不可用)以发表回复。
土豆服务器,请按需使用
镜像地址随时可能被墙,建议加群获取最新地址
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址
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 theseconds
property. But it must also be used onminutes
andhours
, like so: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.