我正在使用<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先生它没有给出任何错误,它只是不工作。而已。 –