-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
Uncaught SecurityError when using iframe #2703
Comments
I have the same problem. Confirmed. |
So the code snippet you're referencing comes from the ES5-shim, but is this really a VJS issue? Trying to access an HTTPS-origin frame from an HTTP-origin frame isn't ever going to work for obvious security reasons. Mind putting up an example? |
Sounds like |
@mmcc in my case, the issue is occurring with an https iframe inside a cross-origin, https page. Of course we shouldn't expect it to work, but it's still a bug that is effectively breaking my iframe's JS behavior due to the generated SecurityError. |
What version of videojs are you using? 5.0? Are you using our ie8 shim? |
I don't believe I'm using any IE8 shim. Not sure how to confirm that. This SecurityError is with latest stable Google Chrome, BTW. |
@jtwalters do you have an example? |
I put together this jsfiddle which will give you a SecurityError viewable in the console. |
Of course this is an oversimplified example and doesn't actually represent the error that I have. |
Ah, I think i see where it's coming from. This is from our |
I am using videoJS with npm and require it like this: |
Whenever videojs is inside an iframe, I get this error. Any solution? |
Yes, me too, same problem. Videojs 5.0.0 produces the security error in Google Chrome, but the security error stops videojs from loading inside an iFrame. A quick fix would be HUGELY appreciated! |
Same issue, only in the latest chrome (v 46) |
If anyone needs a quick fix in the meantime, modifying this in your own hosted copy of Video.js works for me in Chrome 46:
|
@rickyblaha I am using the CDN version of videojs and the quick fix doesn't fix that issue. Did you manually change the video.js file? |
@jemoreno, just edited my comment to clarify. Since that is immediately invoked it would need to be changed within the library, so I did make that change on my own CDN-hosted copy. |
Working on getting this fixed. |
Waiting on ljharb/object-keys#17 |
Also note that the latest versions of That said, thanks for the "frame" PR, as I'd still like to blacklist all throwing keys that I can :-) |
@ljharb I tried updating to latest object.assign but it still caused problems. Since we're not using es5-shim directly. |
Oh, removed all of node_modules and reinstalled and it's fixed with latest |
That's great if it's fixed! How long until we can get this in CDN version 5.0.1, or self-hosted release via download (for those of us mortals who can't do a build ourselves)? |
Hopefully we'll get a fix out tomorrow but don't hold me to that. |
We have a release available for you to download: https://github.com/videojs/video.js/releases/tag/v5.0.2 (https://github.com/videojs/video.js/tree/v5.0.2/dist) I'll probably push to the CDN on monday. |
When using videoJS inside an iframe, the following code runs and cause an exception:
The problem is that window.frameElement throwing the following example:
The text was updated successfully, but these errors were encountered: