当前位置:网站首页>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
边栏推荐
- ESP32 LVGL8. 1 - anim animation (anim 16)
- Setting up keil environment of GD single chip microcomputer
- Loop path
- 配置iptables
- Ionic instruction set order from creation to packaging
- QT notes on qmap container freeing memory
- Sentinel service fusing practice (sentinel integration ribbon + openfeign + fallback)
- CISSP certified daily knowledge points (April 12, 2022)
- Esp32 (UART event) - serial port event learning (1)
- [popular science] CRC verification (I) what is CRC verification?
猜你喜欢
Introduction to ROS learning notes (I)
ctfshow-web361(SSTI)
ESP32 LVGL8. 1 - arc (arc 19)
Machine learning theory (7): kernel function kernels -- a way to help SVM realize nonlinear decision boundary
MVVM模型
STM32: LCD显示
【数学建模】—— 层次分析法(AHP)
listener.log
Imx6 debugging LVDS screen technical notes
[mathematical modeling] - analytic hierarchy process (AHP)
随机推荐
kettle庖丁解牛第17篇之文本文件输出
Machine learning theory (8): model integration ensemble learning
listener. log
Nacos作为服务注册中心
Ucosiii transplantation and use, reference punctual atom
纠结
Feature selection feature_ selection--SelectKBest
The corresponding permissions required to automatically open the app in the setting interface through accessibility service
Database computer experiment 4 (data integrity and stored procedure)
CISSP certified daily knowledge points (April 13, 2022)
Excel intercept text
With the use of qchart, the final UI interface can be realized. The control of qweight can be added and promoted to a user-defined class. Only the class needs to be promoted to realize the coordinate
On iptables
Introduction to ROS learning notes (II)
Const keyword, variable and function are decorated with const
Function recursion and solving interesting problems
Practice of Druid SQL and security in meituan review
Keil RVMDK compiled data type
QT notes on qmap container freeing memory
Domestic GD chip can filter