youtube embed video not working with safari - html

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

Related

Object youtube embed not working in Firefox

So for some reason, I'm having issues making my object embed work on Firefox, but it works on all other browsers such as Chrome, Edge, etc..
Here is the code that I'm using:
<object width="640" height="400">
<param name="movie" value="https://www.youtube.com/embed/X29_UP1FWVQ">
<embed src="https://www.youtube.com/embed/X29_UP1FWVQ" type="application/x-shockwave-flash" width="640" height="400">
</object>
Does anyone know if something special has to be passed for Firefox?
I figured out the problem, you need an data="" attribute on the object for this to work.

Embedding YouTube videos on Internet Explorer

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...

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

Soundcloud embedded HTML theme_color option not working

I am embedding Soundcloud HTML code in a web page to show the audio player. Previewing in Safari 5.1.4 on Mac and running in a webview in my iPhone app (which should behave the same as Safari) the embed parameter "theme_color" does not work.
E.g.
<iframe width="100%" height="166" scrolling="no" frameborder="no" src="http://w.soundcloud.com/player/?url=http://api.soundcloud.com/tracks/44200324&auto_play=true&color=915f33&theme_color=00FF00"></iframe>
Anyone know why or a workaround? I want to be able to "colourise" the main look of the player from grey to another colour.
You can have custom colors using flash object:
<object height="81" width="100%">
<param name="movie" value="https://player.soundcloud.com/player.swf?url=http%3A%2F%2Fapi.soundcloud.com%2Ftracks%2F32678080&show_comments=true&auto_play=false&color=00cc00&theme_color=111111"></param>
<param name="allowscriptaccess" value="always"></param>
<embed allowscriptaccess="always" height="81" src="https://player.soundcloud.com/player.swf?url=http%3A%2F%2Fapi.soundcloud.com%2Ftracks%2F32678080&show_comments=true&auto_play=false&color=00cc00&theme_color=111111" type="application/x-shockwave-flash" width="100%"></embed>
</object>
For the list of available params take a look at:
http://developers.soundcloud.com/docs/widget