mirror of
https://github.com/the1812/Bilibili-Evolved.git
synced 2025-11-04 21:22:45 +08:00
12 lines
247 B
TypeScript
12 lines
247 B
TypeScript
/**
|
|
* 设置视频的亮度(会与从播放器中设置的亮度叠加)
|
|
*/
|
|
export const setBrightness = (video: HTMLElement, brightness: number) => {
|
|
let b = brightness
|
|
if (b < 0) {
|
|
b = 0
|
|
}
|
|
|
|
video.style.filter = `brightness(${b})`
|
|
}
|