ngCordova, newMedia, result not working

The docs for ngCordova, media, show this:

var media = $cordovaMedia.newMedia(src).then(function() {
 // success
 }, function () {
 // error
});

media.play();

This gives an error because media.play is undefined. Also, neither the success or error functions ever run.