今夜你想我不 歌手:刘秋仪
<style>
#papa {
--state: paused;
margin: 120px 0 0 calc(50% - 753px);
display: grid;
place-items: center;
width: 1337px;
height: 752px;
background: lightblue url('https://wj.zp68.com/lxx/yunhua/2023/03/22/GIF.gif') no-repeat center/cover;
box-shadow: 6px 3px 20px #000;
user-select: none;
position: relative;
z-index: 1;
}
.mypic { position: absolute; top: 240px; left: 700px;}
.mypic1 { position: absolute; top: 330px; left: 60px;}
@keyframes flash { to { box-shadow: 0 0 20px 10px hsla(120, 50%,50%, .35), -2px -2px 4px black inset; } }
</style>
<div id="papa">
<img class="mypic" src="https://wj.zp68.com/lxx/yunhua/2023/03/22/xx.gif" alt="" />
<img class="mypic1" src="https://wj.zp68.com/lxx/yunhua/2023/03/22/1.png" alt="" />
<div id="mplayer1"></div>
<audio id="aud" src="https://wj.zp68.com/lxx/yunhua/2023/03/22/jyxw.mp3" autoplay loop></audio>
</div>
<script>
(function() {
let total = 18, fs = false, timerId;
for(let i = 0; i < total; i ++) {
let ball = document.createElement('span');
ball.className = 'ball';
ball.style.cssText += `
background: #${Math.random().toString(16).substr(-6)};
transform: rotate(${360/total*i}deg) translate(60px);
animation: flash ${Math.random()+0.6}s infinite alternate var(--state);
`;
mplayer1.appendChild(ball);
}
(function(mkPlayer) {let defaults = {lrcAr: [],lrc_css: 'top: 10px; left: 50%; transform: translateX(-50%);',player_css: 'bottom: 20px; left: 50%; transform: translateX(-50%);',playerCode: `<style>#mplayer {position: absolute;grid-template-areas: 'cur btnplay dur''prog prog prog';gap: 10px 4px;display: grid;place-items: center;color: var(--color);font: normal 16px sans-serif;z-index: 999;--bgColor: linear-gradient(to right, var(--prog) 0%, var(--prog) 0%, var(--track) 0%, var(--track));--ww: 260px;--color: hsla(100,10%,80%,.95);--track: hsla(90, 100%, 95%, .65);--prog: hsl(0,50%,50%);}#btnplay {--state: paused;position: absolute;top: -40px;width: 50px;height: 50px;border-radius: 50%;box-shadow: 10px 8px 0 0 var(--track);cursor: pointer;opacity: .9;animation: rot 1s linear infinite alternate;animation-play-state: var(--state);}#btnplay::before, #btnplay::after { position: absolute; content: ''; }#btnplay::before { left: 15px; top: 12px; width: 90%; height: 90%; }#btnplay::after {left: 15px;top: 15px;width: 40%;height: 40%;border-radius: 50%;background: var(--track);}#btnplay:hover { opacity: 1; }#prog {grid-area: prog;-webkit-appearance: none;width: var(--ww); outline: none;background: none;position: relative;}#prog::-webkit-slider-thumb {-webkit-appearance: none;position: relative;width: 20px;height: 20px;border: 6px solid var(--color);border-radius: 50%;background: var(--prog);top: calc(50% - 10px);cursor: pointer;z-index: 888;}#prog::-moz-range-thumb {-webkit-appearance: none;width: 12px;height: 12px;border: 6px solid var(--color);border-radius: 50%;background: var(--prog);cursor: pointer;z-index: 888;}#prog::-webkit-slider-runnable-track { height: 6px; border-radius: 10px; background: var(--bgColor); }#prog::-moz-range-track { height: 6px; border-radius: 10px; background: var(--bgColor); }#cur { grid-area: cur; color: var(--color); }#dur { grid-area: dur; color: var(--color); }#lrc {--motion: cover2;--tt: 2s;--state: paused;--bg: linear-gradient(180deg, hsla(240, 50%, 50%, .25), hsla(240, 30%, 50%, .75));position: absolute;font: bold 2.4em sans-serif;color: hsl(0, 10%, 90%);white-space: pre;-webkit-background-clip: text;filter: drop-shadow(1px 1px 2px hsla(0, 0%, 0%, .95));}#lrc::before {position: absolute;content: attr(data-lrc);width: 20%;height: 100%;color: transparent;overflow: hidden;white-space: pre;background: var(--bg);filter: inherit;-webkit-background-clip: text;animation: var(--motion) var(--tt) linear forwards;animation-play-state: var(--state);}@keyframes cover1 { from { width: 0;} to { width: 100%; } }@keyframes cover2 { from { width: 0; } to { width: 100%; } }@keyframes rot { to { transform: rotate(30deg); } }</style><div id="lrc" data-lrc="HCPlayer">HCPlayer</div><div id="mplayer"><span id="cur">00:00</span><span id="dur">00:00</span><span id="btnplay"></span><input type="range" id="prog" step="0.1" max="100" value="0" /></div>`,};let playCode = (user_config) => {let data = Object.assign({}, defaults, user_config);papa.innerHTML += data.playerCode;mplayer.style.cssText += data.player_css;lrc.style.cssText += data.lrc_css;let mKey = 0, mFlag = true, mDrag = false;btnplay.onclick = () => aud.paused ? aud.play() : aud.pause();prog.onmousedown = () =>mDrag =true;prog.onmouseout = () => mDrag = false;prog.onchange = () => { aud.currentTime = aud.duration * prog.value / 100; mDrag = false; };prog.onmousemove = () => prog.style.setProperty('--bgColor', `linear-gradient(to right, var(--prog) 0%, var(--prog) ${prog.value}%, var(--track) ${prog.value}%, var(--track))`);aud.addEventListener('timeupdate', () => {cur.innerText = toMin(aud.currentTime);dur.innerText = toMin(aud.duration);prog.style.setProperty('--bgColor', `linear-gradient(to right, var(--prog) 0%, var(--prog) ${prog.value}%, var(--track) ${prog.value}%, var(--track))`);if(mDrag===false) prog.value = aud.currentTime / aud.duration * 100;for (j = 0; j < data.lrcAr.length; j++) {if (aud.currentTime >= data.lrcAr) {cKey = j;if (mKey === j) showLrc(data.lrcAr);else continue;}}});aud.addEventListener('pause', () => mState());aud.addEventListener('play', () => mState());aud.addEventListener('seeked', () => calcKey());let mState = () => aud.paused ? (lrc.style.setProperty('--state', 'paused'), btnplay.style.setProperty('--state', 'paused')) : (lrc.style.setProperty('--state', 'running'), btnplay.style.setProperty('--state', 'running'));let showLrc = (time) => {let name = mFlag ? 'cover1' : 'cover2';lrc.innerHTML = data.lrcAr;lrc.dataset.lrc = data.lrcAr.replace(/<br>/, '\n');lrc.style.setProperty('--motion', name);lrc.style.setProperty('--tt', time + 's');lrc.style.setProperty('--state', 'running');mKey += 1;mFlag = !mFlag;};let calcKey = () => {for (j = 0; j < data.lrcAr.length; j++) {if (aud.currentTime <= data.lrcAr) {mKey = j - 1;break;}}if (mKey < 0) mKey = 0;if (mKey > data.lrcAr.length - 1) mKey = data.lrcAr.length - 1;let time = data.lrcAr - (aud.currentTime - data.lrcAr);showLrc(time);};let toMin = (val) => {if (!val) return '00:00';val = Math.floor(val);let min = parseInt(val / 60), sec = parseFloat(val % 60);if (min < 10) min = '0' + min;if (sec < 10) sec = '0' + sec;return min + ':' + sec;}};mkPlayer.HCPlayer = playCode;})(this);
let lrcAr = [
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
];
HCPlayer({
lrcAr: lrcAr,
lrc_css: 'top: 100px; left: 700px; --bg: #f2fb08;',
player_css: 'bottom: 40px; left: 880px; --color: #ccc; --ww: 180px;',
});
})();
</script>
<br><br><br><br> 手机欣赏点击月亮播放器 不想。。。。一点不想 沉默 发表于 2023-3-22 21:48
不想。。。。一点不想
{:9001:}
笑S了
宁静 发表于 2023-3-22 21:49
笑S了
早点睡觉,明天会迟到了
今夜你想我不?我答,想{:9005:}想你的播放器怎么做的这么好呢 蜻蜓 发表于 2023-3-22 21:50
今夜你想我不?我答,想想你的播放器怎么做的这么好呢
这个播放器简单的,动图烦一点{:9001:}
沉默 发表于 2023-3-22 21:50
早点睡觉,明天会迟到了
好的,一起下,晚安
宁静 发表于 2023-3-22 21:51
这个播放器简单的,动图烦一点
我反正不会,看你发的都好
两杯红酒,微醺刚好!