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

Vimeo player API .on(seeked) and .on(timeupdate) give CORS error #255

Open
verygoodplugins opened this issue Nov 19, 2017 · 0 comments
Open

Comments

@verygoodplugins
Copy link

After Fitvids is initialized on a Vimeo player, setting .on('seeked') or .on('timeupdate') gives a CORS error.

I'm assuming this is because if the player is initialized on a #video-container element, and iframe is inserted, then future attempts to access the player fail because the immediate child of #video-container is no longer the iframe, but the .fluid-with-video-wrapper element.

I fixed this by changing line 77 to:

$this.parent().addClass('fluid-width-video-wrapper').css('padding-top', (aspectRatio * 100)+'%');

This probably can't be included in fitvids.js as it only works if the video container doesn't already have additional styling applied, but if anyone is getting errors trying to use the Vimeo player API with FitVids, this fix might help.

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

1 participant