Open hecodeit opened 2 years ago
I find the problem is: iOS device "suspended" audio. Using "Click" or "Touchdown" mount PositionalAudio don't work on iOS.
const audioRef = useRef<PositionalAudioImpl>();
useEffect(() => {
// for iOS
if (audioRef.current && audioRef.current.context.state !== "running") {
audioRef.current.context.resume();
}
})
Anyway, I don't understand why OLD VERSION Lulaby city is working?
three
version: 0.144.0@react-three/fiber
version: 8.6.2@react-three/drei
version: 9.25.3node
version: 16.16.0yarn
version: 1.22.19Problem description:
PositionalAudio no working on iOS
Relevant code:
I'm fork the original example from Lulaby city My version is here. It is exactly same with the original one, but update fiber and drei to latest version.
The original example working on iOS, the updating version don't. Can not find the problem from?