refactor: 重构作品播放页性能、媒体同步与内存管理

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-11-04 01:31:10 +08:00
co-authored by Cursor
parent 990e1b1804
commit 10f2520279
19 changed files with 1351 additions and 813 deletions
@@ -1,18 +1,15 @@
import { forwardRef } from "react";
import { forwardRef, memo } from "react";
interface BackgroundCanvasProps {}
export const BackgroundCanvas = forwardRef<
HTMLCanvasElement,
BackgroundCanvasProps
>((props, ref) => {
return (
<canvas
ref={ref}
className="fixed inset-0 w-full h-full -z-10 scale-110"
style={{ filter: "blur(40px)" }}
/>
);
});
export const BackgroundCanvas = memo(
forwardRef<HTMLCanvasElement>((_props, ref) => {
return (
<canvas
ref={ref}
className="pointer-events-none fixed inset-0 w-full h-full -z-10 scale-110"
style={{ filter: "blur(40px)" }}
/>
);
}),
);
BackgroundCanvas.displayName = "BackgroundCanvas";