Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timestamp event doesn't performance as timeSlice sets #645

Open
TimurJiangShan opened this issue Apr 13, 2022 · 2 comments
Open

Timestamp event doesn't performance as timeSlice sets #645

TimurJiangShan opened this issue Apr 13, 2022 · 2 comments

Comments

@TimurJiangShan
Copy link

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

@SylvanoTombo
Copy link

Same issue

@SylvanoTombo
Copy link

Any update on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants