mirror of
https://github.com/R0m1k3/podcastic.git
synced 2026-10-19 05:06:20 +02:00
fix: resume AudioContext suspendu au onPlay pour activer l'analyse
This commit is contained in:
1 parent
c86887f037
commit
1f800c4afc
1 file changed
+6
-1
@@ -249,7 +249,12 @@ export function AudioProvider({ children }: { children: ReactNode }) {
|
||||
savedPositionRef.current = null;
|
||||
}
|
||||
}}
|
||||
onPlay={() => setIsPlaying(true)}
|
||||
onPlay={() => {
|
||||
setIsPlaying(true);
|
||||
if (webAudioRef.current?.state === 'suspended') {
|
||||
webAudioRef.current.resume();
|
||||
}
|
||||
}}
|
||||
onPause={() => setIsPlaying(false)}
|
||||
onEnded={() => setIsPlaying(false)}
|
||||
onError={handleAudioError}
|
||||
|
||||
Reference in new issue
Block a user