I try to set up an iframe with src to youtube. The url inside an iframe is invisivble, when you inspect element in the browser. The same url pasted outside the iframe works perfectly.
<iframe width="420" height="315" ng-src="{{getChangeYouTubeLink(companyDetails.youTubeLink)}}"></iframe><br>
{{getChangeYouTubeLink(companyDetails.youTubeLink)}}
you see this when you inspect element
Do you have idea why it happens?
Related
I am trying to get a video with the video tag to include a fullscreen option in the controls. If I insert a video into a site using the following:
<video controls>
<source src="filename.mp4 " type="video/mp4">
</video>
I do not get the full screen button.
Interestingly when you look at w3schools the example on the page shows the fullscreen but when you click the Try me it does not.
Could it be because the tag is inside an frame? Is there a way around this?
"Could it be because the tag is inside an frame? Is there a way around this?"
Yes that seems to be the cause after some investigation. Putting a <video> tag inside an <iframe> will cause the fullscreen button to disappear in Firefox.
Regarding W3Schools...
The first page creates an actual video tag (see line 1143 of source code).
On the second "Try it yourself" page they're actually creating an iframe (see line 541 of "Try it" page's source code): var ifr = document.createElement("iframe"); etc.
Solution:
In the iframe code, add allowfullscreen, webkitallowfullscreenand mozallowfullscreen.
If using an <iframe> to load another HTML page (which holds the shown <video> code) then try:
<!DOCTYPE html>
<html>
<body>
<iframe width="800" height="600" src="video_page.html" frameborder="0" allowfullscreen webkitallowfullscreen mozallowfullscreen> </iframe>
</body>
PS:
"If I insert a video into a site using the following... [see posted code]"
Your posted code works fine. A <video> tag in a web page should have fullscreen controls. The problem you describe only shows up when using <iframe>.
I am trying to show a youtube video on my webpage and Blogspot page using HTML iframe.
<iframe width="320" height="250" src="http://youtube.com/watch?v=Y4lqtiYLuJU"></iframe>
But it's giving me the following forbidden error :
This website does not permit its contents to be displayed in a frame, it must be opened in a new window.
I am getting the same error on Blogspot when posting this iframe code to my Blogspot page.
Is there any way to fix this?
YouTube iframes works over HTTPS
<iframe width="320" height="250"
src="https://www.youtube.com/embed/Y4lqtiYLuJU">
</iframe>
I am using Iframe tag to play youtube video on an embedded box,
I am getting audio but video is not visible. i am not getting it's hiding or not supporting.
On execution , iframe widget is coming but when i play youtube video it hides the widget.
Below is my code sample of iframe tag.
<iframe width="420" height="315"
src="http://www.youtube.com/embed/XGSy3_Czz8k">
</iframe>
I want to show a youtube video in html 4. For that, I am using iframe. But the content of iframe is not showing.
<iframe frameborder="1" width="420" height="345" src="https://www.youtube.com/watch?v=C8kSrkz8Hz8"></iframe>
FYI: I am using Firefox 29.0 and Chrome 35.0. Both browsers are showing the same result.
Change your src with //www.youtube.com/embed/C8kSrkz8Hz8
your code shoud look like this
<iframe frameborder="1" width="420" height="345" src="//www.youtube.com/embed/C8kSrkz8Hz8"></iframe>
Find code under each video on youtoube at Share menu.
When you try to put the whole YouTube page into an iframe, it sends a HTTP header called X-Frame-Options with the SAMEORIGIN value, which tells the browser, that the page can only be displayed in a frame on the same origin as the page itself.
You should use the provided embed code (you can find it below every YouTube video), which is also an iframe, but with a different URL. It will only show the player.
In this case, the embed code would be:
<iframe width="560" height="315" src="//www.youtube.com/embed/C8kSrkz8Hz8" frameborder="0" allowfullscreen></iframe>
replace you Iframe with this one. this works for you.
<iframe width="640" height="390" src="//www.youtube.com/embed/C8kSrkz8Hz8" frameborder="0" allowfullscreen></iframe>
missing attributes are: frameborder="0", allowfullscreen
You should change the youtube URL to remove the "s" so it looks like this:
<iframe width="420" height="345" src="//www.youtube.com/embed/C8kSrkz8Hz8" frameborder="1" allowfullscreen></iframe>
You should also be able to embed a youtube video from the page. Please see the screenshot attached:
I tried it this way and worked for me. Changing your src="https://www.youtube.com/embed/C8kSrkz8Hz8"
following the other parameters.
I have client.jsp page i put following iframe inside it
<IFRAME SRC="<%=filterPath%>" width="100%" height="1811px" id="iframe1" marginheight="0" frameborder="0" ></iframe>
In client.jsp i have link to call other page and from that page i again redirect on client.jsp using following code
redirect
When i look viewsource for the same i found two iframe and code is like
<iframe>
<iframe>
<iframe>
</iframe>
Each time i called client.jsp from other page it creates new iframe
How i rid from this problem ?
You need to load the page in the main window, instead of IFRAME, when redirect is clicked.
You can achieve this by using the following code :
<a target="_parent" href="client.jsp">redirect</a>
If your link is inside of iframe and you load into iframe new client.jsp with other iframe - you will get this. This is ok. Just put at head of iframe this:
<base target="_parent" />
or specify for every link target="_parent":
your link