videojs-record icon indicating copy to clipboard operation
videojs-record copied to clipboard

Timestamp event doesn't performance as timeSlice sets

Open TimurJiangShan opened this issue 2 years ago • 2 comments

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. Screen Shot 2022-04-13 at 5 01 09 pm

Screen Shot 2022-04-13 at 5 41 05 pm

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

TimurJiangShan avatar Apr 13 '22 07:04 TimurJiangShan

Same issue

SylvanoTombo avatar Jul 04 '23 09:07 SylvanoTombo

Any update on this?

SylvanoTombo avatar Aug 02 '23 18:08 SylvanoTombo