Closed lqzhgood closed 4 years ago
https://w3c.github.io/picture-in-picture/
应该没办法做到透明背景。
研究了一下 有几个问题请教一下~
PIP 就是一个(且只能是) video
,
pip不受css 控制
video默认背景 黑色,填入 透明canvas 也只能显示黑色。
==> 所以做不了 透明。
不死心 早上起来试了下~~ 哎 果然默认背景是黑的。。。
修改为 半透明红色
ctx.fillStyle= "rgba(255 ,0 ,255,0.5)";
ctx.fillRect( 0, 0, WIDTH, HEIGHT);
结果是 黑色叠底 + 半透明红色~~ 说明背景是 纯黑的。
不能透明挺正常的,窗口是系统创建的,不是js,css。就算背景透明了窗口阴影还去不掉呢
add transparent background options ?
like this https://www.appinn.com/mcool-music-player/