Iframe with webplayer: Uncaught ReferenceError: BrowserDetect is not defined - iframe

I have an iframe and the first page that i load in this iframe is responsive and works properly.
When i click a link within iframe it opens an other cdn page with a webplayer iframe on it and i get this error Uncaught ReferenceError: BrowserDetect is not defined for a webplayer.iframe
This causes the webplayer not to be responsive.
Is there anyway i can help through iframe configuration the webplayer to detect my browser?
HTML5 video is height: 100%; width: 100%; so normally should be responsive.
I have no access to the iframe content and they are not from the same domain. Thnx

Related

Iframe content blocked

I have a page where I have an iframe using the following code.
<iframe name="SL" src="https://sl.se/sv/" width="100%" height="870px"></iframe>
It has been working without any problems, but yesterday it became a blank page in the iframe. I haven't updated anything in the page so it must be something in the iframe src that is blocking for some reason. Is there another way to get this page to show inside like an iframe, but with some other code?
If you see the console of your browser, it says:
Refused to display 'https://sl.se/sv/' in a frame because it set 'X-Frame-Options' to 'sameorigin'.
which means that they have disallowed loading of the resource in an iframe outside of their domain. For more information take a look at this.

How to disable Learn More anchor tag in youtube embed iframe

I am using youtube embed iframe for playing videos. If the src of the url does not contain valid URL on playing the video it throws "An error occured. Please try again later'. and there will be Learn More anchor tag. How do I disable that anchor tag using javascript?
It's not possible with JavaScript, as you can not access an iFrame from a different domain.
If you want to be sneaky, you could overlay the iframe with a z-indexed transparent div stop the user clicking in the iframe.

Unable to determine path for background image in Wicket

I creating a simple web page in Wicket 6.x, which also has a background image.
The landing page, which is localhost:8080, has the css defined in the html document as :
<style>
html,body{
background: url("bg.png");
}
</style>
bg.png is stored in src/main/webapp, and seems to work fine.
But once it goes to the next page, in which I have defined the css in the same way, the image does not show. On clicking the generated url, which is localhost:8080/wicket/bookmarkable/bg.png, the page says "resource not found".
Where do I keep my css resources and what should be the correct path? Also, is there any method or initialization I need to do in my java class file as well?
Use "/bg.png" as a path. This is context absolute path and will work no matter what is the url of the current page.

How can I tell if a page is being served to an iframe?

I took the src url of an iframe containing a google map, and tried to load it in my browser, but I got this response instead:
The Google Maps Embed API must be used in an iframe.
Try it for yourself: link
How does it know that the page is being loaded in a browser, rather than a frame?
if (window==window.top) { /* I'm not in an iframe */ }
Very simple javascript.

IE9 iframe src problem with Mixi "like" plugin

I'm trying to insert a Mixi "like" plugin into a site. The Mixi "like" plugin is just an iframe:
<iframe src="http://plugins.mixi.jp/favorite.pl?href=http%3A%2F%2Fexample.com%2Findex.html&service_key=0123456789ABC&show_faces=false" scrolling="no" frameborder="0" allowTransparency="true" style="border:0; overflow:hidden; width:450px;height:80px;"></iframe>
The problem I have is that the ?href argument passed to the src attribute is being interpreted by IE9 Standards Mode as an actual link, so clicking on the iframe causes the browser to navigate to that page (in this example, the browser window navigates to http://example.com/index.html).
Switching IE9 to Compatibility Mode doesn't seem to have the problem, but from what I understand that's an end-user option.
Is this a common IE9 problem, where the value of an iframe's src is scraped for an href argument and used incorrectly as a link?
This is not a problem with iframes in IE9, it's a problem with Mixi's javascript. Their scripts use an older version of Prototype (1.6) in which they call an event.stop() to stop propagation. The problem is, that stop() call has problems in IE9. So clicking on the link within their iframe doesn't stop iframe from navigating to that page. This is a problem on Mixi's end, and they need to update their javascript in order to fix it.
See: disable a link in IE9 - prototype stop() not working

Resources