葛漂亮 - 突然的自我 (DJ童波版)
<style>#papa {margin: 130px 0 0 calc(50% - 681px); width: 1200px;height:680px;box-shadow: 0px 0px 0px 2px #cccccc, 0px 0px 0px 8px #880000; overflow: hidden;place-items: center; position: relative;z-index: 12345;background: #333;}
.photo {width: 100%;
height: 100%;
position: absolute;z-index: -1;
top:0px; left:0px;
opacity: 0;
animation: round 60s linear infinite;-webkit-mask-image: radial-gradient(black 100% ,transparent 100%);}
@keyframes round{
0% {
-webkit-transform:rotate(0)scale(1.5)translate(10%,0%);
opacity:0}
4% {
-webkit-transform:rotate(0)scale(1.5)translate(-10%,0%);
opacity:1}
8% {
-webkit-transform:rotate(0)scale(1.5)translate(0%,10%);
opacity:1}
12% {
-webkit-transform:rotate(0)scale(1.5)translate(0%,-10%);
opacity:1}
16% {
-webkit-transform:rotate(0)scale(1)translate(0%,0%);
opacity:1}
20% {
-webkit-transform:rotate(0deg)scale(1.5)translate(10%,0%);
opacity:1}
22% {
-webkit-transform:rotate(0deg)scale(1.5)translate(10%,0%);
opacity:0}
}
.photo:nth-child(1) {animation-delay: 48s;background: url('https://xlaj.cn/assets/file/zp/20231008131155.jpg ') no-repeat center/cover;}
.photo:nth-child(2) {animation-delay: 36s;background: url('https://xlaj.cn/assets/file/zp/20231008131221.jpg') no-repeat center/cover;}
.photo:nth-child(3) {animation-delay: 24s;background: url('https://xlaj.cn/assets/file/zp/20231008131155.jpg ') no-repeat center/cover;}
.photo:nth-child(4) {animation-delay: 12s;background: url('https://xlaj.cn/assets/file/zp/20231008131221.jpg') no-repeat center/cover;}
.photo:nth-child(5) {animation-delay: 0s;background: url('https://xlaj.cn/assets/file/zp/20231008131155.jpg') no-repeat center/cover;}
.stop .photo:nth-child(1){animation-play-state: paused;}
.stop .photo:nth-child(2){animation-play-state: paused;}
.stop .photo:nth-child(3){animation-play-state: paused;}
.stop .photo:nth-child(4){animation-play-state: paused;}
.stop .photo:nth-child(5){animation-play-state: paused;}
#mplayer { width: 200px; height: 200px; position: absolute; left: 70%;top: 80%;}
#mplayer text { user-select: none; }
#sPath { cursor: pointer; }
#progress { pointer-events: none; }
#btnPlay:hover { cursor: pointer; filter: brightness(1.2); }
#dt{position: absolute;top:0%; left:0%;width: 100%;height: 100%;z-index: -1;mix-blend-mode:lighten; opacity: 1; }
#lrc { --motion: cover1; --tt: 2s; --state: paused; position: absolute; left: 40%; transform: translate(-50%); top: 84%; font: normal 3em 华文新魏; color:#ff0000; -webkit-background-clip: text; filter:drop-shadow(#ffffff 1px 0 0)drop-shadow(#ffffff 0 1px 0)drop-shadow(#ffffff -1px 0 0) drop-shadow(#ffffff 0 -1px0);}
#lrc::before { position: absolute; content: attr(data-lrc); width: 20%; height: 100%; color: transparent; overflow: hidden; white-space: pre; background:#000080 ; filter: #ffffff; -webkit-background-clip: text; animation: var(--motion) var(--tt) linear forwards; animation-play-state: var(--state); }
@keyframes cover1{0% { width: 0%;filter: hue-rotate(360deg)brightness(150%)}
100% { transform: rotateY(0deg)rotatex(0deg);filter: hue-rotate(0deg)brightness(150%);width: 100%;}
}
@keyframes cover2 { 0% { width: 0%;filter: hue-rotate(360deg)brightness(150%)}
100% { transform: rotateY(0deg)rotatex(0deg);filter: hue-rotate(0deg)brightness(150%);width: 100%;}
}
#fullscreen { position: absolute; top:5%; left:calc(85% - 15px);font: normal 2em/0em 隶书;color:#ffffff; opacity: 1; cursor: pointer; z-index: 111}
</style>
<div id="papa">
<span id="fullscreen">全屏欣赏</span>
<div id="Img" >
<p class="photo" ></p>
<p class="photo" ></p>
<p class="photo" ></p>
<p class="photo" ></p>
<p class="photo" ></p>
</div>
<div id='dt' ><img id="testImg" src="https://i.mp3.wf/view.php/890b7663129b3001a3af4f98deed4cbb.gif" width="100%" height="100%"></div>
<svg id="mplayer">
<path id="sPath" d="M100 5 Q-50 160 190 5" fill="none" stroke="#ffffff" stroke-width="4"></path>
<circle id="progress" cx="10" cy="10" r="5" fill="#306b35" />
<g transform="translate(30,110)" fill="#eee">
<text id="cu" x="-5" y="0">00:00</text>
<image id="btnPlay" x="45" y="-30" width="45" height="45" xlink:href="https://xlaj.cn/assets/file/zp/20231008131301.png "></image>
<text id="du" x="92" y="0">00:00</text>
</g>
</svg>
<audio id="aud" src="https://xlaj.cn/assets/file/zp/20231008131344.mp3" autoplay loop></audio>
<div id="lrc" data-lrc="HCPlayer">HCPlayer</div>
</div>
<script>
let posAr = [];
let len = sPath.getTotalLength();
let playImg = ' https://xlaj.cn/assets/file/zp/20231008131321.png',
pauseImg = 'https://xlaj.cn/assets/file/zp/20231008131301.png ';
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; };
let mState = () => aud.paused ? btnPlay.setAttribute('xlink:href',playImg) : btnPlay.setAttribute('xlink:href',pauseImg);
let getMinItem = (ar) => {
ar.sort((a,b) => a - b);
return ar;
};
for(i = 0; i < len; i ++) {
posAr.push(sPath.getPointAtLength(i));
}
sPath.onclick = (e) => {
let ex = Math.round(e.offsetX), ey = Math.round(e.offsetY), yAr = [];
for(i = 0; i < len; i ++) {
let px = Math.round(posAr.x), py = Math.round(posAr.y);
if(Math.abs(ex-px) <= 4) {
yAr.push();
}
}
aud.currentTime = getMinItem(yAr) * aud.duration / len;
};
aud.addEventListener('timeupdate', () => {
let idx = Math.round(aud.currentTime * len / aud.duration);
progress.setAttribute('cx',posAr.x);
progress.setAttribute('cy',posAr.y);
cu.textContent = toMin(aud.currentTime);
du.textContent = toMin(aud.duration);
});
aud.addEventListener('pause', () => mState());
aud.addEventListener('play', () => mState());
btnPlay.onclick = () => aud.paused ? aud.play() : aud.pause();
var imagee= document.getElementById("testImg");
</script>
<script>
(function() {
/*原始lrc歌词*/
let lrcStr = `突然的自我(DJ童波版)
歌手:葛漂亮
作词:徐克、伍佰
作曲:伍佰
编曲:吴钧平
混音:陈宇图
听见你说 朝阳起又落
晴雨难测道路是脚步多
我已习惯你突然间的自我
挥挥洒洒将自然看通透
那就不要留
时光一过不再有
你远眺的天空
挂更多的彩虹
我会紧紧的
将你豪情放在心头
在寒冬时候
就回忆你温柔
把开怀填进我的心扉
伤心也是带着微笑的眼泪
数不尽相逢
等不完守候
如果仅有此生
又何用待从头
。。。。。。
那就不要留
时光一过不再有
你远眺的天空
挂更多的彩虹
我会紧紧的
将你豪情放在心头
在寒冬时候
就回忆你温柔
把开怀填进我的心扉
伤心也是带着微笑的眼泪
数不尽相逢
等不完守候
如果仅有此生
又何用待从头
。。。。。。
`;
/*变量 :mKey - 当前歌词索引;mFlag :调用关键帧动画索引;averAdd :平均值补偿*/
let mKey = 0, mFlag = true, averAdd = 0.3;
/*函数 :获取每句歌词用时,歌词用时若超过平均值则取平均值,最后一句歌词则取平均值*/
let lrcTime = (ar) => {
let tmpAr = [];
for(j = 0; j <ar.length - 1; j ++) {
if(j !== ar.length - 1) tmpAr = parseFloat((ar - ar).toFixed(1));
}
let aver = parseInt(tmpAr.reduce((a,b) => a + b) / (tmpAr.length - 1)) + averAdd;
tmpAr.push(aver);
tmpAr.forEach((item,key) => {
ar = item > aver ? aver : item;
});
return ar;
};
/*函数 :从原始lrc歌词获取信息并存入 n*3 数组*/
let getLrcAr = (text) => {
let lrcAr = [];
let calcRule = ;
for(x of text.split('\n')) {
let ar = [];
let re = /\d+[\.:]\d+([\.:]\d+)?/g;
let geci = x.replace(re,'');
if(geci) {
geci = geci.replace(/[\[\]\'\"\t,]s?/g,'');
let time = x.match(re);
if(time != null) {
for(y of time) {
let tmp = y.match(/\d+/g);
let sec = 0;
for(z in tmp) sec += tmp * calcRule;
ar = ;
lrcAr.push(ar);
}
}
}
}
lrcAr.sort((a,b)=> a - b);
return(lrcTime(lrcAr));
};
/*函数 :模拟显示同步歌词*/
let showLrc = (time) => {
let name = mFlag ? 'cover1' : 'cover2';
lrc.innerHTML = lrcAr;
lrc.dataset.lrc = lrcAr;
lrc.style.setProperty('--motion', name);
lrc.style.setProperty('--tt', time + 's');
lrc.style.setProperty('--state', 'running');
mKey += 1;
mFlag = !mFlag;
};
/*函数 :处理当前歌词索引 mKey*/
let calcKey = () => {
for (j = 0; j < lrcAr.length; j++) {
if (aud.currentTime <= lrcAr) {
mKey = j - 1;
break;
}
}
if (mKey < 0) mKey = 0;
if (mKey > lrcAr.length - 1) mKey = lrcAr.length - 1;
let time = lrcAr - (aud.currentTime - 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;
}
/*函数 :关键帧动画状态切换*/
let mState = () => aud.paused ? (lrc.style.setProperty('--state','paused')) : (lrc.style.setProperty('--state','running'));
/*监听播放进度*/
aud.addEventListener('timeupdate', () => {
for (j = 0; j < lrcAr.length; j++) {
if (aud.currentTime >= lrcAr) {
cKey = j;
if (mKey === j) showLrc(lrcAr);
else continue;
}
}
});
aud.addEventListener('pause', () => mState());/*监听暂停事件*/
aud.addEventListener('play', () => mState());/*监听播放事件*/
aud.addEventListener('seeked', () => calcKey());/*监听查询事件*/
let lrcAr = getLrcAr(lrcStr); /*获得歌词数组*/
})();
btnPlay.onclick = () => aud.paused ? aud.play() : aud.pause();
let fs = true;
fullscreen.onclick = () => {
fs ? (fullscreen.innerText = '退出全屏', papa.requestFullscreen()) : (fullscreen.innerText = '全屏欣赏', document.exitFullscreen());
fs = !fs;
};
</script>
<script>
(function(){
var image = document.getElementById("Img");
let mState = () => aud.paused ? image.classList.add('stop'): image.classList.remove('stop');
aud.addEventListener('play', () => mState());
aud.addEventListener('pause', () => mState());
})();
</script>
<script>
if ('getContext' in document.createElement('canvas')) {
HTMLImageElement.prototype.play = function() {
if (this.storeCanvas) {
// 移除存储的canvas
this.storeCanvas.parentElement.removeChild(this.storeCanvas);
this.storeCanvas = null;
// 透明度还原
imagee.style.opacity = '';
}
if (this.storeUrl) {
this.src = this.storeUrl;
}
};
HTMLImageElement.prototype.stop = function() {
var canvas = document.createElement('canvas');
// 尺寸
var width = this.width, height = this.height;
if (width && height) {
// 存储之前的地址
if (!this.storeUrl) {
this.storeUrl = this.src;
}
// canvas大小
canvas.width = width;
canvas.height = height;
// 绘制图片帧(第一帧)
canvas.getContext('2d').drawImage(this, 0, 0, width, height);
// 重置当前图片
try {
this.src = canvas.toDataURL("image/gif");
} catch(e) {
// 跨域
this.removeAttribute('src');
// 载入canvas元素
canvas.style.position = 'absolute';
// 前面插入图片
this.parentElement.insertBefore(canvas, this);
// 隐藏原图
this.style.opacity = '0';
// 存储canvas
this.storeCanvas = canvas;
}
}
};
}
(function(){
var imagee = document.getElementById("testImg");
let mState = () => aud.paused ? imagee.stop(): imagee.play();
aud.addEventListener('play', () => mState());
aud.addEventListener('pause', () => mState());
})();
</script>
<br><br><br><br><br> 美女移动转换效果漂亮 {:5_150:}
哇塞,,,超级哇塞 爱了,,{:5_117:} 俺媳妇 bgmnet 发表于 2023-10-8 14:40
哇塞,,,超级哇塞 爱了,,
这个路径播放器带错误的 liumang 发表于 2023-10-8 14:32
{:5_124:}{:5_150:} {:5_152:}bgmnet 发表于 2023-10-8 14:40
哇塞,,,超级哇塞 爱了,,
最前面的小辣椒裁剪掉了{:5_146:}
页:
[1]