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

Problem with playing live stream on android devices


Hello Team,
I’m using Jwplayer v6.8 and broadcasting the live via Adobe Flash Media Live Encoder (AFMLE) using the following configurations,
Video
Format – H.264
Profile – Baseline
Level – 2.0
Keyframe frequency – 2 seconds
Frame rate – 15 fps
Input size – 320x240
Bit Rate – 200 Kbps
Audio
Format – AAC
Channels – Stereo
Sample rate – 44100 Hz
Bit Rate – 64 Kbps

When I am trying to play flash RTMP for desktop and HLS for iOS devices, the live stream is well. But, I had frustrating experiences with android live stream playback and jwplayer seems to be “No playable source found” error. I have used RTSP for android devices.

My jwplayer setup source code is,

<html>
<head >
<title>Live Test</title>
<script src="Includes/JavaScript/jquery-1.8.3.min.js" type="text/javascript"></script>
<script src="Includes/JavaScript/jwplayer6/jwplayer.js" type="text/javascript"></script>
<script type="text/javascript”> jwplayer.key="[jwplayer-key]";</script>
</head>
<body>
<div id="flashbanner"></div>
</body>
<script type="text/javascript">
var ua = navigator.userAgent.toLowerCase();
var isAndroid = ua.indexOf("android") > -1;
jwplayer("flashbanner").setup({
playlist: [{
sources: [
(isAndroid)?{file:'rtsp://streamnow1.mpl.miisolutions.net/streamnow1-live-1/_definst_/mp4:livetest'}:{file:'rtmp://streamnow1.mpl.miisolutions.net/streamnow1-live-1/_definst_/mp4: livetest'},
{file:'http://streamnow1.mpl.miisolutions.net/streamnow1-live-1/_definst_/mp4: livetest/playlist.m3u8'}
]
}]
});
</script></html>

Here, “livetest” is my live stream name.

This issue was happening only for the live and not for VOD. VOD streaming is well on desktop, ios and android devices as well.

If I’m wrong with the jwplayer setup, can you please assist me?

10 Community Answers

Ethan Feldman

JW Player Support Agent  
0 rated :

You are detecting an android useragent and then delivering an rtsp stream inside of the iw player setup, something that is not going to supported ever. RTSP will not work in the setup since neither flash or html5 will support it.

yali.tariq

User  
0 rated :

Thanks Ethan!

The same jwplayer setup RTSP code working for vod content. Is there any diiference for the vod and live?

Ethan Feldman

JW Player Support Agent  
0 rated :

RTSP is not supported in the player, no way at all.

yali.tariq

User  
0 rated :

Okay. Is any other possible way to allow stream on android instead of RTSP?

yali.tariq

User  
0 rated :

Hello Ethan,

On further analyzing, we tested RTSP VOD stream on android versions 4.2.2(samsung galaxy s duos 2)
,2.3.6(Samsung Galaxy Ace) and 4.3(sony xperia m2) and RTSP stream is well.

As you mentioned earlier, if player does not support rtsp means then how rtsp played on the above mentioned versions?

Can you please test this link http://eduvisiontest.info/mivod.html?

Let me know your thoughts?

Ethan Feldman

JW Player Support Agent  
0 rated :

You are not using RTSP here…

http://eduvisiontest.info/mivod.html

yali.tariq

User  
0 rated :

Now i used the rtsp in outside of the jwplayer setup, stream get in to android native player instead of jwplayer.

Code:

<!DOCTYPE html>
<html>
<head>
<title></title>
<script src="Includes/JavaScript/jquery-1.8.3.min.js" type="text/javascript"></script>
<script src="jwplayer6/jwplayer.js" type="text/javascript"></script>
<script type="text/javascript"> jwplayer.key = "Key";</script>
</head>
<body>
<div id="flashbanner"></div>
<a href="rtsp://jdlhorizons.mpl.miisolutions.net:1935/jdlhorizons-live-1/livetest">watch this stream over RTSP</a>
</body>
<script type="text/javascript">
jwplayer("flashbanner").setup({
playlist: [{
sources: [
{file:''rtmp://streamnow1.mpl.miisolutions.net/streamnow1-live-1/livetest'},
{file:'http://streamnow1.mpl.miisolutions.net/streamnow1-live-1/livetest/playlist.m3u8'}
]
}],
width: 640,
height: 360
});
</script>
</html>

But, i don't want to play in native player. I would like to play it in jwplayer itself.

Ethan Feldman

JW Player Support Agent  
0 rated :

Under:

width: 640,

Add:

androidhls:true,

This will give you hls support on android if you are using 6.9.

yali.tariq

User  
0 rated :

Thanks Ethan! In v6.9 it's working fine on devices running on Android 4.1 and later. Does the "androidhls:true" support for below than android v4.1?

Like this way, Do you have any option to support android hls stream on v6.7?

Ethan Feldman

JW Player Support Agent  
0 rated :

6.7 does not have this feature. It was introduced in 6.9.

Android itself has issues with HLS in <video> in Android versions below 4.0.

This question has received the maximum number of answers.