
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)"