Embedding YouTube videos on Internet Explorer - html

I have embedded a YouTube clip on a webpage:
<div class="col-md-8">
<iframe id="theframe" width="400" height="325" src="http://www.youtube.com/embed/MYYOUTUBECLIP" frameborder="0" allowfullscreen class=""></iframe>
This works fine in Chrome and FireFox and displays as an embedded video in the webpage. However, if viewed on Internet Explorer (10 or 11) then when the user tries to view that page the browser redirects to youtube and then fails to load.
What is going on here? Many thanks...

The Best Possible answer can be, If you have ever noticed To play YouTube videos we need a plash player, and if you ever download flash player from sites like filehippo you will see that there are two version of it
1st, IE
2nd Non-IE.
The clients may be missing IE version of flash player.
try installing IE flash player and try again. Good Luck.
Try this code:
<object type="application/x-shockwave-flash" data="http://www.youtube.com/embed/MYYOUTUBECLIP" width="400" height="325">
<param name="movie" value="http://www.youtube.com/embed/MYYOUTUBECLIP" />
</object>

Ok. So the actual answer to my problem is that on some of the embedded links they were:
<iframe id="theframe" width="400" height="325" src="http://www.youtube.com/embed/MYYOUTUBECLIP" frameborder="0" allowfullscreen class=""></iframe>
while some were:
<iframe id="theframe" width="400" height="325" src="http:////www.youtube.com/embed/MYYOUTUBECLIP" frameborder="0" allowfullscreen class=""></iframe>
Notice the difference? The second one has "http:////www..." which is two too many '/'. It appears that Internet Explorers don't like this so try and send you off to the url. One of those quirky things, eh...

Related

Is there a way to embed a facebook video and have sound start on play on non mobile devices?

This may sound simple but I'm just trying to embed a facebook video (preferrably via iframe but can use SDK method) and have it so when the visitor hits play the video plays with sound. Every video I've played on laptops the video is muted (tried chromebook and Windows computer, various browsers, none has sound unless visitor unmutes it).
However if I play on a iphone the sound plays as one would expect.
I've tried both the SDK and Iframe method and don't know how to get the sound on when someone hits play.
Here's a jsfiddle: https://jsfiddle.net/8vgoqf2k/
<iframe src="https://www.facebook.com/plugins/video.php?href=https%3A%2F%2Fwww.facebook.com%2FPretty52Official%2Fvideos%2Fvb.217293018312810%2F468824230316244%2F&width=500&show_text=false&appId=115391488481724&height=500" width="500" height="500" style="border:none;overflow:hidden" scrolling="no" frameborder="0" allowTransparency="true" allow="encrypted-media" allowFullScreen="true"></iframe>
On other platforms youtube, soundcloud, etc, the default behavior is for sound to be on when someone hits play. But not facebook (unless it's a phone).
Add &mute=0 to the iframe url.
<iframe src="https://www.facebook.com/plugins/video.php?href=https%3A%2F%2Fwww.facebook.com%2FPretty52Official%2Fvideos%2Fvb.217293018312810%2F468824230316244%2F&width=500&mute=0&show_text=false&appId=115391488481724&height=500" width="500" height="500" style="border:none;overflow:hidden" scrolling="no" frameborder="0" allowTransparency="true" allow="encrypted-media" allowFullScreen="true"></iframe>

youtube embed video not working with safari

I have a simple page with this HTML code :
<iframe width="100%" height="480" src="https://www.youtube.com/embed/5FSsednibXQ?controls=0&showinfo=0" frameborder="0" allowfullscreen=""></iframe>
It is working fine in chrome but not in safari. I only have the black box with safari.
Any idea ? What is the correct way to embed a youtube video in safari ?
Try using this:
<object>
<param name="movie" value="http://www.youtube.com/v/[VIDEO_ID]"></param>
<embed src="http://www.youtube.com/v/[VIDEO_ID]" type="application/x-shockwave-flash"></embed>
</object>
It's explained here:
Making youtube.com/embed URLs work on iOS

How to stop embedded videos on my website from autoplaying

embed src="clip2.mp4" width="600" height="400" scale="aspect" controller="true"
This is the code I have used to display the video onto my website, but does anybody know how to stop the video from automatically playing once the website has loaded?
you need to add these two attributes to the <embed>
autoplay="false"
autostart="false"
Some browsers wont recognize true or false. In such situations try,
autoplay="0"
autostart="0"

youtube html video integration

I have a slight problem with a webpage : when I try to load a youtube video it shows a white rectangle ( I'm on firefox with win 8.1 x 64 and Yes, I did a flash player update )
Here's the code :
<object type="application/x-shockwave-flash" width="800" height="600"data="https://www.youtube.com/watch?v=jRXQsQKGqIU"><param name="movie" value="https://www.youtube.com/watch?v=jRXQsQKGqIU" /></object>
Can somebody tell me what's wrong with it ?
The other parts of the HTML code are just fine but this youtube code keeps showing me this white rectangle in my webpage instead of the video.
According to Google, the best way to embed is to use iframes:
Best practice: IFrame embeds are the recommended method for embedding
a YouTube player because the IFrame will select the appropriate player
based on the client's capabilities and available YouTube file formats.
That would look like this:
<iframe width="420" height="315" src="//www.youtube.com/embed/jRXQsQKGqIU" frameborder="0" allowfullscreen></iframe>
However, if you wish to use the Object tag, here's a working example:
<object width="640" height="390">
<param name="movie"
value="https://www.youtube.com/v/jRXQsQKGqIU?version=3&autoplay=1"></param>
<param name="allowScriptAccess" value="always"></param>
<embed src="https://www.youtube.com/v/M7lc1UVf-VE?version=3&autoplay=1"
type="application/x-shockwave-flash"
allowscriptaccess="always"
width="640" height="390"></embed>
</object>
Working JS Fiddle: http://jsfiddle.net/RAZC4/2/
https://developers.google.com/youtube/player_parameters
Maybe you can use the new code..
<iframe width="800" height="600" src="//www.youtube.com/embed/jRXQsQKGqIU" frameborder="0" allowfullscreen></iframe>
Have you made sure that your browser supports flash?
Otherwise I would suggest using the new embed code

embedding ooyala video without flashvars not working in firefox

I am trying to embed a ooyala video on a web page using the emebed tag. By just giving the src it works fine in chrome and surprisingly in IE, but if fails in FF.
<embed src="http://player.ooyala.com/player.swf?embedCode=c3ajR4MjpyGe-djJaAxM6wa_SPQPijH7&version=2" type="application/x-shockwave-flash"
/>
for firefox I additionaly need to provide a flashvars property in the embed tag or else it gets stuck on 'loading'.
<embed src="http://player.ooyala.com/player.swf?embedCode=c3ajR4MjpyGe-djJaAxM6wa_SPQPijH7&version=2" type="application/x-shockwave-flash" flashvars="&embedCode=c3ajR4MjpyGe-djJaAxM6wa_SPQPijH7&videoPcode=FiYm06Tu_hQLSGqTeVTwSS1L4vV7"
/>
Here is the fiddle demonstrating the issue. Open it in ff and you will see the second video forever stuck on loading while both the video play fine in chrome and IE.
You can use <iframe></iframe>
<iframe id="Iframe" width="640" height="360" src="http://player.ooyala.com/player.swf?embedCode=c3ajR4MjpyGe-djJaAxM6wa_SPQPijH7&version=2" frameborder="0"></iframe>
it supports all browser