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

Support for friendly iframes #24

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

davidmh
Copy link

@davidmh davidmh commented Mar 28, 2017

I found a problem while using your videojs-vast-vpaid plugin. When the player and libraries are used inside a friendly iframe, the postMessage sends a "null" as the origin.

To solve that, we I'm using window.parent.location instead of window.location.

It's safe for non-iframed players as well because if a window does not have a parent, its parent property is a reference to itself.

Here's an example showing both the issue and the solution:

http://jsbin.com/boricow/edit?js,output

Having the player inside of a friendly iframe allows it to work along virtual-dom based apps.

@jtfell
Copy link

jtfell commented Jun 16, 2017

Is it possible to merge this @Fetz? I am currently relying on this fork to use this library but would prefer to use the official repo. Cheers.

iq-dot added a commit to iq-dot/VPAIDHTML5Client that referenced this pull request Jul 28, 2017
* Add global radio ad tag
Add production, test and debug build commands

* Add nigella site adtags
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

Successfully merging this pull request may close these issues.

3 participants