Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

JW Player with Flash and HTML5 support - working on all devices except Android 4.0.1


Hi there, I am developing an online video learning site and I have bought your brilliant video player for playing FLV files.

Because Flash is expected to retire (as I am reading), especially for mobile devices ( iPAD and iPhone are already there) I converted my
video files to HTML5 formats (webm, mp4, ogv). I have added the correct mime types also...

On desktops (MS, MAC,...) and even iPAD and iPhone everything works well.

On Android phones bare HTML5 video works fine with same files...


My new Android v 4.0.1 smartphone (HuaweiU9200) does not play videos via JW player - except if I set the "Request desktop site". I must point out that it is an original version and that I have intentionally not installed Flash player on it.

I have made some tcpdumps and have found the difference; it is in the User agent string;

Default user agent string = Mozilla/5.0 (Linux; U; Android 4.0.3; en-gb; U9200 Build/HuaweiU9200) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30 (video not working, only skin is shown and spinning gif)

Last file loaded in tcpdump is jwplayer.js (I am using the latest licensed JWplayer pack).

When i tick "Request desktop site" in the phone's browser the user agent sets itself to;

Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/11.0.696.34 Safari/534.24

then video works great - in bare HTML5 mode


Can you please advise?

my code is;

<video
id="mediaplayer"
poster="jwplayer/predstavitev.jpg"
src="v/predstavitev.mp4"
src="v/predstavitev.webm"
src="v/predstavitev.ogv"
width="640"
height="480"
></video>

<script type="text/javascript">
/*V4;*/
jwplayer("mediaplayer").setup({
width: 640,
height: 480,
skin: "jwplayer/izgled.zip",
image: "jwplayer/predstavitev.jpg",
modes: [
{type: "html5",
config: {
levels:[
{file: "v/predstavitev.webm"},
{file: "v/predstavitev.mp4"},
{file: "v/predstavitev.ogv"}
]
}
},

{type: "flash",
src: "jwplayer/player.swf?v=07477",
config: {
file: "v/Predstavitev.flv"
}
},
]});

</script>


I am using jwplayer.version="5.10.2295 (Licensed version)"

9 Community Answers

Ethan Feldman

JW Player Support Agent  
7 rated :

Do you have a link?

JW Player

User  
-16 rated :

http://proselit.net/emata/

There I have placed multiple variants,

http://proselit.net/emata/index-html5-skin-v4.php

the latest.

Your browser agent nad IP will be saved. When the player reaches
end (successfull playing of video - 120 s on HTML5 and 200 s in FLV pseudostreaming) an js alert is triggered and the success is saved also.

Ethan Feldman

JW Player Support Agent  
-6 rated :

Have you tested any other android devices, or is it just failing on this specific model phone?

JW Player

User  
-2 rated :

Also not working on some Android 2.3 TAB (noname) and Samsung Galaxy Xcover (Android 2.3).

Ethan Feldman

JW Player Support Agent  
-19 rated :

Do these devices have Flash installed or not?

JW Player

User  
-2 rated :

Hi, they haven't.

I have tried many many things and without success. Then I opened the mp4 directly from URL and it worked on Android.

It also works from bare HTML5 video tag (no JWplayer.js).

http://www.longtailvideo.com/players/ works well on the same device too.

I will check the MP4 encoding - and compare with your video and report back.

Thanks

Ethan Feldman

JW Player Support Agent  
-5 rated :

Np

JW Player

User  
23 rated :

Hi. I'm having a similar problem and want to make sure what it is before I upgrade to v6.

I'm running the Android sdk emulator (for a Nexus S) and am getting similar results. I get stuck on a spinner icon. When I select "Request Desktop site", I at least get player controls. Put video doesn't play.

I'm using the modes method:
bc.. jwplayer('trailer').setup({
'backcolor': '000000',
'frontcolor': '999999',
'lightcolor': '333333',
'controlbar': 'bottom',
'modes': [
{ type: "flash",
src: "[url to]/s/v/player.swf",
config: {
file: "s/v/filename.mp4",
streamer: "rtmp://[rtmpdomain]/cfx/st",
provider: "rtmp"
}
},
{ type: "html5",
config: {
file: "//[url to]/s/v/filename.mp4"
}
}
]
});



Ethan Feldman

JW Player Support Agent  
-4 rated :

Do you have a link to where this is running? Please note, the simulators are not really accurate.

This question has received the maximum number of answers.