当前位置:网站首页>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
边栏推荐
- ctfshow-web361(SSTI)
- Sentinel service fusing practice (sentinel integration ribbon + openfeign + fallback)
- CISSP certified daily knowledge points (April 18, 2022)
- Promote QT default control to custom control
- STM32: LCD display
- The connection of imx6 network port is unstable after power on
- CISSP certified daily knowledge points (April 11, 2022)
- 从技术体系到商业洞察,中小研发团队架构实践之收尾篇
- Sentinel服务熔断实战(sentinel整合ribbon+openFeign+fallback)
- Use of content provider
猜你喜欢
CANopen STM32 transplantation
Druid SQL和Security在美团点评的实践
Eight bit binary multiplier VHDL
Use of regular expressions in QT
7、 DOM (Part 2) - chapter after class exercises and answers
解决:cnpm : 无法加载文件 ...\cnpm.ps1,因为在此系统上禁止运行脚本
Practice of Druid SQL and security in meituan review
PyGame tank battle
Custom prompt box MessageBox in QT
QT add external font ttf
随机推荐
The first leg of the national tour of shengteng AI developer creation and enjoyment day was successfully held in Xi'an
Introduction to QT programming
Teach you to quickly rename folder names in a few simple steps
Iptables - L executes slowly
CISSP certified daily knowledge points (April 19, 2022)
Go 语言 GUI 框架 fyne 中文乱码或者不显示的问题
特征选择feature_selection--SelectKBest
Sentinel service fusing practice (sentinel integration ribbon + openfeign + fallback)
Golang 语言实现TCP UDP通信
ctfshow-web362(SSTI)
Get a list of recent apps
About the operation of unit file reading (I)
RPM包管理
ESP32 LVGL8. 1 - textarea text area (textarea 26)
Nacos作为服务配置中心实战
Resolution: cnpm: unable to load file \cnpm. PS1, because running scripts is prohibited on this system
#yyds干货盘点#stringprep --- 因特网字符串预备
Ucosiii transplantation and use, reference punctual atom
ESP32 LVGL8. 1 - msgbox message box (msgbox 28)
Esp32 (UART event) - serial port event learning (1)