Skip to content

Commit 090bf6a

Browse files
Update player.tsx
for light weight
1 parent a270d07 commit 090bf6a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/app/music/[music_id]/components/player.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ export function Player({ music, musicList }: PlayerProps) {
7777
audioCtxRef.current = new AudioContext();
7878
const elementSource = audioCtxRef.current.createMediaElementSource(audioRef.current);
7979
const analyser = audioCtxRef.current.createAnalyser();
80-
analyser.fftSize = 2 ** 8;
80+
analyser.fftSize = 2 ** 5;
8181

8282
// イコライザーフィルターの作成
8383
const eqFilters: BiquadFilterNode[] = [
@@ -181,7 +181,7 @@ export function Player({ music, musicList }: PlayerProps) {
181181
const maxRadius = Math.min(canvas.width, canvas.height) / 2 - 10;
182182
const maxBarLength = maxRadius * 0.5;
183183
const innerRadius = maxRadius - maxBarLength;
184-
const barWidthCirc = 8;
184+
const barWidthCirc = 4;
185185
const displayLength = bufferLength;
186186

187187
for (let i = 0; i < displayLength; i++) {
@@ -520,4 +520,4 @@ export function Player({ music, musicList }: PlayerProps) {
520520
</section>
521521
</div>
522522
);
523-
}
523+
}

0 commit comments

Comments
 (0)