diff --git a/src/player.js b/src/player.js index 6019c1b..b711994 100644 --- a/src/player.js +++ b/src/player.js @@ -58,7 +58,10 @@ export function updatePlayerUI(s) { } let _npBgCurr = 'a'; +let _npBgLastUrl = ''; function _crossfadeNpBg(cv) { + if ((cv || '') === _npBgLastUrl) return; + _npBgLastUrl = cv || ''; const currEl = document.getElementById(`np-bg-${_npBgCurr}`); const nextId = _npBgCurr === 'a' ? 'b' : 'a'; const nextEl = document.getElementById(`np-bg-${nextId}`);