Skip to content

Commit

Permalink
fix: adjust progress-bar work, change opacity of buttons' blik
Browse files Browse the repository at this point in the history
  • Loading branch information
MariyaShusharina committed Sep 22, 2024
1 parent 1825d2b commit 2780fd8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ <h1>Audio Player</h1>
</div>

<div class="song-length-div">
<input type="range" class="song-length" min="0" max="" value="0" onchange="songTimeChange(this.value)">
<input type="range" class="song-length" min="0" max="100" value="0" onchange="songTimeChange(this.value)">
</div>

<div class="audio-div">
Expand Down
4 changes: 4 additions & 0 deletions scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,12 @@ function timeUpdate() {
timeConverter();

currTimeDiv.textContent = songTime;

progressBar.value = Math.round((songTime / songMaxTime) * 100);
}



window.onload = function() {

songMaxTime = Math.round(audio.duration);
Expand Down
6 changes: 3 additions & 3 deletions style.css
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ input[type="range"]::-webkit-slider-thumb {
background-repeat: no-repeat;
background-position: top;
background-size: contain;
opacity: 0.4;
opacity: 0.3;
z-index: 10;
}

Expand Down Expand Up @@ -218,7 +218,7 @@ input[type="range"]::-webkit-slider-thumb {
background-repeat: no-repeat;
background-position: top;
background-size: contain;
opacity: 0.4;
opacity: 0.3;
z-index: 10;
}

Expand All @@ -233,7 +233,7 @@ input[type="range"]::-webkit-slider-thumb {
background-repeat: no-repeat;
background-position: top;
background-size: contain;
opacity: 0.4;
opacity: 0.3;
z-index: 10;
}

Expand Down

0 comments on commit 2780fd8

Please sign in to comment.