首页音量旋钮,不允许用户主动调节音量
This commit is contained in:
@@ -609,25 +609,15 @@ export default function Home() {
|
|||||||
{/* Right knob */}
|
{/* Right knob */}
|
||||||
<div className={cn("pr-4", volumePassthroughActive && "opacity-40 pointer-events-none")}>
|
<div className={cn("pr-4", volumePassthroughActive && "opacity-40 pointer-events-none")}>
|
||||||
<div
|
<div
|
||||||
className="w-12 h-12 rounded-full flex items-center justify-center touch-none select-none"
|
className="w-12 h-12 rounded-full flex items-center justify-center select-none pointer-events-none"
|
||||||
style={{
|
style={{
|
||||||
background: "radial-gradient(circle at 35% 35%, #4a4a4e, #1a1a1c)",
|
background: "radial-gradient(circle at 35% 35%, #4a4a4e, #1a1a1c)",
|
||||||
border: "2px solid rgba(255,255,255,0.12)",
|
border: "2px solid rgba(255,255,255,0.12)",
|
||||||
boxShadow: "inset 0 2px 4px rgba(0,0,0,0.5)",
|
boxShadow: "inset 0 2px 4px rgba(0,0,0,0.5)",
|
||||||
transform: `rotate(${knobAngle}deg)`,
|
transform: `rotate(${knobAngle}deg)`,
|
||||||
transition: knobDraggingRef.current ? "none" : "transform 120ms ease-out",
|
transition: "transform 120ms ease-out",
|
||||||
}}
|
}}
|
||||||
role="slider"
|
aria-hidden="true"
|
||||||
aria-label="Volume"
|
|
||||||
aria-valuemin={0}
|
|
||||||
aria-valuemax={200}
|
|
||||||
aria-valuenow={localVol}
|
|
||||||
aria-disabled={volumePassthroughActive}
|
|
||||||
onPointerDown={beginKnobDrag}
|
|
||||||
onPointerMove={moveKnobDrag}
|
|
||||||
onPointerUp={endKnobDrag}
|
|
||||||
onPointerCancel={endKnobDrag}
|
|
||||||
onLostPointerCapture={lostKnobPointerCapture}
|
|
||||||
>
|
>
|
||||||
<div className="w-1 h-4 rounded-full bg-white/40" style={{ transform: "rotate(-30deg)", transformOrigin: "bottom center" }} />
|
<div className="w-1 h-4 rounded-full bg-white/40" style={{ transform: "rotate(-30deg)", transformOrigin: "bottom center" }} />
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user