mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2025-01-19 04:42:33 +00:00
Fix brightness indicator
This commit is contained in:
parent
9bf8731a59
commit
dcaa87e4cb
@ -98,15 +98,22 @@ define(['events', 'playbackManager', 'dom', 'browser', 'css!./iconosd', 'materia
|
||||
}
|
||||
}
|
||||
|
||||
function setIcon(iconElement, icon) {
|
||||
iconElement.classList.remove('brightness_high');
|
||||
iconElement.classList.remove('brightness_medium');
|
||||
iconElement.classList.remove('brightness_low');
|
||||
iconElement.classList.add(icon);
|
||||
}
|
||||
|
||||
function updateElementsFromPlayer(brightness) {
|
||||
|
||||
if (iconElement) {
|
||||
if (brightness >= 80) {
|
||||
iconElement.innerHTML = '';
|
||||
setIcon(iconElement, 'brightness_high');
|
||||
} else if (brightness >= 20) {
|
||||
iconElement.innerHTML = '';
|
||||
setIcon(iconElement, 'brightness_medium');
|
||||
} else {
|
||||
iconElement.innerHTML = '';
|
||||
setIcon(iconElement, 'brightness_low');
|
||||
}
|
||||
}
|
||||
if (progressElement) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user