【发布时间】:2015-06-15 06:24:01
【问题描述】:
我正在使用 iOS 模拟器在 iPhone 和 iPad 上测试网站。我有一个video 标签,它适用于所有其他浏览器,但不适用于 iOS Safari(在模拟器中 - 我没有实际的 iPhone/iPad)。我从这里创建了视频标签:http://camendesign.com/code/video_for_everybody#video-code
<!-- first try HTML5 playback: if serving as XML, expand `controls` to `controls="controls"` and autoplay likewise -->
<!-- warning: playback does not work on iOS3 if you include the poster attribute! fixed in iOS4.0 -->
<video width="640" height="360" controls>
<!-- MP4 must be first for iPad! -->
<source src="testvideo.mp4" type="video/mp4" /><!-- Safari / iOS video -->
<source src="testvideo.ogv" type="video/ogg" /><!-- Firefox / Opera / Chrome10 -->
<!-- fallback to Flash: -->
<object width="640" height="360" type="application/x-shockwave-flash" data="player.swf">
<!-- Firefox uses the `data` attribute above, IE/Safari uses the param below -->
<param name="movie" value="player.swf" />
<param name="flashvars" value="controlbar=over&image=myimage.jpg&file=testvideo.mp4" />
<!-- fallback image. note the title field below, put the title of the video there -->
<img src="__VIDEO__.JPG" width="640" height="360" alt="test title"
title="No video playback capabilities, please download the video below" />
</object>
</video>
<!-- you *must* offer a download link as they may be able to play the file locally. customise this bit all you want -->
<p> <strong>Download Video:</strong>
Closed Format: <a href="testvideo.mp4">"MP4"</a>
Open Format: <a href="testvideo.ogv">"Ogg"</a>
</p>
什么可能导致问题?是模拟器还是视频?还是代码?
编辑:当我点击视频图像播放时,它打开quicktime,然后弹出错误消息:“操作无法完成”
【问题讨论】:
-
我使用了这个网址 - camendesign.com/code/video_for_everybody/test.html 来自您分享的链接。视频工作正常,我已经在 webview 中加载了这个 url,视频以全屏模式显示。您面临的问题是什么?
-
@UttamSinha 当我点击视频图像播放时,它打开quicktime然后弹出错误消息:“操作无法完成”
-
@UttamSinha 当我尝试同一个页面(camendesign/....test.html)时,我收到与我的视频相同的错误。也许是模拟器?
标签: ios html ipad html5-video ios-simulator