Skip to content

Support for friendly iframes#24

Open
davidmh wants to merge 1 commit intoMailOnline:masterfrom
davidmh:iframe-support
Open

Support for friendly iframes#24
davidmh wants to merge 1 commit intoMailOnline:masterfrom
davidmh:iframe-support

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