Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

不支持本地视频播放?? #47

Closed
toeii opened this issue Jun 3, 2018 · 17 comments
Closed

不支持本地视频播放?? #47

toeii opened this issue Jun 3, 2018 · 17 comments

Comments

@toeii
Copy link

toeii commented Jun 3, 2018

试了下,SD卡下的视频文件播放不了,提示请重试

@Doikki
Copy link
Owner

Doikki commented Jun 3, 2018

1.确定你有访问sd卡的权限,2 使用file协议

@toeii
Copy link
Author

toeii commented Jun 3, 2018

是的,同样的路径七牛上可以播放

@Doikki
Copy link
Owner

Doikki commented Jun 3, 2018

什么格式和编码,还有日志提供一下

@toeii
Copy link
Author

toeii commented Jun 3, 2018

String path = "/storage/emulated/0/DCIM/Camera/VID_20180512_202414.mp4";
File file = new File(path);
if(file.exists()){
path = Uri.parse("file://"+file.getAbsolutePath()).toString();
}
dkVideo.setUrl(path);
Logger.d("path====>"+path);

path====>file:///storage/emulated/0/DCIM/Camera/VID_20180512_202414.mp4

@toeii
Copy link
Author

toeii commented Jun 3, 2018

E/IJKMEDIA: http://127.0.0.1:57023/file%3A%2F%2F%2Fstorage%2Femulated%2F0%2FDCIM%2FCamera%2FVID_20180512_202414.mp4: End of file
E/tv.danmaku.ijk.media.player.IjkMediaPlayer: Error (-10000,0)

@Doikki
Copy link
Owner

Doikki commented Jun 3, 2018

不要打开缓存功能

@toeii
Copy link
Author

toeii commented Jun 3, 2018

👌 PlayerConfig.Builder去掉enableCache已经可以播放了

@sunshinecf
Copy link

看你们解说我居然成功了,感谢大神们默默奉献

@Doikki Doikki pinned this issue Jan 22, 2019
@xiaoshizuzhang
Copy link

本地的m3u8文件可以播放吗?

@xiaoshizuzhang
Copy link

视频地址已拼接成完整地址,不是相对地址

@jiancheng2018
Copy link

怎么播放本地的视频呢?m3u8我试了可以

@yuxingfafu
Copy link

assets 目录下的应该要如何播放呀?

@a1042392710
Copy link

大佬,无法播放本地视频。PlayerConfig类已经移除了,我现在该如何才能播放本地视频

@ZakAnun
Copy link

ZakAnun commented Jun 15, 2021

大佬,无法播放本地视频。PlayerConfig类已经移除了,我现在该如何才能播放本地视频

通过对应的播放器去配置,比如 ExoPlayer,就通过 DataSource.Factory 去获取是否支持缓存的 DataSource

@OnrushingDrumstick
Copy link

为啥硬解码的api没有了

@SuperZhouyong
Copy link

image
@Doikki 播放本地视频,重复点进去,回调有问题。 M3U8本地,Exo 播放

@liupeng176
Copy link

坑爹,刚选视频播放库的建议别选这个库,缓存都没有。每次播都从新下载。推荐的缓存方案更是坑爹,在安卓手机本地开了端口,启动服务。 所有的url都被重定向为明文流量 http://127.0.0.1:xxx/原视频url

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests