ChromeCast doesnt play HLS in .m3u8 format

守給你的承諾、 提交于 2019-12-04 06:05:05

问题


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();

回答1:


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",
}


来源:https://stackoverflow.com/questions/40502173/chromecast-doesnt-play-hls-in-m3u8-format

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!