Reputation: 93
I want to play video stream on my android app.
I found code from a website <div>
<a id="rtmp_player" style="display: block; height: 560px; width: 720px; background-color: #ffffff; border: solid 1px #ccc; alighn: center;"></a>
<script type="text/javascript">
// <![CDATA[
$f("rtmp_player", "/onvideo/flowplayer-3.2.10.swf", {
clip: {
url: 'stream1',
live: true,
provider: 'rtmp'
},
plugins: {
rtmp: {
url: '/onvideo/flowplayer.rtmp-3.2.10.swf',
netConnectionUrl: 'rtmp://195.210.47.196/live'
}
}
});
// ]]>
</script>
</div>
So How can I play this stream in Android?
Upvotes: 1
Views: 180
Reputation: 93
Just USE VITAMIO SDK. and url will be rtmp://195.210.47.196/live/stream1
Upvotes: 0
Reputation: 7641
Use VideoView for this. Try below code :
mVideoView = (VideoView) findViewById(R.id.surface_view);
mVideoView.setVideoPath("rtsp://YOURCOMPUTER_SERVER_IP_ADDR:5544/");
mVideoView.setMediaController(new MediaController(this));
Hope, this will help you.
Upvotes: 1