2
我正在嘗試使用mediaelement.js UI在iPad,iPhone和Android中流式傳輸hls。使用mediaelement在Android上流式傳輸hls
的HTML是一種類似如下(SRY我不能公開我們的HLS鏈接):
<video src="testinghls.m3u8"></video>
和腳本:
$('video').mediaelementplayer({
// if the <video width> is not specified, this is the default
defaultVideoWidth: 480,
// if the <video height> is not specified, this is the default
defaultVideoHeight: 270,
// specify to force MediaElement to use a particular video or audio type
type: 'application/x-mpegURL',
// the order of controls you want on the control bar (and other plugins below)
features: ['playpause','progress','volume','fullscreen'],
// Hide controls when playing and mouse is not over the video
alwaysShowControls: false,
// force iPad's native controls
iPadUseNativeControls: false,
// force iPhone's native controls
iPhoneUseNativeControls: false,
// force Android's native controls
AndroidUseNativeControls: false
});
這正常工作與iPad和iPhone,但與Android失敗。它只是以某種方式檢測到視頻無法播放並回退到下載鏈接。
除了我已經嘗試了與HLS純視頻標籤,它的正常工作有或沒有在iOS和像下面的兩款Android設備類型:
<video src="{{c.get('hls')}}" type="application/x-mpegURL" style="width:320px;height:185px" controls></video>
<video src="{{c.get('hls')}}" style="width:320px;height:185px" controls></video>
我應該如何配置的MediaElement的使這行得通?或者也許一些調整/修改與Mediaelement.js?