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

player.loadVideo() sometimes freezes the video playback #1024

Open
obber opened this issue Apr 10, 2024 · 1 comment
Open

player.loadVideo() sometimes freezes the video playback #1024

obber opened this issue Apr 10, 2024 · 1 comment

Comments

@obber
Copy link

obber commented Apr 10, 2024

Expected Behavior

I expect player.loadVideo(ID) to play ID without issue once it's loaded.

Actual Behavior

Video ID will begin playing but freeze in the middle of playback.

Steps to Reproduce

I've recorded a loom of me reproducing this with a bit more context here: https://www.loom.com/share/e13b15c651d549e884d7c41db83c305f

  1. Clone this minimal reproduction repository: https://github.com/obber/vimeo-playback-issue-sandbox
  2. CD to the root directory of the repo.
  3. Run npm i
  4. Run npm start
  5. Navigate videos using the forwards / back button (in no particular pattern, at least that I've observed)
  6. Observe that the video will freeze sometimes for some videos.

Thanks for investigating! Any direction or guidance would be really appreciated :)

@KevinWilson-Linney
Copy link

KevinWilson-Linney commented May 2, 2024

I am experiencing the same issue.

We have a set of 5 videos. Intermittently, one of the videos will load and not start streaming any data.

Edit:

The issue with .loadVideo() seems to be related to the background & autoplay options. If you leave the controls visible, you will see the video loads ahead but does not play.

A crude fix to this for the time being:

player
    .loadVideo({video_options})
    .then(
        setTimeout(() => {
            player.play();
        }, 1000)
    )
    .catch((error) => {
        console.error(error);
    });

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