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

Can't play stream on android


Hey there, i've added on my wordpress site the following code to try a live streaming radio

<div id="myElement">Loading the player ...</div>
<script type="text/javascript">
jwplayer("myElement").setup({
file: "http://hls1.addictradio.net/addictrock_hls/playlist.m3u8", width:'100%', aspectratio: '16:9', androidhls:true
});
</script>
</div>

On desktop works fine, on Iphone too, but on Android i get the "Error loading media: File could not be played".

Please i need some help because i couldn't fix this based on information found on the net.

Thank you.

8 Community Answers

Randy

JW Player Support Agent  
1 rated :

Hello,

Thank you for contacting the JW Player support team. Can you provide a sample link to the embed page you are using by chance?

Kindly,

Randy Le’Moine, Web Support Engineer, JW Player
www.jwplayer.com

filippo.barra

User  
0 rated :

No ideas for me?

filippo.barra

User  
0 rated :

Yes, here it is:

http://es.superfit.prodactive.it/?p=434

Randy

JW Player Support Agent  
0 rated :

Hello Fillippo,

You can achieve this with your setup. If I might suggest using a smaller height such as: 30px which may help with page real estate also you would need to use the androidhls: “true”, parameter to use HLS within Android devices. Please let me know if this works for you.

Kindly,

Randy Le’Moine, Web Support Engineer, JW Player
www.jwplayer.com

filippo.barra

User  
0 rated :

Hi there, having added androidhls:"true" (quotes missing from previous example) avoids me the error b ut the page is loading forever....it never playes....any other ideas?

Thank you.

Randy

JW Player Support Agent  
0 rated :

Hello Filippo,

I am not sure I see the same performance here on my end. The mp3 seems to load pretty quickly on my end. Another tip you may consider is dropping your player height to 30px to limit the amount of real estate it takes on your page: height: “30px”,

Kindly,

Randy Le’Moine, Web Support Engineer, JW Player
www.jwplayer.com

filippo.barra

User  
0 rated :

Hi, this is the code updated:

<div id="myElement">Loading the player ...</div>
<script type="text/javascript">
jwplayer("myElement").setup({
file: "http://hls1.addictradio.net/addictrock_hls/playlist.m3u8", width:"100%", aspectratio: "16:9", androidhls:"true", height: "30px"
});
</script></div>

Still on android Samsung galaxy S2 with chrome browser i get the "file could not be played" error.
While on Android native bworser it loads forever....
Same thing with a Samsung Galaxy S3 Mini
Can i know what device are you using to test the page?

Thanks.

Randy

JW Player Support Agent  
0 rated :

Hello Filippo,

This is strange indeed. I thought this may have been the missing androidhls: “true” parameter but that did not seem to work as well. I decided to try your m3u8 stream in a basic video embed and see that the video will not play there either, which leads me to believe this may be a potential mime type problem or encode issue. You can see the sample code here to try on your end:

<html> <head>

<script src="http://p.jwpcdn.com/6/12/jwplayer.js"></script>

</head> <body> <center>

Your HLS stream in a <video> tag:<br> <video controls="" autoplay="" name="media"><source src="http://hls1.addictradio.net/addictrock_hls/playlist.m3u8" type="application/x-mpegURL"></video><br><br>

</center> </body> </html>

Kindly,

Randy Le’Moine, Web Support Engineer, JW Player
www.jwplayer.com

This question has received the maximum number of answers.