《谁知我心》
本帖最后由 偶然 于 2022-11-15 23:46 编辑 <br /><br /><style>#papa { left: -244px; width: 1346px; height: 772px; ;top:150px; background: darkred url('https://pan.doliy.cn/filestores/2022/11/15//1a36b95e6a66f465f004bb36559b322a.gif') no-repeat center/cover; display: grid; place-items: center; box-shadow: 3px 3px 20px #000; user-select: none; position: relative; z-index: 1;}
#mplayer { position: absolute;top: 230px; width: 120px; height: 120px; left: 180px;border-radius: 50%; overflow: hidden; z-index: 3; }
#track { stroke: url(#gradient); }
#lrc { position: absolute; top: 80px;left: -50px;display: block; }
#lrctxt { text-anchor: middle; dominant-baseline: text-after-edge; fill: url(#gradient); font: bold 2.2em sans-serif; text-shadow: -2px -2px 0px #fff, 2px 2px 3px #000; letter-spacing: 3px; }
#tmsg { fill: RoyalBlue; font: bold 1em sans-serif; }
#btnwrap { display: block; fill: RoyalBlue; cursor: pointer; }
#btnwrap:hover { fill: orange; }
</style>
<div id="papa">
<!-- 播放器 -->
<svg id="mplayer" width="120" height="120" shape-rendering="geometricPrecision">
<g id="mama" transform="rotate(-90, 60, 60)" style="cursor: pointer;">
<circle id="track" cx="60" cy="60" r="50" fill="none" stroke-width="10" stroke="rgba(0,0,0,0.35)" />
<circle id="prog" cx="60" cy="60" r="50" fill="none" stroke-width="4" stroke="rgba(255,255,255,0.55)" />
</g>
<path id="curPath" d="M 20 70 Q 60 0 100 70" fill="none" stroke="none"/>
<path id="durPath" d="M 20 55 Q 60 110 100 55" fill="none" stroke="none"/>
<g id="tmsg">
<text x="34" y="0"><textPath id="curMsg" xlink:href="#curPath" dominant-baseline="text-after-edge">00:00</textPath></text>
<text x="29" y="0"><textPath id="durMsg" xlink:href="#durPath" dominant-baseline="text-before-edge">00:00</textPath></text>
</g>
<g id="btnwrap">
<path id="btnplay" d="M 50 50,50 70,70, 60 z"></path>
<path id="btnpause" d="M 52 50,52 70,57 70,57 50,52 50 z M 60 50,60 70,65 70,65 50,60 50 z"></path>
</g>
</svg>
<!-- lrc歌词 -->
<svg id="lrc" width="560" height="150">
<defs><path id="lrcPath" fill="none" stroke="red" d="M 10 150 Q 305 -10,560 150" /></defs>
<defs>
<linearGradient id="gradient" x1="0" y1="0" x2="0" y2="1">
<stop offset="0%" stop-color="blue"/>
<stop offset="35%" stop-color="yellow"/>
<stop offset="65%" stop-color="gray"/>
<stop offset="100%" stop-color="red"/>
</linearGradient>
</defs>
<textx="54%" y="0"><textPath id="lrctxt" xlink:href="#lrcPath">偶然演唱作品</textPath></text>
</svg>
</div>
<script>
let lrcAr = [
['0.00','《谁知我心》'],
['4.09','演唱:偶然'],
['9.84','制作:偶然'],
['21.91','随风远飘'],
['27.00','前面远望路遥遥'],
['34.10','人生必须奋斗'],
['39.50','烦恼怎会少'],
['45.53','同苦与甘'],
['51.82','谁管甘苦知多少'],
['57.94','如今身边有你'],
['63.42','谁理会前路'],
['67.91','无尽恶兆'],
['77.74',' 最凄楚是世间把我错认'],
['81.26',' 最凄楚是世间把我错认'],
['87.20','唯独你真正明白我'],
['93.05','黑暗尽头是天晓'],
['98.92','谁知我心'],
['104.80','难道我仲未明了'],
['111.63','难得此生有你'],
['117.59','同勉赴危难'],
['121.88','仍共照料'],
['132.01','最凄楚是世间把我错认'],
['141.72','唯独你真正明白我'],
['147.34','黑暗尽头是天晓'],
['152.39','谁知我心'],
['159.89','难道我仲未明了'],
['165.61','难得此生有你'],
['171.44','同勉赴危难'],
['176.17','仍共照料'],
['183.91','谢谢欣赏!'],
['195.33','谢谢欣赏!']
];
let cc = { //圆环对象
x: 1*track.getAttribute('cx'),
y: 1*track.getAttribute('cy'),
r: 1*track.getAttribute('r'),
sw: 1*track.getAttribute('stroke-width'),
len: track.getTotalLength(),
};
let aud = new Audio();
aud.src = 'https://pan.doliy.cn/filestores/2022/11/15//c7c1642dbe14068f6143b04680c705cd.mp3';
aud.autoplay = true;
aud.loop = true;
prog.style.strokeDasharray = prog.style.strokeDashoffset = cc.len; //进度偏移
btnwrap.onclick = () => aud.paused ? aud.play() : aud.pause(); //按钮单击
mama.onclick = (e) => { //环单击
let deg = Math.atan2(e.offsetY - cc.y, e.offsetX - cc.x) * 180 / Math.PI;
deg += (e.offsetX < cc.x && e.offsetY < cc.y) ? 450 : 90;
aud.currentTime = aud.duration * deg / 360;
};
//audio空间各类监听
aud.addEventListener('pause', () => btnstate());
aud.addEventListener('play',() => btnstate());
aud.addEventListener('timeupdate', () => {
prog.style.strokeDashoffset = cc.len - cc.len * aud.currentTime / aud.duration + 'px';
curMsg.textContent = toMin(aud.currentTime);
durMsg.textContent = toMin(aud.duration);
for(j=0; j<lrcAr.length; j++) {
if(aud.currentTime >= lrcAr) lrctxt.textContent = lrcAr;
}
});
//按钮状态
let btnstate = () => aud.paused ? (btnplay.style.display = 'block', btnpause.style.display = 'none') : (btnplay.style.display = 'none', btnpause.style.display = 'block');
//分秒格式化
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;
}
</script>
<br><br><br><br><br><br><br><br><br><br><br><br><br> 欢迎偶然兄光临{:9_365:} 深情的演唱,自然流畅,令人回味,好听{:9_365:}{:9022:} 《谁知我心》 (《大侠霍元甲》电视剧插曲)
原唱:叶振棠、邬玛莉
男:随风远飘 前面远望路遥遥
女:人生必须奋斗 烦恼怎会少
男:同苦与甘 谁管甘苦知多少
女:如今身边有你
谁理会前路 无尽恶兆
男:最凄楚是世间把我错认
唯独你真正明白我
女:黑暗尽头是天晓
男:谁知我心
女:难道我仲未明了
合:难得此生有你
同勉赴危难 仍共照料
男:最凄楚是世间把我错认
唯独你真正明白我
女:黑暗尽头是天晓
男:谁知我心
女:难道我仲未明了
合:难得此生有你
同勉赴危难 仍共照料 一般人可能很少听这首歌,这是当年红极一时的电视连续剧霍元甲的插曲,旋律很优美。 @白萌偶然兄是正宗粤语区人,他唱的粤语歌曲都很正宗。 欢迎偶然来到翻唱版{:10_407:} 我这会听不了,稍后来听! 好声音啊{:10_402:} 唱的真棒!{:10_403:}
页:
[1]
2