簡體   English   中英

HTML5視頻無法在iOS Simulator Safari中播放

[英]HTML5 Video not playing in iOS Simulator Safari

我正在使用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&amp;image=myimage.jpg&amp;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>

是什么原因引起的? 是模擬器還是視頻? 還是代碼?

編輯:當我單擊要播放的視頻圖像時,它會打開快速時間,然后彈出錯誤消息:“操作無法完成”

檢查屏幕截圖。 視頻在iOS模擬器中運行良好。 請參閱網址-http: //camendesign.com/code/video_for_everybody/test.html

在此處輸入圖片說明

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM