Video Streaming

All your problems with Audio, Video and Images.

Video Streaming

Postby Menor » Wed Jun 08, 2011 2:56 pm

Hi,

I need to reproduce a video on player of android.

I tried to do this, take a look:
Code: Select all
public class Video extends Activity {
   
   protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.video_player);
      
      VideoView myVideoView = (VideoView) findViewById(R.id.video_view);
      
      String viewSource ="http://MYDOMAIN.com/ifcc_video.m4v";
      
         myVideoView.setVideoURI(Uri.parse(viewSource));
         myVideoView.setMediaController(new MediaController(this));
         myVideoView.requestFocus();      
   }   
}


The problem is: If i click on pause button of controller, the video stops download, it only download when the video is on reproducing mode.

Anyone knows why?

I want that it works like youtube videos, when the player is on pause state, the videos continues to be loaded.

Anyone knows how can i do it?
Menor
Experienced Developer
Experienced Developer
 
Posts: 83
Joined: Mon Apr 11, 2011 3:45 pm

Top

Re: Video Streaming

Postby abhijitphatak28 » Thu Jun 09, 2011 6:49 am

You need to add custom implementation where you actually download videos programatically and then provide the DataSource to the native media player. This way if player pause in between, you can continue download your data items.

Thanks

Regards
-Abhijit
User avatar
abhijitphatak28
Senior Developer
Senior Developer
 
Posts: 102
Joined: Sat Feb 12, 2011 1:18 pm
Location: Indore

Re: Video Streaming

Postby Menor » Fri Jun 17, 2011 4:00 pm

oh, nice... thanks for you answer... i'll try it..
Menor
Experienced Developer
Experienced Developer
 
Posts: 83
Joined: Mon Apr 11, 2011 3:45 pm

Top

Return to Multimedia Problems

Who is online

Users browsing this forum: No registered users and 27 guests