We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 21fcbc0 commit 50f08d5Copy full SHA for 50f08d5
packages/core/src/components/MediaPlayer/AudioPlayer/HeadlessAudioPlayer.tsx
@@ -39,7 +39,12 @@ const HeadlessAudioPlayer = React.forwardRef<
39
const [isPlaying, setIsPlaying] = React.useState(false);
40
41
React.useEffect(() => {
42
- currentSound?.setIsLoopingAsync(isLooping);
+ if (
43
+ currentSound &&
44
+ typeof currentSound?.setIsLoopingAsync === "function"
45
+ ) {
46
+ currentSound.setIsLoopingAsync(isLooping);
47
+ }
48
}, [currentSound, isLooping]);
49
50
const updateAudioMode = React.useCallback(async () => {
0 commit comments