Skip to content

Commit

Permalink
UI improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
Nadir Technologies committed Dec 30, 2023
1 parent 8f30a64 commit 1123bed
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions player.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,18 +130,30 @@ function analyse() {
var r = Math.round(highVolume / 255 * 100);

if (r < 10) {
r = `00${r}`;
}

else if (r < 100) {
r = `0${r}`;
}

var g = Math.round(midVolume / 255 * 100);

if (g < 10) {
g = `00${g}`;
}

else if (g < 100) {
g = `0${g}`;
}

var b = Math.round(lowVolume / 255 * 100);

if (b < 10) {
b = `00${b}`;
}

else if (r < 100) {
b = `0${b}`;
}

Expand All @@ -162,18 +174,30 @@ function analyse() {
var r = Math.round(midVolume / 255 * 100);

if (r < 10) {
r = `00${r}`;
}

else if (r < 100) {
r = `0${r}`;
}

var g = Math.round(lowVolume / 255 * 100);

if (g < 10) {
g = `00${g}`;
}

else if (g < 100) {
g = `0${g}`;
}

var b = Math.round(highVolume / 255 * 100);

if (b < 10) {
b = `00${b}`;
}

else if (r < 100) {
b = `0${b}`;
}

Expand All @@ -194,18 +218,30 @@ function analyse() {
var r = Math.round(lowVolume / 255 * 100);

if (r < 10) {
r = `00${r}`;
}

else if (r < 100) {
r = `0${r}`;
}

var g = Math.round(midVolume / 255 * 100);

if (g < 10) {
g = `00${g}`;
}

else if (g < 100) {
g = `0${g}`;
}

var b = Math.round(highVolume / 255 * 100);

if (b < 10) {
b = `00${b}`;
}

else if (r < 100) {
b = `0${b}`;
}

Expand All @@ -225,18 +261,30 @@ function analyse() {
var r = Math.round((midVolume * 2) / 255 * 100);

if (r < 10) {
r = `00${r}`;
}

else if (r < 100) {
r = `0${r}`;
}

var g = Math.round(highVolume / 255 * 100);

if (g < 10) {
g = `00${g}`;
}

else if (g < 100) {
g = `0${g}`;
}

var b = Math.round((lowVolume / 2) / 255 * 100);

if (b < 10) {
b = `00${b}`;
}

else if (b < 100) {
b = `0${b}`;
}

Expand Down

0 comments on commit 1123bed

Please sign in to comment.