In Chromecast's documentation it is stated that Chromecast does support HLS streams. But I cannot make it work.
I created a simple app that have one button that initiates playback. For MP4 files it works great, but not for HLS streams. This is how I start stream:
btnStart.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
String url = "http://planeta-online.tv:1935/vod/mp4:tvt.russia.time_laps_in_st_piter.flv/manifest.m3u8";
MediaMetadata movieMetadata = new MediaMetadata(MediaMetadata.MEDIA_TYPE_MOVIE);
movieMetadata.putString(MediaMetadata.KEY_SUBTITLE, "Subtitle");
movieMetadata.putString(MediaMetadata.KEY_TITLE, "Title");
movieMetadata.putString(MediaMetadata.KEY_STUDIO, "Studio");
movieMetadata.addImage(new WebImage(Uri.parse("http://cdn.planeta-online.tv/kp/app/icons/i5.png")));
movieMetadata.addImage(new WebImage(Uri.parse("http://cdn.planeta-online.tv/kp/app/icons/i5.png")));
MediaInfo mSelectedMedia = new MediaInfo.Builder(url)
.setStreamType(MediaInfo.STREAM_TYPE_BUFFERED)
.setContentType("application/vnd.apple.mpegurl")
.setMetadata(movieMetadata)
.build();
mVideoCastManager.startCastControllerActivity(MainActivity.this, mSelectedMedia, 0, true);
}
});
I enabled CORS for this stream on Wowza, but it didn't help. Changing StreamType from MediaInfo.STREAM_TYPE_BUFFERED to MediaInfo.STREAM_TYPE_LIVE doesn't have any effect either. Any other ideas?