Skip to content

Instantly share code, notes, and snippets.

@mikesurowiec
Last active February 25, 2017 04:48
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 mikesurowiec/16cc9388d26f96dea02d01515ee8769b to your computer and use it in GitHub Desktop.
Save mikesurowiec/16cc9388d26f96dea02d01515ee8769b to your computer and use it in GitHub Desktop.
// AudioComponent.js
import {
NativeModules,
} from 'react-native';
const { AudioManager } = NativeModules;
async function setPlaying (shouldPlay: boolean) => {
const isPlayingNativeResult = await AudioManager.setPlaying(shouldPlay);
// do something with the native result
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment