package io.github.powerinside.syncplay;

import android.media.MediaPlayer;

public class CustomMediaPlayer extends MediaPlayer {

    public boolean attached = false;
    private MediaPlayerListener mListener;

    public void setMediaPlayerListener(MediaPlayerListener listener) {
        mListener = listener;
    }

    @Override
    public void start() throws IllegalStateException {
        if (attached)
            super.start();
        if (mListener != null) {
            mListener.onPlay();
        }
    }

    @Override
    public void pause() throws IllegalStateException {
        if (attached)
            super.pause();
        if (mListener != null) {
            mListener.onPause();
        }
    }

    @Override
    public void seekTo(int msec) throws IllegalStateException {
        if (attached)
            super.seekTo(msec);
        if (mListener != null) {
            mListener.onTimeBarSeekChanged(msec);
        }
    }

    public interface MediaPlayerListener {
        void onPlay();

        void onPause();

        void onTimeBarSeekChanged(int currentTime);
    }

}

@@ -755,19 +755,27 @@
 To(int m
-sec
+illiseconds
 ) throws
@@ -847,19 +847,27 @@
 seekTo(m
-sec
+illiseconds
 );%0A     
@@ -938,19 +938,27 @@
 hanged(m
-sec
+illiseconds
 );%0A     

Change msec to milliseconds