From d00d8db71b3de2843a6292791454a1796d2e6df4 Mon Sep 17 00:00:00 2001 From: yassin samir <49534950+Yassin-Samir@users.noreply.github.com> Date: Sun, 18 Aug 2024 12:19:15 +0300 Subject: [PATCH] Changing event listener to onCanPlayThrough --- app/albums/[id]/songPlayer.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/albums/[id]/songPlayer.tsx b/app/albums/[id]/songPlayer.tsx index 8fed350..3287169 100644 --- a/app/albums/[id]/songPlayer.tsx +++ b/app/albums/[id]/songPlayer.tsx @@ -168,7 +168,7 @@ function SongPlayer({ ref={audioRef} onPause={() => setPaused(true)} onVolumeChange={(e) => setVolume(e.currentTarget.volume)} - onCanPlay={() => setLoading(false)} + onCanPlayThrough={() => setLoading(false)} onError={async (e) => { console.log({ error: e.currentTarget.error }); await sleep(2000);