为什么在 iOS 上禁止播放 Flash 内容却允许播放 YouTube 视频?
Why YouTube videos are allowed to be played while flash stuff is forbidden on iOS?
据我所知,iOS 不支持 Flash。但是,仍然可以观看 YouTube 视频,而且它们是基于 Flash 的。 webView 中是否嵌入了一些逻辑,例如:
if ([url containsDomain:@"youtube.com"]) {
returns YES;
} else {
return NO;
}
据我所知,iOS 应用程序的大多数 YouTube 视频库都使用 webView 并将视频加载到 iFrame 中。那么为什么以及如何运作?
参见YouTube iFrame Player API Docs:
Note: YouTube <object>
embeds were deprecated on January 27, 2015. Please migrate your applications to the <iframe>
embeds, which can intelligently use whichever embedded player – HTML (<video>
) or Flash (<object>
) – the client supports.
HTML5 播放器将在所有受支持的设备上加载。如果 HTML5 播放器因任何原因无法加载(参见 ),播放器将 return 向客户端发送错误消息。
据我所知,iOS 不支持 Flash。但是,仍然可以观看 YouTube 视频,而且它们是基于 Flash 的。 webView 中是否嵌入了一些逻辑,例如:
if ([url containsDomain:@"youtube.com"]) {
returns YES;
} else {
return NO;
}
据我所知,iOS 应用程序的大多数 YouTube 视频库都使用 webView 并将视频加载到 iFrame 中。那么为什么以及如何运作?
参见YouTube iFrame Player API Docs:
Note: YouTube
<object>
embeds were deprecated on January 27, 2015. Please migrate your applications to the<iframe>
embeds, which can intelligently use whichever embedded player – HTML (<video>
) or Flash (<object>
) – the client supports.
HTML5 播放器将在所有受支持的设备上加载。如果 HTML5 播放器因任何原因无法加载(参见