I am playing an HLS stream with the following code :

mediaPlayer = new MediaPlayer();
mediaPlayer.setDataSource("http://iphoned5.akamai.com.edgesuite.net/
mhbarron/nasatv/nasatv_all.m3u8");
mediaPlayer.setDisplay(holder);
mediaPlayer.setOnBufferingUpdateListener(this);
mediaPlayer.setOnCompletionListener(this);
mediaPlayer.setOnPreparedListener(this);
mediaPlayer.setOnVideoSizeChangedListener(this);
mediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC);
mediaPlayer.prepareAsync();
With this code, what I see in the video is about 5 minutes late
according to the same stream played into VLC.

The player is starting to play the first chunk of the .m3u8 file. But
the hls specification precises that the first chunk are the older and
the last the newest. So the player should start to play the last chunk
of the file.

I suspect there is something to do with the parameters of the
setDataSource method but I cannot figure how.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to