Create an Activity to open the layout with a VideoView
and another to work with streaming with its own layout as well:
private ProgressDialog carregando;
private Context context;
private VideoView mVideoView;
public void onCreate(Bundle paramBundle)
{
super.onCreate(paramBundle);
setContentView(R.layout.player);
this.context = this;
this.carregando = ProgressDialog.show(this.context, "", "Carregando...", true, true, new DialogInterface.OnCancelListener()
{
public void onCancel(DialogInterface paramAnonymousDialogInterface)
{
Player.this.carregando.dismiss();
Player.this.mVideoView.stopPlayback();
Player.this.mVideoView.setVisibility(8);
}
});
this.carregando.setCancelable(true);
this.mVideoView = ((VideoView)findViewById(R.layout.videoview));
this.mVideoView.setOnPreparedListener(new MediaPlayer.OnPreparedListener()
{
public void onPrepared(MediaPlayer paramAnonymousMediaPlayer)
{
Player.this.carregando.dismiss();
}
});
this.mVideoView.setOnCompletionListener(new MediaPlayer.OnCompletionListener()
{
public void onCompletion(MediaPlayer paramAnonymousMediaPlayer)
{
Player.this.mVideoView.setVisibility(8);
Player.this.carregando.dismiss();
}
});
this.mVideoView.setVisibility(0);
this.mVideoView.setVideoURI(Uri.parse("linkdostreamingnoservidor"));
MediaController localMediaController = new MediaController(this.context);
this.mVideoView.setMediaController(localMediaController);
Log.d("NSLog", "Talvez isso: " + this.context + " ou isso: " + localMediaController);
this.mVideoView.requestFocus();
this.mVideoView.start();
}
take a look, is audio stream and is direct gives machine from the client to the other users of the system, but modifying this system can change to video, but is not direct from the server!!! https://www.webrtc-experiment.com/RTCMultiConnection/stream-mp3-live.html
– Alan PS
take a look at his website also: http://www.rtcmulticonnection.org/
– Alan PS
I’ll take a look here, thanks man.
– User
Maybe I expressed myself in the wrong way, I have a video file, and I want this file to be played on my live page, example, put the 13h and everyone who goes to will see the video being played. Thank you
– User