Created
December 24, 2018 16:57
-
-
Save lmansur/8a52973aa07330617185f1ff7a097d53 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
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