-
Notifications
You must be signed in to change notification settings - Fork 301
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
播放本地视频,但是把本地路径当成网络路径了 #301
Comments
你解决这个问题了吗 |
使用数据源使用错误,肯定报错,参考demo |
谢谢, |
有子类的 不同子类对应的雷, DefaultDataSourceFactory 所有都继承了 |
老哥 我播放本地视频 提示 播放异常 地址异常,网络不可用 我想问下 我是错了那一步 |
老哥您解决了吗?我也是遇到这个问题 |
解决了 他那个里面 有个 DefaultDataSourceFactory 类似于这个 FACTORY 你重写一个 吧里面改一下就好了 |
收到,谢谢老哥!! |
最上面 @yangchaojiang 不都已经解答了吗,使用错了数据源,换正确的就好了 |
是的 楼上说的没错 |
使用版本:2.3.61
错误日志:
E/ExoPlayerImplInternal: Source error com.google.android.exoplayer2.upstream.HttpDataSource$HttpDataSourceException: Unable to connect at com.google.android.exoplayer2.upstream.DefaultHttpDataSource.open(DefaultHttpDataSource.java:282) at com.google.android.exoplayer2.upstream.StatsDataSource.open(StatsDataSource.java:83) at com.google.android.exoplayer2.upstream.DataSourceInputStream.checkOpened(DataSourceInputStream.java:102) at com.google.android.exoplayer2.upstream.DataSourceInputStream.open(DataSourceInputStream.java:65) at com.google.android.exoplayer2.upstream.ParsingLoadable.load(ParsingLoadable.java:170) at com.google.android.exoplayer2.upstream.Loader$LoadTask.run(Loader.java:415) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) at java.lang.Thread.run(Thread.java:919) Caused by: java.net.MalformedURLException: no protocol: /storage/emulated/0/Android/data/cn.rootvip.m3u8/files/上的官方大概-.mp4 at java.net.URL.<init>(URL.java:601) at java.net.URL.<init>(URL.java:498) at java.net.URL.<init>(URL.java:447) at com.google.android.exoplayer2.upstream.DefaultHttpDataSource.makeConnection(DefaultHttpDataSource.java:429) at com.google.android.exoplayer2.upstream.DefaultHttpDataSource.open(DefaultHttpDataSource.java:280) at com.google.android.exoplayer2.upstream.StatsDataSource.open(StatsDataSource.java:83) at com.google.android.exoplayer2.upstream.DataSourceInputStream.checkOpened(DataSourceInputStream.java:102) at com.google.android.exoplayer2.upstream.DataSourceInputStream.open(DataSourceInputStream.java:65) at com.google.android.exoplayer2.upstream.ParsingLoadable.load(ParsingLoadable.java:170) at com.google.android.exoplayer2.upstream.Loader$LoadTask.run(Loader.java:415) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) at java.lang.Thread.run(Thread.java:919) E/chuangyuan.ycj.videolibrary.video.ExoUserPlayer: onPlayerError:com.google.android.exoplayer2.upstream.HttpDataSource$HttpDataSourceException: Unable to connect D/chuangyuan.ycj.videolibrary.video.ExoUserPlayer: onPlayerStateChanged:1+playWhenReady:true onPlayerStateChanged::网络状态差,请检查网络。。。
上面日志中的“/storage/emulated/0/Android/data/cn.rootvip.m3u8/files/上的官方大概-.mp4”就是本地路径
The text was updated successfully, but these errors were encountered: