Skip to content

Get Exact Milliseconds Playback

I get this output from player.time.value

152
405
901
1401
1905
2404
2655
2906
3401
3654
4154
4654

Formatted Output:

00:00:00.154
00:00:00.404
00:00:00.905
00:00:01.403
00:00:01.901
00:00:02.403
00:00:02.903
00:00:03.403
00:00:03.654
00:00:04.153
00:00:04.653
00:00:05.152
00:00:05.405
00:00:05.902
00:00:06.405
00:00:06.903
00:00:07.402
00:00:07.653

You can see that there is a difference of 253 ms between 152 and 405, this will cause some problem if I want to add subtitles for example, or adding a custom slider when the video is playing (the slider will jump instead of smoothly moving).

How can I get the exact playback time?

Edited by Hadi Dbouk
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information