android - Vitamio media player onCompletion Listner not called -


i using vitamio sdk have written code below oncompletion listener not called.

 mediaplayer = new mediaplayer(this);             utils.showlog(tag, "alert video path play : " + path);             mediaplayer.setdatasource(path);             mediaplayer.setdisplay(sholder);             mediaplayer.setbuffersize(1024 * 256);             mediaplayer.prepareasync();               mediaplayer.setwakemode(getapplicationcontext(), powermanager.partial_wake_lock);             mediaplayer.setonpreparedlistener(this);             mediaplayer.setonerrorlistener(this);             mediaplayer.setonvideosizechangedlistener(this);             mediaplayer.setoninfolistener(this); 

and set oncompletion listener after start of video

 mediaplayer.setoncompletionlistener(this); 

setoncompletionlistener on videoview instead of mediaplayer.

        videoview.setoncompletionlistener(new mediaplayer.oncompletionlistener() {             @override             public void oncompletion(mediaplayer mp) {                 videoplayeractivity.this.finish();             }         }); 

update

i think problem imports. double check following import.

import io.vov.vitamio.mediaplayer.oncompletionlistener;


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -