2016-11-09 99 views
0

应用中的集成chromecast。一切正常,除非它不播放.m3u8格式的直播流式传输网址,而是播放.m3u8格式的电影网址。我正在这样做将网址设置为chromecast。ChromeCast不以.m3u8格式播放HLS

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

确保您的[CORS(https://developers.google.com/cast/docs/播放器)已启用,并在Chrome [调试](https://developers.google.com/cast/docs/debugging)会话中启用日志记录以查看日志。作为阿里的建议在一个相关的[问题](http://stackoverflow.com/questions/34887826/unable-to-play-live-stream-on-chromecast-from-android-sender-app),“硬编码CastVideos-android应用程序中的流的URL,看看是否可行。“最后,流媒体需要使用[Cast Media Player Library](https://developers.google.com/cast/docs/player)。 –

回答