Skip to content

Instantly share code, notes, and snippets.

@rafabarzotto
Last active February 10, 2017 21:51
Show Gist options
  • Save rafabarzotto/dbe0e80aa973d7f2bf30361fb4068ac0 to your computer and use it in GitHub Desktop.
Save rafabarzotto/dbe0e80aa973d7f2bf30361fb4068ac0 to your computer and use it in GitHub Desktop.
$scope.startPlay = function() {
if (media == null) {
media = $cordovaMedia.newMedia(src, null, null, null);
}
media.play();
}
$scope.stopPlay = function() {
media.release();
media = null;
}
$scope.pausePlay = function() {
media.pause();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment