In my app, i do video streaming and it work on 5.0- devices. For above 5.0, it doesnot. it gives (1,-38). 1 means this is unknown error. So is there anybody that has any ideas ?
mMediaPlayer.setDataSource(activity, Uri.parse(token.url), null);
This is the line that i set the datasource.
try {
mMediaPlayer.reset();
mMediaPlayer.setDataSource(activity, Uri.parse(token.url), null);
} catch (IOException e) {
setState(PLAYER_STATE.STOPPED);
return;
}
mMediaPlayer.prepareAsync();
@Override
public void onPrepared(MediaPlayer mp) {
mMediaPlayer.start();
}
Thanks