Compare commits
No commits in common. "a192a01291375d5152439a191685a8a3a9e4dfc5" and "edead36aa90742d85562629edb5d3a13b66a876c" have entirely different histories.
a192a01291
...
edead36aa9
|
@ -36,7 +36,6 @@
|
||||||
* @var HTMLElement ticker
|
* @var HTMLElement ticker
|
||||||
*/
|
*/
|
||||||
let ticker;
|
let ticker;
|
||||||
let tickerTimer = null;
|
|
||||||
// TODO - make processEvent react as instantly as possible to hideOverlay/showOverlay by resetting interval timer
|
// TODO - make processEvent react as instantly as possible to hideOverlay/showOverlay by resetting interval timer
|
||||||
function processEvent() {
|
function processEvent() {
|
||||||
let lastChangeHadEffect = false;
|
let lastChangeHadEffect = false;
|
||||||
|
@ -305,28 +304,6 @@
|
||||||
artist,
|
artist,
|
||||||
})}`;
|
})}`;
|
||||||
}
|
}
|
||||||
function hideTicker() {
|
|
||||||
console.log('hideTicker called');
|
|
||||||
const currentlyActiveElement = ticker.querySelector('.active');
|
|
||||||
if (currentlyActiveElement) {
|
|
||||||
currentlyActiveElement.classList.remove('active');
|
|
||||||
currentlyActiveElement.classList.add('hidden');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (tickerTimer !== null) {
|
|
||||||
console.log('clearing interval for ticker timer');
|
|
||||||
clearInterval(tickerTimer);
|
|
||||||
tickerTimer = null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
function showTicker() {
|
|
||||||
console.log('showTicker called');
|
|
||||||
if (tickerTimer === null) {
|
|
||||||
console.log('setting interval for ticker timer');
|
|
||||||
tick();
|
|
||||||
tickerTimer = setInterval(tick, 8000);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
function tick() {
|
function tick() {
|
||||||
const currentlyActiveElement = ticker.querySelector('.active');
|
const currentlyActiveElement = ticker.querySelector('.active');
|
||||||
let nextElement;
|
let nextElement;
|
||||||
|
@ -353,6 +330,7 @@
|
||||||
setInterval(processEvent, 1000);
|
setInterval(processEvent, 1000);
|
||||||
|
|
||||||
ticker = document.getElementById('ticker');
|
ticker = document.getElementById('ticker');
|
||||||
|
setInterval(tick, 5000);
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<script>
|
<script>
|
||||||
|
@ -365,20 +343,10 @@
|
||||||
data.progress > 0 && data.duration > 0
|
data.progress > 0 && data.duration > 0
|
||||||
? data.progress > data.duration - 15000
|
? data.progress > data.duration - 15000
|
||||||
: false;
|
: false;
|
||||||
const isIntro =
|
if (data.status === 'stopped' || almostEnding) {
|
||||||
data.title === 'Intro' &&
|
// stopped
|
||||||
data.artists.includes('Imaginary Frequencies');
|
|
||||||
if (data.status === 'stopped' || almostEnding || isIntro) {
|
|
||||||
// stopped or intro
|
|
||||||
hideOverlay();
|
hideOverlay();
|
||||||
|
|
||||||
// intro?
|
|
||||||
if (isIntro) {
|
|
||||||
hideTicker();
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
showTicker();
|
|
||||||
|
|
||||||
// playing or paused
|
// playing or paused
|
||||||
const artistString = data.artists
|
const artistString = data.artists
|
||||||
? data.artists.reduce((previous, currentValue, currentIndex) => {
|
? data.artists.reduce((previous, currentValue, currentIndex) => {
|
||||||
|
@ -456,7 +424,7 @@
|
||||||
font-family: 'Oxanium', sans-serif;
|
font-family: 'Oxanium', sans-serif;
|
||||||
/* font-family: 'Bahnschrift', sans-serif; */
|
/* font-family: 'Bahnschrift', sans-serif; */
|
||||||
/* font-family: 'Montserrat', Arial, Helvetica, sans-serif; */
|
/* font-family: 'Montserrat', Arial, Helvetica, sans-serif; */
|
||||||
font-size: 32px;
|
font-size: 24px;
|
||||||
color: white;
|
color: white;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
|
@ -731,7 +699,6 @@
|
||||||
<span class="fab fa-twitch"> </span>
|
<span class="fab fa-twitch"> </span>
|
||||||
https://twitch.tv/icedreammusic
|
https://twitch.tv/icedreammusic
|
||||||
</div>
|
</div>
|
||||||
<div>Visualizations provided by Vovoid Media - https://vsxu.com</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="right">
|
<div class="right">
|
||||||
|
|
Loading…
Reference in New Issue