使用版本 6 JW 播放器。我正在使用 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"
});