Hello, I am facing serious problems, when I pause a video and play next, the video that for example was in 2 seconds, it changes to 7, the image is frozen until the audio arrives in the 7 seconds. Apparently the audio does not have this problem, it continues where it stopped, but the video, skips several pictures.
I posted a video on youtube to better show the problem, observe the timing of the video, when paused, and when played.
<com.halilibo.bettervideoplayer.BetterVideoPlayer
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/player"
android:layout_width="match_parent"
android:layout_height="match_parent" />
int position = 0;
String TAG = "statusVideo";
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_video_player);
player = (BetterVideoPlayer) findViewById(R.id.player);
player.setCallback(this);
player.setSource(Uri.parse("https://instagram.fbhz2-1.fna.fbcdn.net/t50.2886-16/22251533_131289287518083_2969207214956347392_n.mp4"));
}
@Override
public void onPause() {
super.onPause();
// Make sure the player stops playing if the user presses the home button.
player.pause();
}
// Methods for the implemented EasyVideoCallback
@Override
public void onStarted(BetterVideoPlayer player) {
Log.i(TAG, "Started");
}
@Override
public void onPaused(BetterVideoPlayer player) {
Log.i(TAG, "Paused");
}
@Override
public void onPreparing(BetterVideoPlayer player) {
Log.i(TAG, "Preparing");
}
@Override
public void onPrepared(BetterVideoPlayer player) {
Log.i(TAG, "Prepared");
}
@Override
public void onBuffering(int percent) {
Log.i(TAG, "Buffering " + percent);
}
@Override
public void onError(BetterVideoPlayer player, Exception e) {
Log.i(TAG, "Error " +e.getMessage());
}
@Override
public void onCompletion(BetterVideoPlayer player) {
Log.i(TAG, "Completed");
}
@Override
public void onToggleControls(BetterVideoPlayer player, boolean isShowing) {
Log.i(TAG, "Controls toggled " + isShowing);
}