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

RangeError when used with videojs-youtube and videojs-vimeo #17

Open
Yi-Zhou opened this issue Aug 25, 2016 · 3 comments
Open

RangeError when used with videojs-youtube and videojs-vimeo #17

Yi-Zhou opened this issue Aug 25, 2016 · 3 comments
Labels

Comments

@Yi-Zhou
Copy link

Yi-Zhou commented Aug 25, 2016

Hi there.

It seems that this plugin only works if the source is a video file. I get this error when it's used with videos from YouTube or Vimeo, and sometimes the browser crashes:

VIDEOJS: RangeError: Maximum call stack size exceeded(…) videojs.js:19296 VIDEOJS: RangeError: Maximum call stack size exceeded(…)

The stack looks like this:

image

Please let me know if anyone could help me solve this problem.

@bjmrey
Copy link

bjmrey commented Jun 4, 2019

This is an infinite loop issue: this.currentTime(0) calls the function setCurrentTimein videojs-youtube, which itself triggers a timeupdate event. Since we are already in the onPlayerTimeUpdate function, this leads to infinite function calls.

A workaround would be to switch timeupdate off and on again:

this.off('timeupdate', onPlayerTimeUpdate);
this.currentTime(0);
this.on('timeupdate', onPlayerTimeUpdate);

@cladera
Copy link
Owner

cladera commented Jun 5, 2019

Thank you @Yi-Zhou and @bjmrey I'll take a look ASAP.

@cladera cladera added the bug label Jun 5, 2019
@dy
Copy link

dy commented Jun 17, 2021

Yeah, stumbled here too

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

No branches or pull requests

4 participants