iPhone Safari/UIWebView 上的视频内容 [英] video content on iPhone Safari/UIWebView

查看:22
本文介绍了iPhone Safari/UIWebView 上的视频内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的应用程序中,我有一个可以正常播放 Youtube 视频的 UIWebView,但我想从 Youtube 以外的网站播放一些视频.如果我尝试在 iPhone Safari 浏览器中播放这些视频,它会以与 YouTube 视频相同的方式打开(全屏模式,显示播放器),但在我的应用程序内的 UIWebView 中不会发生这种情况.

In my application I have a UIWebView that is able to play Youtube videos normally, but I'd like to play some videos from a website other than Youtube. If i try to play those videos in the iPhone Safari browser it opens in the same way that YouTube videos (fullscreen mode, showing the player), but that doesn't happen in the UIWebView inside my application.

例如,考虑以下 URL:http://m.video.globo.com/#video.php?id=1174097(不要忘记在模拟器中打开)

As an example, consider the following URL: http://m.video.globo.com/#video.php?id=1174097 (don't forget to open it in the simulator)

我无需下载任何插件或应用程序即可播放.iPhone 设置中的 JavaScript 和插件选项均已打开.

I didn't have to download any plugin or application to play it. Both JavaScript and Plug-Ins options in the iPhone Settings are turned on.

我的 UIWebView 有什么问题吗?我所做的就是使用 UIWebView 类中的loadRequest"方法加载网页.

Is there something wrong with my UIWebView? All I'm doing is loading the webpage using the "loadRequest" method from UIWebView class.

提前致谢.

推荐答案

iPhone 支持 youtube 视频(因此内置了 youtube 播放器),除此之外它只支持 quicktime.不支持其他格式:现在大多数网站都使用 Flash 来制作视频(包括 youtube),但 iPhone 不支持 Flash.我的网站嵌入 youtube 视频会起作用,但嵌入其他地方托管的视频不会(除非它的快速时间)

The iPhone has support for youtube videos, (hence the built in youtube player), other than that it supports only quicktime. There is no support for other formats: most sites use flash for video these days (inc youtube), but flash is not supported on the iPhone. I site embedding a youtube video will work, but one embedding a video hosted elsewhere will not (unless its quicktime)

这篇关于iPhone Safari/UIWebView 上的视频内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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