简体   繁体   English

ChromeCast无法播放.m3u8格式的HLS

[英]ChromeCast doesnt play HLS in .m3u8 format

Integrated chromecast in the app. 应用中集成了chromecast。 Everything works fine except it does not play live streaming url which is in .m3u8 format but plays .m3u8 format url for movies. 一切正常,除非它不播放.m3u8格式的实时流URL,但播放电影的.m3u8格式url。 I am doing this to set url to chromecast. 我这样做是为了将网址设置为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 根据google Cast示例,所需的MIME类型显示在json文件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",
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM