有誰知道爲什麼在移動設備上未定義on('bufferChange')
和on('meta')
事件的元數據屬性?它像桌面上的魅力一樣,但不適用於iPhone,Windows Phone或Android的移動瀏覽器。 下面是我使用的代碼:JWPlayer元數據事件未定義
<div id="player">Loading the player...</div>
<script type="text/javascript">
var playerInstance = jwplayer("player");
playerInstance.setup({
file: "//the video source"
width: 640,
height: 360,
primary: "html5",
autostart: false,
});
playerInstance.on('bufferChange', function(ev) {
//ev.metadata undefined
});
playerInstance.on('meta', function(ev) {
//ev.metadata undefined
});
編輯:
我不能發佈鏈接到真實的數據流,但我心中已經使用了以下測試流以及不工作要麼是:http://vevoplaylist-live.hls.adaptive.level3.net/vevo/ch2/appleman.m3u8
事件要麼未定義,要麼值(例如ev.metadata.bandwidth)爲NaN。
我已經在iPhone 5c上測試了這個(Safari,iOS是最新的),Lumia 640(股票瀏覽器 - IE,看起來像IE引擎根本不支持HLS,因爲缺少WebKit,操作系統高達日期)和Galaxy S6 Edge(Chrome瀏覽器,操作系統最新)。
請原諒我遲到的迴應,我已更新了我的答案。感謝您的支持! – eol