-38 refers to ENOSYS error code from errno.h (see this explanation https://stackoverflow.com/a/15206308/768935)
You seem to try to start the playing before the preparation is complete. Use the setOnPreparedListener()
method to set a preparation listener and call the start() method only after the preparation is complete.
mediaPlayer.setOnPreparedListener(new MediaPlayer.OnPreparedListener() {
public void onPrepared(MediaPlayer mp) {
mp.start();
}
});
mediaPlayer.prepareAsync();
And remove the current video.start()
invocation from the code.
Took from here
Credits goes to him