当前位置:网站首页>WebView opens H5 video and displays gray background or black triangle button. Problem solved
WebView opens H5 video and displays gray background or black triangle button. Problem solved
2022-04-23 18:43:00 【KIDD-4869】
Load normally :
Treatment method :
webView.setWebChromeClient(new WebChromeClient() {
@Override
public Bitmap getDefaultVideoPoster() {
//modified by kxqin on 2020/7/17 load h5 video , Solve the problem of gray background and black triangle playing key
try{
// Default return null, Replace here with a transparent picture , Does not affect playback .
return Bitmap.createBitmap(1, 1, Bitmap.Config.ARGB_8888);
}catch(Exception e){
return super.getDefaultVideoPoster();
}
}
}
tips: Repeated settings will overwrite the old , Because it's always new WebChromeClient, So use it on the outermost layer , The use of base classes may be covered by an outer layer , The pit has been stepped on .
版权声明
本文为[KIDD-4869]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204210603464699.html
边栏推荐
- K210 serial communication
- Implementation of TCP UDP communication with golang language
- ESP32 LVGL8. 1 - bar progress bar (bar 21)
- Actual combat of Nacos as service configuration center
- 回路-通路
- Daily network security certification test questions (April 13, 2022)
- ESP32 LVGL8. 1 - calendar (calendar 25)
- Seata处理分布式事务
- C language simulates entering and leaving the stack, first in first out, first in first out, shared memory
- 22 year flying Book manpower Kit
猜你喜欢
MVVM模型
Function recursion and solving interesting problems
【科普】CRC校验(一)什么是CRC校验?
Machine learning theory (8): model integration ensemble learning
ESP32 LVGL8. 1 - bar progress bar (bar 21)
Tangle
Setting up keil environment of GD single chip microcomputer
Resolution: cnpm: unable to load file \cnpm. PS1, because running scripts is prohibited on this system
七、DOM(下) - 章节课后练习题及答案
ESP32 LVGL8. 1 - msgbox message box (msgbox 28)
随机推荐
Introduction to QT programming
解决:cnpm : 无法加载文件 ...\cnpm.ps1,因为在此系统上禁止运行脚本
kettle庖丁解牛第17篇之文本文件输出
Test questions of daily safety network (February 2024)
使用晨曦记账本,分析某个时间段每个账户收支结余
Daily CISSP certification common mistakes (April 15, 2022)
Ionic 从创建到打包指令集顺序
特征选择feature_selection--SelectKBest
SQL中函数 decode()与 replace()的用法
Imx6 debugging LVDS screen technical notes
7、 DOM (Part 2) - chapter after class exercises and answers
CANopen usage method and main parameters of object dictionary
[popular science] CRC verification (I) what is CRC verification?
Daily network security certification test questions (April 14, 2022)
Daily CISSP certification common mistakes (April 12, 2022)
Sentinel service fusing practice (sentinel integration ribbon + openfeign + fallback)
CISSP certified daily knowledge points (April 14, 2022)
ESP32 LVGL8. 1. Detailed migration tutorial of m5stack + lvgl + IDF (27)
从技术体系到商业洞察,中小研发团队架构实践之收尾篇
Loop path