0

I am using Vitamio Library from https://github.com/yixia/VitamioBundle

This is the Vitamio Media Player Class https://github.com/yixia/VitamioBundle/blob/master/vitamio/src/io/vov/vitamio/MediaPlayer.java

I have written the code like below but onCompletion listener and on Error listener are not called.

mediaPlayer = new MediaPlayer(this);
mediaPlayer.setDataSource(path);
mediaPlayer.prepareAsync();
mediaPlayer.setOnPreparedListener(this);
mediaPlayer.setOnCompletionListener(this);
mediaPlayer.setOnErrorListener(this);

These are my imports,

import io.vov.vitamio.MediaPlayer;
import io.vov.vitamio.MediaPlayer.OnPreparedListener;
import io.vov.vitamio.MediaPlayer.OnCompletionListener;
import io.vov.vitamio.MediaPlayer.OnErrorListener;
Amal Dev S I
  • 938
  • 13
  • 18

1 Answers1

1

Vitamio Media Player not working well. Its waste of time. The onComplete and OnError Listeners are never called.

One of the best media player library is FFmpegMediaPlayer. FFmpegMediaPlayer is a reimplementation of Android's MediaPlayer class. The FFmpegMediaPlayer class provides a unified interface for playing audio files and streams.

https://github.com/wseemann/FFmpegMediaPlayer

Amal Dev S I
  • 938
  • 13
  • 18
  • I could not "disagree" more, it depends on what you are trying to accomplish. Both onComplete and OnError are triggered for me without fault. Vitamio 4.2.2 is, so far, a reliable library for my uses in streaming HLS audio on the fragmented reality that is Android. From all the time I've spent researching and looking at various SO questions relating to Vitamio, It seems to me that developers looking to implement the library often don't know what they are doing at all. As was my case when I first started. They assume that by installing the lib all their issues will vanish. – greaterKing Feb 09 '16 at 16:50
  • there wasn't enough code in your original post to provide you with the right methods to achieve what you were looking for. – greaterKing Feb 09 '16 at 16:51