バージョン 6 の JW Player を使用してください。FFMPEG を使用して動画を MP4、FLV、および WebM に変換しています。
ビデオが再生されることを意図している場合、再生されず、次のエラーが発生します。
Error playing media:
MediaError
code: 4
__proto__: MediaError
MEDIA_ERR_ABORTED: 1
MEDIA_ERR_DECODE: 3
MEDIA_ERR_ENCRYPTED: 5
MEDIA_ERR_NETWORK: 2
MEDIA_ERR_SRC_NOT_SUPPORTED: 4
constructor: function MediaError() { [native code] }
__proto__: Object
jwplayer.js?muokxc:4
CAPTIONS([object Object]) jwplayer.js?muokxc:4
CAPTIONS([object Object])
Firefox では、「ファイルをデコードできません」というエラーが表示されます。このシナリオは、私のサーバーでのみ発生します。しかし、ローカルホストでは起こりません。動画は普通に再生できます。
何が起こっているのでしょうか?
JW Player を初期化するための私の JS コードは次のとおりです。
jwplayer('jwplayerjw-player').setup({
"aspectratio":"16:9",
"playlist":[{
"image":"http://mydomain.com/system/files/videos/thumbnails/48/thumbnail-48_0002.png",
"sources":[{
"file":"http://mydomain.com/system/files/videos/converted/48/loop_2_flv_1381794678.flv"},
{"file":"http://mydomain.com/system/files/videos/converted/48/loop_2_mp4_1381794691.mp4"},
{"file":"http://mydomain.com/system/files/videos/converted/48/loop_2_webm_1381794705.webm"}]}],
"width":"100%",
"height":360,
"stretching":"fill",
"skin":"sites/all/libraries/jwplayer/skin.xml"
});