videojs-record
videojs-record copied to clipboard
Timestamp event doesn't performance as timeSlice sets
Description
Briefly describe the issue.
In most cases, timestamp can work as expected, but sometimes, "timestamp" event doesn't performance as timeSlice sets Code is here:
const videoJsPlayerOptions = {
controls: false,
fluid: false,
plugins: {
record: {
audio: true,
video: true,
debug: true,
timeSlice: 1000,
maxLength: videoLength
}
}
}
player.on("timestamp", function () {
const currentTime = Math.floor(player.record().getCurrentTime())
setCurrentTime(formatTime(currentTime))
console.log(`Current Time: ${formatTime(currentTime)}`)
})
In the console, the current time doesn't increment 1s by 1s, sometimes it will jump 2s.

Steps to reproduce
Explain in detail the exact steps necessary to reproduce the issue. set up a video and timestamp event, console that current time .
Results
Expected
Please describe what you expected to see.
The currentTime
should increment 1s by 1s
Actual
Please describe what actually happened.
Sometimes, the currentTime
jump 2s and get normal.
Error output
If there are any errors at all, please include them here.
No error
Additional Information
Please include any additional information necessary here. Including the following:
versions
videojs
^7.15.4 what version of videojs does this occur with? ^4.5.0
browsers
Chrome: Version 99.0.4844.84 (Official Build) (arm64) MacOS Safari: Version 15.2 (17612.3.6.1.6)
OSes
what platforms (operating systems and devices) are affected? MacBook Pro (16-inch, 2021), MacOs: version 12.1
Same issue
Any update on this?