简体   繁体   中英

jwplayer not playing video on some phones, error code 4

I am getting on one of android phones error from jwplayer:

Error playing media:

MediaError { code 4 }

Tried to search what does it mean, but cannot find.

Video works on other android devices, and on desktop computers. Tried chrome and default browser in android.

Update

http://jsfiddle.net/HCH8Q/3/

 jwplayer('myElement').setup({ 
        file: 'http://video.oitlabs.com/dogs6_2mb/mr6d_1047.mp4', 

        // works
        // file: 'http://videos-jp.jwpsrv.com/zWLy8Jer/videos/i8oQD9zd-1753142.mp4?77c801d752d5207784c49e7ed80fb953798fae0fcca03ecf79558597ab74bd0b969af6ee1babdc6fac893174bba3c1bbb98ef7c2e4c6b3c59a812b4ed2c9abb29c61117869dbacbbb7caced845a8994ff297cc03a4',
        height: 360, 
        image: '/uploads/example.jpg',
        width: 640 
      });

So video from their site works, but my video does not. But when I run that video not in jw player but directly in the address bar its url, it plays. So it means browser is able to play that video.

This happens btw on LG L7 P710 phone

Update:

Tried now to upload to my server the video from jw site, and it works on that phone. http://jsfiddle.net/HCH8Q/5/ So this is encoding issue. Then the question comes - how should I solve it? I used Handbrake program to convert videos, it has many of settings but I am not sure what should I set to convert so it would work on every phone which supports mp4 files?

Update: Finally made it work by this site instructions: http://www.broken-links.com/2010/07/30/encoding-video-for-android/

The first is cross-platform, using Handbrake. What I did with this was to use the iPhone & iPod Touch preset, check the Web Optimized option, and change the Average bitrate option (in the Quality section) to ~1000kbps (you should then save this as a new preset called Android). You'll also need to change the size of the output video in the Picture Settings options — I changed mine to 480 wide (keeping the aspect ratio) and they came out really crisp and sharp. You can see the result of that below (if your browser supports it).

It looks like everything I done same earlier, except that I used much smaller kbps setting and picture size left default. Will later try to experiment which caused to make it work, because still it does not make sense for me how different bitrate or picture size can make it not work. It should be just affecting quality.

Update Had another problem - when using handbrake and trying to convert many files at once, first file picture width gets converted to what I set, but other files - to the default, maybe some bug or something. But then I tried another program - Freemake Video converter - it has various params and I tried convert 2 files at once, and were no problems, worked on that phone also. http://www.freemake.com/free_video_converter/

MediaError { code 4 } is not a JW Player error.

I would recommend taking the video from our site, uploading it to your hosting, and then seeing if it still works. That way you can determine if the issue is encoding based, or a server side issue.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM