I develop an Android app that plays live TV streams (HLS). So I have a link to .m3u8 file, that contains three links to another m3u8 files (for different BANDWIDTH), that have a list of chunks (.ts). Each chunk is a part of last 10 minutes of recorded TV stream.
Here is my code in sender app:
The problem is that Default Receiver plays FIRST chunk, but has to play the LAST one as it is LIVE stream. This results in a 10-minute delay. I tried to set a specific position in method load(...) and use STREAM_TYPE_BUFFERED, but there is no effect. Any suggestions?
Here is my code in sender app:
Code:
MediaMetadata movieMetadata = new MediaMetadata(MediaMetadata.MEDIA_TYPE_MOVIE);
movieMetadata.putString("mediaType", "video");
movieMetadata.putString(MediaMetadata.KEY_TITLE, "some title");
movieMetadata.putString(MediaMetadata.KEY_SUBTITLE, "some subtitle");
MediaInfo mediaInfo = new MediaInfo.Builder("myurl.m3u8")
.setMetadata(movieMetadata)
.setMediaTracks(tracks)
.setStreamType(MediaInfo.STREAM_TYPE_LIVE)
.setContentType("application/x-mpegURL")
.build();
remoteMediaClient.load(mediaInfo, true);