-
Notifications
You must be signed in to change notification settings - Fork 295
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
在模拟器上全屏播放视频时报错 #32
Comments
真机没问题。出错的是这一句:&& mByWebView.getErrorView().getVisibility() == View.GONE,空指针,注释掉该行,报错消失,也能正常实现全屏。 |
好的,我看看哈,麻烦了~ |
解决了哈,拉最新的代码试试,可以的话我提一版~ |
感谢,完全正常了。你这个byWebView很稳定,用了很长一段时间,没有发现内存泄漏现象,除了上面这个bug,也没观察到更多的bug。其它的webview,比如X5和AgentWeb很容易出现内存泄漏,不知道为什么。 |
可能是这个里面的内容简单些~ 感谢你的使用和反馈哈,作为作者感到非常高兴😄 |
@KennyLeung 已发了最新的版本哈
|
恩恩 可以的。 |
我其实不懂app开发,但为了让两小孩在看网课时,不滥用浏览器,只好自学如何编写。在开始前,寻找能全屏观看视频的开源 webview,结果发现只有很少几个项目能实现,你这个项目就是少数的几个之一。开始的出发点是观看国家中小学网络云平台上的网课,那是国家教育部联合几家互联网大企业录制的高质量中、小学同步网课,但没有APP,只能用浏览器打开,而给小孩使用浏览器,他们常会用于浏览一些非学习网站,比如游戏视频、娱乐八卦之类。直接使用你这个项目的demo,换上网址就能实现全屏观看和防止小孩浏览无关网站了。后来发现能注入js,就实现了更多的功能,比如记录上次观看位置等,也把百度百科、B站、bing等加入了,全部都通过js 过滤掉少儿不宜内容。 国家中小学网络云平台网址:https://tongbu.eduyun.cn/tbkt/tbkthtml/h5.html?xdcode=xd0002&njcode=njs007&xkcode=yuwen0 |
我挺想做的,看起来能帮到很多人,但是我不知道【以该网址为基础的、使用bywebview的开源网课播放app】需要怎么做,哪些功能等,有个草图就好了。具体可以联系我哈,QQ:770413277 |
加你的QQ了 |
fix 解决可能的空指针问题 youlookwhat/ByWebView#32
2021-08-29 17:44:13.530 3073-3073/com.example.jingbin.webviewstudy E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.jingbin.webviewstudy, PID: 3073
java.lang.NullPointerException: Attempt to invoke virtual method 'int android.view.View.getVisibility()' on a null object reference
at me.jingbin.web.ByWebChromeClient.onProgressChanged(ByWebChromeClient.java:130)
at Fa.d(chromium-TrichromeWebViewGoogle.apk-stable-410410681:3)
at Cs.handleMessage(chromium-TrichromeWebViewGoogle.apk-stable-410410681:57)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:223)
at android.app.ActivityThread.main(ActivityThread.java:7656)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
The text was updated successfully, but these errors were encountered: