zmxv / react-native-sound

React Native module for playing sound clips
MIT License
2.78k stars 747 forks source link

Can't play sound from "App Group" paths. #836

Open dcorbin opened 5 months ago

dcorbin commented 5 months ago

:clipboard: Description

The API design limits the paths that sound file can be on for IOS. It should allow a full-path to a file. An easy backward-compatible option might be to introduce a BaseFilePath.ROOT.

:microphone: Motivation

On IOS, I have extension that is used accept shared .MP3 files with my app. For my extension to write them to access them, I have to use a shared container (both extension and App belong to an App Group). However, as the API does not take a full path, but a filename and a "BasePathType", I don't see how I can play files from this shared container that I can otherwise access.

:bulb: Alternatives The only other solution that I can see is that I have to copy all the files from the shared container to the app container which is more complicated and more likely to fail.