HTML Web 应用程序中的 iOS 8 嵌入式 YouTube 失败 [英] iOS 8 Embedded YouTube in HTML web app fails

查看:33
本文介绍了HTML Web 应用程序中的 iOS 8 嵌入式 YouTube 失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

YouTube iOS8 媒体加载问题 - 媒体在 Safari 中播放成功,但当应用从主屏幕网络剪辑加载时,视频播放失败.

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.

这是一个演示此链接的链接(显然在您的 iDevice 上运行).您最初可以在 Safari 浏览器中运行它,它会正常工作.将其安装为主屏幕图标,播放视频会失败,点击底部链接会导致应用程序崩溃.

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

在 Safari 浏览器中加载应用程序时工作的代码是:

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?

推荐答案

今天,2015 年 4 月 9 日.终于,这个问题得到了部分解决.更新到 8.3 版后,我的 webapps 再次为 Dailymotion 和 vimeo 视频恢复工作.Youtube 视频现在重定向到本机应用程序,这很烦人.

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.

由于 youtube 视频被重定向到本机应用程序,我不得不使用 youtube 网址,如下所示:

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.

出于某种原因,nocookie 选项不会重定向.希望下个iOS版本能彻底解决这个问题.

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

这篇关于HTML Web 应用程序中的 iOS 8 嵌入式 YouTube 失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆