bhaskar
bhaskar

Reputation: 1080

ChromeCast doesnt play HLS in .m3u8 format

Integrated chromecast in the app. Everything works fine except it does not play live streaming url which is in .m3u8 format but plays .m3u8 format url for movies. I am doing this to set url to chromecast.

return new MediaInfo.Builder(url)
            .setStreamType(MediaInfo.STREAM_TYPE_LIVE)
            .setContentType("videos/mp4")
            .setMetadata(movieMetadata)
            .setStreamDuration(mVideoView.getDuration())
            .build();

Upvotes: 0

Views: 4026

Answers (1)

OMArikan
OMArikan

Reputation: 306

According to google Cast Samples, needed MIME Types are shown in json file https://commondatastorage.googleapis.com/gtv-videos-bucket/CastVideos/f.json

{
    "type": "hls",
    "mime": "application/x-mpegurl",
},
{
    "type": "dash",
    "mime": "application/dash+xml",
},
{
    "type": "mp4",
    "mime": "videos/mp4",
}

Upvotes: 3

Related Questions