我正在使用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>
可能导致问题的原因是什么?是模拟器还是视频?还是代码?
EDIT: When I click the video image to play, it opens quicktime and then pops up an error message: "The operation could not be completed"
1 回答
检查屏幕截图 . 视频在iOS模拟器中工作正常 . 参考网址 - http://camendesign.com/code/video_for_everybody/test.html