开发者

How to support landscape mode in uiwebview video tag?

I am loading a mp4 video file from a url using the video tag into a uiwebview:

<body style=\"margin:0\"><video src=\"%@\" width=\"285\" height=\"203\" 
poster=\"%@\" autoplay=\"autoplay\" controls=\"controls\"></video开发者_StackOverflow></body>

However the video plays only in portait mode using the QuickTime player. How can i make the video play in landscape too?

I cannot override the function to support orientation as my application is portrait mode based, but since video starts in full screen mode, I want it to support both orientations.

Youtube player supports both orientations though. So are there any options to get both orientations working?


It's a bit of a hack, but you could try something like this:

Autorotating video played from HTML5 <video> in UIWebView

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜