Hi
We are using Jw Player to play videos streaming from wowza
Here is the sample code which we are using for both video on demand and live streaming.
jwplayer(“player”).setup({
‘id’: ‘playerID’,
‘width’: ‘600’,
‘height’: ‘350’,
‘provider’: ‘rtmp’,
‘streamer’: ‘rtmp://[Ip address]:80/live’,
‘file’: ‘test.sdp’,
sources: [{
file: “rtmp://[Ip address]:80/live/test.sdp”
},{
file: “http://[Ip address]:80/live/test.sdp/playlist.m3u8”,
provider: ‘video’
}]
});
This works fine for streaming videos on PC and ios devices. But we are not able to stream videos through android devices. Should we change the streaming type in order to support android devices?
Can you point me to a similar code snippet to support android, if any?
Thanks
Hi
Recent android devices do support HLS which means they should be able to play the stream through the Jw Player.
Most android devices do support rtsp though so an rtsp link to the stream for the devices that do not support HLS should work using the android on-board player.
Jason
Make sure that model supports Flash. Is it this model? http://wireless.amazon.com/Samsung-Galaxy-III-Android-Sprint/dp/B00894K248
If it supports Flash, it might only support Flash HTTP (sanjose) streaming, which is not supported as far as I know at present with JW Player. Try sanjose streaming with the Wowza /examples/LiveVideoStreaming/FlashHTTPlayer with playback URL:
http://[wowza-address]:80/live/test.sdp/manifest.f4m
Make sure you add “sanjosestreamingpacketizer” to the /conf/live/Application.xml /LiveStreamPacketizers
Richard
The rtsp url on that page usually works for most Android devices.
There may be a few devices where rtsp doesn’t work. The SIII should
work though.
Longtail’s web site (JW PLayer) has some information on the pain of implementing streaming
for Android devices, mostly with reference to HLS:
http://www.longtailvideo.com/blog/31646/the-pain-of-live-streaming-on-android/
The bottom of that page has some information on Workarounds for rtsp fallback.
See if that helps.
Daren
streaming to a web-based player in Android 4.1+ is unfortunately a huge pain…
You essentially have 3 options:
-
Provide an rtsp link and let the users use a 3rd-party player like MXPlayer
-
Let users install Flash (from an apk, as it’s no longer officially supported) and they can use jwplayer (though it’s far from ideal, on some devices I can’t go fullscreen, for example)
-
Make your own app using OSMF as the player platform, this will take RTMP or HDS (sanjose)
We are using samsung s3. Looks like it is not working with the above code.
I think the model mentioned there is correct. The version of android in the mobile is 4.2. Is there anything that we could do to play videos in android 4.2 using jw player?
Thanks for your inputs…
Actually we tries the second option, we installed flash on the android device and used jwplayer !
With the following code
jwplayer(“player”).setup({
‘id’: ‘playerID’,
‘width’: ‘600’,
‘height’: ‘350’,
‘provider’: ‘rtmp’,
‘streamer’: ‘rtmp://[Ip address]:80/live’,
‘file’: ‘test.sdp’,
sources: [{
file: “rtmp://[Ip address]:80/live/test.sdp”
},{
file: “http://[Ip address]:80/live/test.sdp/manifest.f4m”,
provider: ‘video’
}]
});
It did not work. let me know if i have to make any changes to the above code. I will try the remaining options mentioned above and get back.
I tried playing the rtsp stream present in the following link on android
https://www.wowza.com/html/mobile.html
It did not work. Does android support rtsp streams?