Skip to content

Instantly share code, notes, and snippets.

@lmansur
Created December 24, 2018 16:57
Show Gist options
  • Save lmansur/8a52973aa07330617185f1ff7a097d53 to your computer and use it in GitHub Desktop.
Save lmansur/8a52973aa07330617185f1ff7a097d53 to your computer and use it in GitHub Desktop.
module.exports = async function(data) {
if(data.type == 'remote-play') {
// The play button was pressed, we can forward this command to the player using
TrackPlayer.play();
} else if(data.type == 'remote-pause') {
TrackPlayer.pause();
} else if(data.type == 'remote-stop') {
TrackPlayer.stop();
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment