mklimek / frame-video-view

Less issues with VideoView
Other
63 stars 19 forks source link

On Video Complete Listner #23

Open KashifSurhio opened 2 years ago

KashifSurhio commented 2 years ago

Hello Team, I am having the problem for which this project was created, it solve my problem of black area display. But there are some tasks that must start after the video is finished (short video between 1-3 seconds, how to achieve this? I tried adding :

            public void mediaPlayerPrepared(final MediaPlayer mediaPlayer) {
                mediaPlayer.start();
                mediaPlayer.setOnCompletionListener(new MediaPlayer.OnCompletionListener() {

But this makes my code in halted, no error/exception but video also not playing.

KashifSurhio commented 2 years ago

When I remove onCompletionListener also noticed error: V/TextureViewImpl: onSurfaceTextureDestroyed How to handle this? and what could be the reason? PS, 8 second video of 1.89MB working fine in fragment, where 1sec video of 284KB is giving above textureDestroyed.