use of android.widget.MediaController in project android-oss by kickstarter.
the class VideoActivity method onCreate.
@Override
public void onCreate(@Nullable final Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.video_player_layout);
ButterKnife.bind(this);
viewModel.outputs.preparePlayerWithUrl().compose(Transformers.takeWhen(lifecycle().filter(ActivityEvent.RESUME::equals))).compose(bindToLifecycle()).subscribe(this::preparePlayer);
mediaController = new MediaController(this);
mediaController.setAnchorView(rootView);
RxView.clicks(rootView).compose(bindToLifecycle()).observeOn(AndroidSchedulers.mainThread()).subscribe(__ -> toggleControlsVisibility());
}
use of android.widget.MediaController in project photo-picker-plus-android by chute.
the class VideoPlayerActivity method initVideo.
private void initVideo(String url) {
videoView = (VideoView) findViewById(R.id.videoView);
MediaController mediaController = new MediaController(this);
mediaController.setAnchorView(videoView);
Uri uri = Uri.parse(url);
videoView.setMediaController(mediaController);
videoView.setVideoURI(uri);
videoView.requestFocus();
videoView.start();
}
use of android.widget.MediaController in project cw-omnibus by commonsguy.
the class VideoDemo method onCreate.
@Override
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
getWindow().setFormat(PixelFormat.TRANSLUCENT);
setContentView(R.layout.main);
File clip = new File(Environment.getExternalStorageDirectory(), "test.mp4");
if (clip.exists()) {
video = (VideoView) findViewById(R.id.video);
video.setVideoPath(clip.getAbsolutePath());
ctlr = new MediaController(this);
ctlr.setMediaPlayer(video);
video.setMediaController(ctlr);
video.requestFocus();
video.start();
}
}
use of android.widget.MediaController in project Signal-Android by WhisperSystems.
the class VideoPlayer method initializeVideoViewControls.
private void initializeVideoViewControls(@NonNull VideoView videoView) {
MediaController mediaController = new MediaController(getContext());
mediaController.setAnchorView(videoView);
mediaController.setMediaPlayer(videoView);
videoView.setMediaController(mediaController);
}
use of android.widget.MediaController in project android_frameworks_base by ParanoidAndroid.
the class VideoDumpActivity method createView.
private View createView() {
mVideoView = new VideoDumpView(this);
mVideoView.setMediaController(new MediaController(context));
LinearLayout mainLayout = new LinearLayout(this);
mainLayout.addView(mVideoView, new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.MATCH_PARENT));
return mainLayout;
}
Aggregations