Skip to content

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

@jack-arturo

Description

@jack-arturo

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions