java - How can I modify what controls show up for my VideoView? -
i have videoview controlled simple mediacontroller i'd modify controls for. currently, shows seek bar, fast-forward , rewind buttons, , play/pause. i'd narrow down having play , pause buttons, stream i'm playing more or less live. how can modify controls present? current code in oncreate
:
this.setcontentview(r.layout.videoplayer); this.getwindow().setflags(windowmanager.layoutparams.flag_fullscreen, windowmanager.layoutparams.flag_fullscreen); this.videoview = (videoview)this.findviewbyid(r.id.videoview); this.mediacontroller = new mediacontroller(this); this.mediacontroller.setanchorview(this.videoview); uri uri = uri.parse(this.getintent().getstringextra("uri")); this.videoview.setmediacontroller(this.mediacontroller); this.videoview.setvideouri(uri); this.videoview.setonpreparedlistener(new onpreparedlistener() { @override public void onprepared(mediaplayer mp) { findviewbyid(r.id.video_loading_spinner).setvisibility(view.gone); } }); this.videoview.setonerrorlistener(new onerrorlistener() { @override public boolean onerror(mediaplayer mp, int what, int extra) { showdialog(video_failed); return true; } }); //this.videoview.setoncompletionlistener(new oncompletionlistener() { // @override public void oncompletion(mediaplayer mp) { // showdialog(video_complete); // } //}); this.videoview.start();
you cannot modify controls present in mediacontroller
, can create own controller , use instead of mediacontroller
. did in this ancient project.
Comments
Post a Comment