diff --git a/css/custom.css b/css/custom.css
index c122e7c7..38639c5f 100644
--- a/css/custom.css
+++ b/css/custom.css
@@ -62,7 +62,7 @@ div.social-container {
i.fa {background: none !important;}
-i.fa.fa-play:hover, i.fa.fa-pause:hover, i.fa.fa-step-forward:hover, i.fa.fa-times:hover, i.fa.fa-step-backward:hover {
+ i.fa.fa-step-forward:hover, i.fa.fa-times:hover, i.fa.fa-step-backward:hover {
color:#0e8664;
transition: 0.3s;
}
@@ -499,3 +499,31 @@ i.fa.fa-thumbs-down.fa-5x:hover{
text-align:center;
background:rgb(48, 187, 104);
}
+#changeTrackParent{
+ width: 25vw;
+ height: 70vh;
+ overflow-y: scroll;
+}
+.track{
+ padding:20px;
+ display: flex;
+ transition: all .2s ease-in-out;
+ justify-content: space-between;
+ border:solid 1px #f4f0ed;
+ background-color: #82b75b;
+}
+#track-head{
+ padding-bottom:20px;
+}
+#artist{
+ font-size: 80%;
+}
+.fa-caret-down{
+ cursor: pointer;
+}
+.track:hover{
+ background-color: #82b70a;
+}
+.fa-play{
+ cursor: pointer;
+}
\ No newline at end of file
diff --git a/index.html b/index.html
index c2204833..f6d188eb 100644
--- a/index.html
+++ b/index.html
@@ -161,8 +161,7 @@
-
-
+
@@ -210,6 +209,15 @@
+ Change Track
+
+
+
diff --git a/js/sound.js b/js/sound.js
index d3dac5aa..0d6c29f4 100644
--- a/js/sound.js
+++ b/js/sound.js
@@ -254,7 +254,7 @@ function stopBackgroundAudio() {
document.getElementById("pause").style.display ="none";
document.getElementById("play-pause-float").children[0].classList.remove("fa-pause");
document.getElementById("play-pause-float").children[0].classList.add("fa-play");
- togglePause();
+
}
function setVolume() {
@@ -279,9 +279,24 @@ function playAudio(audio, licenseNum) {
}
function playPauseFloat() {
- if(backgroundPlay.paused === true) {
+ if(backgroundPlay.paused) {
startBackgroundAudio();
} else {
stopBackgroundAudio();
}
}
+function playBgAudio(filename,index){
+ if(!backgroundPlay.paused){
+ document.getElementById("changeTrack"+index).className="fa fa-play";
+ stopBackgroundAudio();
+ }else{
+ document.getElementById("changeTrack"+index).className="fa fa-pause";
+ backgroundPlay = new Audio(filename);
+ startBackgroundAudio();
+ $("#legalNotice").html(backgroundAudio[index].legalNotice);
+ $("#backgroundSongName").html(backgroundAudio[index].backgroundSongName);
+ $("#legalNotice").attr("href", backgroundAudio[index].link);
+ $("#backgroundSongAuthor").html(backgroundAudio[index].author);
+ }
+
+}
\ No newline at end of file
diff --git a/js/toggle_play_pause.js b/js/toggle_play_pause.js
deleted file mode 100644
index fed8503a..00000000
--- a/js/toggle_play_pause.js
+++ /dev/null
@@ -1,10 +0,0 @@
-//toggle color of play pause button
-
-function togglePause(){
- $(".fa.fa-play").css("color","#FFFFFF");
- $(".fa.fa-pause").css("color","#FF0000");
-}
-function togglePlay(){
- $(".fa.fa-play").css("color","#0000FF");
- $(".fa.fa-pause").css("color","#FFFFFF");
-}