use of android.widget.MediaController in project qksms by moezbhatti.
the class SlideshowActivity method initMediaController.
private void initMediaController() {
mMediaController = new MediaController(SlideshowActivity.this, false);
mMediaController.setMediaPlayer(new SmilPlayerController(mSmilPlayer));
mMediaController.setAnchorView(findViewById(R.id.slide_view));
mMediaController.setPrevNextListeners(new OnClickListener() {
public void onClick(View v) {
mSmilPlayer.next();
}
}, new OnClickListener() {
public void onClick(View v) {
mSmilPlayer.prev();
}
});
}
use of android.widget.MediaController in project platform_frameworks_base by android.
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;
}
use of android.widget.MediaController in project XobotOS by xamarin.
the class HTML5VideoFullScreen method prepareForFullScreen.
private void prepareForFullScreen() {
// So in full screen, we reset the MediaPlayer
mPlayer.reset();
setMediaController(new MediaController(mProxy.getContext()));
mPlayer.setScreenOnWhilePlaying(true);
prepareDataAndDisplayMode(mProxy);
}
use of android.widget.MediaController in project wire-android by wireapp.
the class VideoPlayerFragment method onCreateView.
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.fragment_video_player, container, false);
headerContainer = ViewUtils.getView(view, R.id.rl__video_player__header);
closeButton = ViewUtils.getView(view, R.id.gtv__video_player__close);
closeButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (getControllerFactory() == null || getControllerFactory().isTornDown()) {
return;
}
getControllerFactory().getSingleImageController().hideVideo();
}
});
videoView = ViewUtils.getView(view, R.id.vv__video_view);
videoView.setVideoURI((Uri) getArguments().getParcelable(ARG_VIDEO_URI));
mediaController = new MediaController(getContext());
mediaController.setMediaPlayer(videoView);
videoView.setMediaController(mediaController);
videoView.requestFocus();
videoView.start();
videoView.setOnCompletionListener(new MediaPlayer.OnCompletionListener() {
@Override
public void onCompletion(MediaPlayer mp) {
}
});
videoView.setOnTouchListener(onTouchListener);
view.setOnTouchListener(onTouchListener);
mediaController.show(0);
return view;
}
use of android.widget.MediaController in project android_frameworks_base by AOSPA.
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