New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Play sound from JS bundle (main.jsbundle) #14
Comments
This sounds like a good idea. It will save us the trouble of manually adding sound assets to XCode. |
@amasad says it does: facebook/react-native#1043 (comment) |
@danleveille Where is sound.mp3 located in your project? |
@zmxv For now I have it in the base project folder (same folder as index.ios.js, etc.). The path the error outputs is correct, which is strange because the file is definitely there. |
Just doing some more debugging: When I do this: I get the error:
However, using an image seems to work fine:
It seems like mp3 files aren't being included. Even if I put the MP3 file in node-modules/react-native-sound/ Any clue on how to make sure the mp3 file is included? |
@danleveille Is the mp3 file listed in the "Copy Bundle Resources" section under "Build Phases"? |
What's the current state of this issue? |
@mrpatiwi This is not a high priority feature on my to-do list. |
…sory Support playing through connected audio accessory
As of react-native 0.14 (https://facebook.github.io/react-native/docs/images.html#static-image-resources), images and other assets can be bundled in the JS bundle and used by simply requiring them (e.g.
<Image source={require('./my-icon.png')} />
). Is it possible to play sounds that are in the JS bundle using react-native-sound?Example:
The text was updated successfully, but these errors were encountered: