Skip to content

Instantly share code, notes, and snippets.

@maciejmatu
Created January 6, 2018 10:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save maciejmatu/039f6e8c4e8929f87e27cff794104b1b to your computer and use it in GitHub Desktop.
Save maciejmatu/039f6e8c4e8929f87e27cff794104b1b to your computer and use it in GitHub Desktop.
const soundObject = new Expo.Audio.Sound();
try {
await soundObject.loadAsync(require('./assets/sounds/hello.mp3'));
await soundObject.playAsync();
// Your sound is playing!
} catch (error) {
// An error occurred!
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment