Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
472 views
in Technique[技术] by (71.8m points)

html - 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&amp;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 ?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...