Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS 8 Embedded YouTube in HTML web app fails

YouTube iOS8 Media Load Issue - Media plays successfully while in Safari, but when the app is loaded from a Home Screen web clip, playing the video fails.

Moreover, tapping a link to navigate away from the page while the media is failing to load results in a complete crash of the app to the Home Screen.

Here is a link that demonstrates this (obviously run on your iDevice). You can run it initially in Safari browser, it'll work fine. Install it as a home screen icon, playing video will fail, and clicking the bottom link will crash the app.

http://nterspace.com/youtubeissue.html

The code that works when the app is loaded up in the Safari browser is:

<iframe width="100%" maxwidth="432" height="270" src="//www.youtube.com/embed/_j4KrMAygJI" frameborder="0" allowfullscreen></iframe> 

Anyone have any thoughts? Is this bad embed code?

like image 760
sneuf Avatar asked Sep 22 '14 11:09

sneuf


People also ask

Does HTML work on YouTube?

You can embed youtube video in html without iframe tag. You can use HTML object tag to embed multimedia (like audio, video, Java applets, ActiveX, PDF, and Flash) in your web pages.

How do I get the YouTube embed code on my Iphone?

Locate the video you wish to use and click on the Share link located beneath the video. 2. Next, click on the Embed icon The embed code will then be displayed. Copy and paste the embed code into your course.


2 Answers

Today, April 09, 2015. Finally , this issue is partially resolved. After updating to version 8.3 my webapps returned to work again for the dailymotion and vimeo videos. Youtube videos are now redirecting to the native application, which is very annoying.

EDIT:

As the youtube videos was redirecting to the native application , I had to use the youtube url as follows:

<iframe width="100%" height="300" src="https://www.youtube-nocookie.com/embed/hdjL8WXjlGI?rel=0&amp;controls=0&amp;showinfo=0" frameborder="0" allowfullscreen></iframe> 

So my users can watch the video without having to leave the webapp.

For some reason the nocookie option does not redirect. Let's hope that this will be completely fixed in the next iOS version.

like image 148
Daniel Lima Avatar answered Sep 20 '22 12:09

Daniel Lima


I am having the same issues!

This is an issue particular to IOS8. Please see: https://discussions.apple.com/thread/6558443 Hopefully Apple will fix this issue soon. Another issue arising is unable to use Play button: The Play button on a youtube embed does not work on android-chrome

UPDATE: They have fixed the PLAY button ISSUE!

like image 44
Rdg Avatar answered Sep 19 '22 12:09

Rdg