Created
January 6, 2018 10:31
-
-
Save maciejmatu/039f6e8c4e8929f87e27cff794104b1b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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