without a valid mediaplayer
来源:互联网 发布:问卷数据分析怎么写 编辑:程序博客网 时间:2024/06/14 18:12
*BUG:*在使用MediaPlayer过程中,经常出现如下bug:
without a valid mediaplayer Error on play Video
总是一个without a valid mediaplayer的错误!
直接现象就是,播放失败。播放一个集合里面的音乐的时候,总是闪屏,播放不成功。
网上都这么说:
一个新建的MediaPlayer对象在调用getCurrenProgress()、getDuration、getVideoHeight()、getVideoWith()、setAudioStreamType(int)、setLooping(boolean)、setVolume(float,float)、pause()、start()、stop()、seekTo()、prepare()、prepareAsync()方法时,不会触发OnErrorListenerError()事件,但是MediaPlayer对象如果调用了reset()方法后,再使用这些方法则会触发OnErrorListenerError()事件。
我的解决方案:在reset()之后,调用同步的prepare()方法,替代异步的prepareAsync()方法
0 0
- without a valid mediaplayer
- attempt to call getDuration without a valid mediaplayer问题
- 实习入职第九天:Attempt to call getDuration without a valid mediaplayer
- createQuery is not valid without active transaction
- getFlushMode is not valid without active transaction
- createQuery is not valid without active transaction
- createQuery is not valid without active transaction
- getHibernateFlushMode is not valid without active transaction;
- getFlushMode is not valid without active transaction
- ssh without a password
- ssh without a password
- SSH Without a Password
- A. Life Without Zeros
- A. Life Without Zeros
- 友盟分享Twitter出现 "Attempt made to Log in or Like a Tweet without a valid Twitter Kit URL Scheme set up
- Valid a Palindrome
- not a valid SHA1
- Merging Branches: Without a Conflict
- 让任正非愤怒的到底是华为财管团队还是流程本身?
- Tomcat远程调试-IDEA工具
- 跳跃表-原理及Java实现
- mybatis源码学习——Exception包
- JSP的9个内置对象之response
- without a valid mediaplayer
- JAVA Core和J2EE的技能树
- js中字符转日期转毫秒判断开始时间与结束时间的先后
- Android MVP 详解(上)
- 新技术≠颠覆:CIO 要有战略耐心
- 从Java视角理解CPU缓存和伪共享
- Hbase读写优化
- Linux 查看进程中的线程、及其状态信息
- ELK(5.0) 初学搭建部署