iPad、iPhone、Androidでhlsをストリーミングするためにmediaelement.jsUIを使用しようとしています。
htmlは次のようになります(私たちの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を使用して純粋なビデオタグを試したことに加えて、以下の2つのような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で微調整/変更することはできますか?