1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Move icons into class

This commit is contained in:
Dmitry Lyzo 2020-04-25 10:00:20 +03:00
parent 73d39fe055
commit d088f5ef05
74 changed files with 229 additions and 233 deletions

View file

@ -11,7 +11,7 @@ define(['events', 'playbackManager', 'dom', 'browser', 'css!./iconosd', 'materia
function getOsdElementHtml() {
var html = '';
html += '<i class="material-icons iconOsdIcon"></i>';
html += '<i class="material-icons iconOsdIcon volume_up"></i>';
html += '<div class="iconOsdProgressOuter"><div class="iconOsdProgressInner"></div></div>';
@ -101,7 +101,9 @@ define(['events', 'playbackManager', 'dom', 'browser', 'css!./iconosd', 'materia
function updatePlayerVolumeState(isMuted, volume) {
if (iconElement) {
iconElement.innerHTML = isMuted ? '&#xE04F;' : '&#xE050;';
let icons = ["volume_off", "volume_up"];
if (isMuted) icons = icons.reverse();
iconElement.classList.replace(icons[0], icons[1]);
}
if (progressElement) {
progressElement.style.width = (volume || 0) + '%';