我正在使用<video>
實現視頻播放器。這可以在Chrome,Firefox和Internet Explorer中使用,但不適用於Safari。Html5視頻播放器在Safari中不工作
$("#vdsourceVideoPath").attr("src", "http://localhost:3000/Documents/upc and shelf info_0001.mp4");
var player = document.getElementById('vdTrainingVideoPlayer');
player.load();
player.play();
<video id="vdTrainingVideoPlayer" class="vdTrainingVideoPlayer" controls="controls" autoplay="autoplay">
<source id="vdsourceVideoPath" src="" type="video/mp4" />
</video>
player.load()
和player.play()
方法是給在Safari中的錯誤。
「是給錯誤」的 - 你不認爲這值得一提的**什麼錯誤消息說** ?! – Quentin
你可以使用YouTube或類似的東西,然後使用嵌入代碼。這將工作跨瀏覽器 –
@Quentin先生它沒有給出任何錯誤,它只是不工作。而已。 –