【东篱音画】此情可待成追忆 只是当时已惘然
<style>.papa { left:-300px; width: 1400px; height: 800px; background: rgba(0,0,0,.4) url('https://s1.ax1x.com/2022/06/28/jecsJI.jpg') no-repeat center / cover; overflow: hidden; box-shadow: 0 4px 24px #000; position: relative; }
.papa input { border: none; outline: none; opacity: .75; cursor: pointer; }
.papa p { margin: 0; padding: 0; }
.playbox { margin: auto; position: relative; top: 650px; padding: 10px; width: fit-content; font: normal 1em sans-serif; color: snow; background: rgba(255,255,255,.25); backdrop-filter: blur(2px); overflow: hidden; box-shadow: 1px 2px 2px #000; text-shadow: 1px 1px 1px #000; z-index: 100; }
#btnplay { width: 30px; height: 30px; border-radius: 50%; }
#btnplay:hover { background: #aaa; color: #ff0000; }
@keyframes opa { to { opacity: 0; } }
</style>
<div class="papa">
<div class="playbox">
<p id="geci" style="font-size: 1.2em">LRC Loading ... </p>
<p style="display: flex; align-items: center; gap: 4px; margin-top: 10px;">
<input id="btnplay" type="button" value=">" />
<input id="slider" type="range" min="0" max="100" value="0" />
<span id="per">0:0 | 0:0</span>
</p>
</div>
<img src="https://s1.ax1x.com/2022/06/28/jec2y8.jpg" alt="" style="position: absolute; top:0; left:0; width: 100%; height: 100%; animation: opa 12s infinite alternate;" />
<audio id="aud" src="https://music.163.com/song/media/outer/url?id=5241799.mp3" autoplay="autoplay" loop="loop"></audio>
</div>
<script>
let slider = document.querySelector('#slider'),
aud = document.querySelector('#aud'),
per = document.querySelector('#per'),
btnplay = document.querySelector('#btnplay'),
geci = document.querySelector('#geci');
let slip = 0;
let lrcAr= [
['0.00',' ◇◇◇◇◇人间自为有情痴◇◇ ◇◇◇'],
['60.58','◇◇◇ ◇◇此事不关风与月◇◇◇◇◇'],
['100.00','◇◇◇◇◇【痴情】【岁月】◇◇◇◇◇'],
['160.00','◇◇◇◇◇ 【烟雨草堂出品】 ◇◇◇◇◇']
];
slider.onmousedown = () => aud.pause();
slider.onchange = () => { aud.currentTime = slider.value * aud.duration / 100; aud.play(); }
btnplay.onclick = () => aud.paused ? aud.play() : aud.pause();
aud.addEventListener('playing', () => btnplay.value = '||');
aud.addEventListener('pause', () => btnplay.value = '>');
aud.addEventListener('timeupdate', () => {
let prog = 100 * aud.currentTime / aud.duration;
slider.value = prog;
per.innerText = toMin(aud.currentTime) + ' | ' + toMin(aud.duration);
for(j=0; j<lrcAr.length; j++){
if(aud.currentTime >= lrcAr - slip){
geci.innerHTML = lrcAr;
}
}
});
let toMin = (sec) => {
if(!sec) return '0:00';
sec = parseInt(sec);
return parseInt(sec / 60) + ':' + parseFloat(sec % 60).toString().padStart(2,'0');
}
</script>
坐个闲人大哥的沙发,好久不见,问好~ 精致音画,播放器很漂亮,音乐与画面绝配~ 我来欣赏闲人的音画{:10_402:} 瞳萤 发表于 2022-6-28 20:35
坐个闲人大哥的沙发,好久不见,问好~
不是好久不见,是太久不见,你改个名,俺都不敢认你了。。。。{:9014:}
蜻蜓 发表于 2022-6-28 21:06
我来欣赏闲人的音画
随便看,不要钱。。。。{:9028:}
东篱闲人 发表于 2022-6-28 21:42
随便看,不要钱。。。。
给你3文钱
蜻蜓 发表于 2022-6-28 21:43
给你3文钱
你看看,还这么客气,富家女啊。。。。{:7_284:}
东篱闲人 发表于 2022-6-28 21:45
你看看,还这么客气,富家女啊。。。。
富家女怎么会三文钱呢
蜻蜓 发表于 2022-6-28 21:49
富家女怎么会三文钱呢
和一文钱没有的比。。。。{:7_284:}