yangchaojiang / yjPlay

一个支持自定义UI布局,流式API, 加密,直播 ,亮度,音量,快进等手势 ,广告视频预览,多种加载模式 ,多种分辨率切换 ,多种封面图, 自定义数据源,列表播放,倍数播放,边播变缓存<font color="red">不是使用AndroidVideoCache</font>,离线播放,神奇的播放器

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

本地视频无法播放

gxs-gc opened this issue · comments

commented

错误截图
图片

代码
val dataSource = DataSpec(RawResourceDataSource.buildRawResourceUri( R.raw.nan ))
val raw = RawResourceDataSource(this)
raw.open(dataSource)
exoPlayerManager = VideoPlayerManager.Builder(this,VideoPlayerManager.TYPE_PLAY_GESTURE, R.id.exo_play)
.setLoopingMediaSource( Integer.MAX_VALUE,raw.uri)
.setVerticalFullScreen(true)
.create()
.startPlayer()

最新61版本

需要本地链接使用这个数据源。,默认只读取网络链接
······
return new DefaultDataSourceFactory(context, context.getPackageName());
·····
image