ExoPlayer:如何播放http直播? [英] ExoPlayer: How to play http live stream?

查看:526
本文介绍了ExoPlayer:如何播放http直播?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想将ExoPlayer库用于我的Android应用程序以播放实时流式视频.

i want to use ExoPlayer library for my Android application to play live streaming videos.

我一直在浏览exoplayer网站和文档以及Github页面,但对这些解释不满意.

I was looking through the exoplayer website and documentation as well as Github page but i wasn't satisfied with the explanations.

任何人都可以给我一个提示,您如何通过ExoPlayer播放http实时流视频?

Anyone can give me a hint how do you play a http live streaming video through ExoPlayer?

谢谢.

推荐答案

我能够立即在ExoPlayer中播放LiveStream.

只需从 https://drive.google.com/file/d下载此示例/0Byr1H33Pe7u-MW93UUpmMUhGTTQ/view 并修改Uri

I was able to play LiveStream right away in ExoPlayer.

Just download this sample at https://drive.google.com/file/d/0Byr1H33Pe7u-MW93UUpmMUhGTTQ/view and modify Uri

video_url = "http://cspan1-lh.akamaihd.net/i/cspan1_1@304727/index_1000_av-p.m3u8";

注意:由于格式错误,某些m3u8文件无法播放
在此处 https://google.github.io/ExoPlayer/supported-formats检查支持的格式. html

Note: some m3u8 files wont play because of incorrect format
Check Supported formats here https://google.github.io/ExoPlayer/supported-formats.html

这篇关于ExoPlayer:如何播放http直播?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆