You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: