当前位置:网站首页>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
边栏推荐
- Imx6 debugging LVDS screen technical notes
- Feature selection feature_ selection--SelectKBest
- Daily CISSP certification common mistakes (April 13, 2022)
- How can programmers quickly develop high-quality code?
- QT curve / oscilloscope customplot control
- C language simulates entering and leaving the stack, first in first out, first in first out, shared memory
- Loop path
- Esp32 (UART 485 communication) - 485 communication of serial port (3)
- ctfshow-web362(SSTI)
- WiFi ap6212 driver transplantation and debugging analysis technical notes
猜你喜欢
Résolution: cnpm: impossible de charger le fichier... Cnpm. PS1 parce que l'exécution de scripts est désactivée sur ce système
[mathematical modeling] - analytic hierarchy process (AHP)
iptables -L执行缓慢
Practice of Druid SQL and security in meituan review
从技术体系到商业洞察,中小研发团队架构实践之收尾篇
ESP32 LVGL8. 1 - textarea text area (textarea 26)
Esp32 drive encoder -- siq-02fvs3 (vscade + IDF)
使用 bitnami/postgresql-repmgr 镜像快速设置 PostgreSQL HA
ctfshow-web361(SSTI)
On iptables
随机推荐
Teach you to quickly rename folder names in a few simple steps
教你用简单几个步骤快速重命名文件夹名
CANopen STM32 transplantation
Sentinel service fusing practice (sentinel integration ribbon + openfeign + fallback)
解决:cnpm : 無法加載文件 ...\cnpm.ps1,因為在此系統上禁止運行脚本
使用 bitnami/postgresql-repmgr 镜像快速设置 PostgreSQL HA
22年字节跳动飞书人力套件三面面经
根据快递单号查询物流查询更新量
配置iptables
昇腾 AI 开发者创享日全国巡回首站在西安成功举行
ESP32 LVGL8. 1. Detailed migration tutorial of m5stack + lvgl + IDF (27)
CISSP certified daily knowledge points (April 18, 2022)
How can programmers quickly develop high-quality code?
Machine learning theory (7): kernel function kernels -- a way to help SVM realize nonlinear decision boundary
Ucosiii transplantation and use, reference punctual atom
STM32: LCD显示
#yyds干货盘点#stringprep --- 因特网字符串预备
22 year flying Book manpower Kit
ESP32 LVGL8. 1 - BTN button (BTN 15)
ESP32 LVGL8. 1 - arc (arc 19)