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();
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",
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.