Created
March 28, 2014 17:12
-
-
Save dasevilla/9837849 to your computer and use it in GitHub Desktop.
Start and pause a track at specific positions
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
R.player.on("change:position", function(newValue) { | |
console.log("the position is now " + newValue); | |
if (newValue == 30) { | |
R.player.pause(); | |
} | |
}); | |
R.player.play({ | |
source: "t2866554", | |
initialPosition: 5 | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment