summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjulian laplace <julescarbon@gmail.com>2022-10-26 21:46:51 +0200
committerjulian laplace <julescarbon@gmail.com>2022-10-26 21:46:51 +0200
commit76bead776ed0380ab6d1ebf7cb133cc797ae7d54 (patch)
treeee40ee0e985c78e2baedb92071bdd9ee090fe832
parentd746dffc069fcec569081db951f72ef816625b19 (diff)
reset current index, for now
-rw-r--r--public/assets/css/hootstream.css2
-rw-r--r--public/assets/js/lib/views/details/audio.js5
2 files changed, 5 insertions, 2 deletions
diff --git a/public/assets/css/hootstream.css b/public/assets/css/hootstream.css
index a8cd0d7..2bee4b2 100644
--- a/public/assets/css/hootstream.css
+++ b/public/assets/css/hootstream.css
@@ -229,7 +229,7 @@
content: "";
width: 100%;
height: 100%;
- opacity: 0.2;
+ opacity: 0.1;
position: absolute;
top: 0;
left: 0;
diff --git a/public/assets/js/lib/views/details/audio.js b/public/assets/js/lib/views/details/audio.js
index 30c5efd..fb72e0b 100644
--- a/public/assets/js/lib/views/details/audio.js
+++ b/public/assets/js/lib/views/details/audio.js
@@ -26,6 +26,7 @@ var audio = (function () {
audio.index = function () {
music = [];
+ current_index = -1;
var links = document.querySelectorAll("a");
Array.prototype.slice.apply(links).forEach(function (link) {
if (!link.href.match(/\.(mp3|wav|aiff?|m4a|ogg|opus|flac)$/)) return;
@@ -70,7 +71,9 @@ var audio = (function () {
audio.set_cursor = function () {
selected = document.querySelector(".playing");
if (selected) selected.classList.remove("playing");
- music[current_index].classList.add("playing");
+ if (current_index > -1) {
+ music[current_index].classList.add("playing");
+ }
};
audio.prev = function () {