|
<style>
@import 'https://638183.freep.cn/638183/web/css/tz01.css';
#pa { --offsetX: 64px; --bg: #ccc url('https://638183.freep.cn/638183/t24/w6/tcwh.webp') no-repeat center/cover; }
#progress { position: absolute; width: 15vw; height: 15vw; right: 20px; bottom: 20px; }
#prog, #track { fill: none; stroke: lightblue; stroke-width: 16; stroke-opacity: .5; stroke-linecap: round; stroke-linejoin: round; transition: .15s; cursor: pointer; }
#prog { stroke-opacity: 1; }
#player { transform-box: fill-box; transform-origin: center; cursor: pointer; fill: transparent; animation: rotate 8s linear infinite var(--state); }
#btnFs { left: 20px; bottom: 20px; color: silver; border-color: currentColor!important; }
</style>
<div id="pa">
<audio id="aud" src="https://music.163.com/song/media/outer/url?id=1371760675" autoplay loop></audio>
<video class="qk-vid" src="https://bpic.588ku.com/video_listen/588ku_video/24/12/30/16/16/24/video677256d89bac1.mp4" autoplay loop muted></video>
<svg id="progress" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 400 400">
<g id="player" class="sepia"><title>ALT+X</title></g>
<g id="pg"><title>调节进度</title></g>
</svg>
</div>
<script type="module">
import { FS } from 'https://638183.freep.cn/638183/web/js/pathprog.js';
import Dr from 'https://638183.freep.cn/638183/web/mod/svgdr.mod.js';
var dr = Dr.dr(progress);
var ranColor = () => `hsla(${Math.random() * 360}, 100%, 50%, .9)`;
var ar1 = dr.circlePoints(20, 200, 180), ar2 = dr.circlePoints(3, 200, 120, 15);
ar1.forEach(b => dr.circle(b[0], b[1], 20, ranColor()).addTo('player'));
dr.circle(200,200,200).addTo('player');
dr.polygon(ar2.join(',')).id('track').addTo('pg');
dr.polygon(ar2.join(',')).id('prog').addTo('pg');
FS(pa, player);
</script>
|