I am not getting any errors in browser or cli. Here is whole function. Maybe I used this expression incorrectly.
$scope.playSound = function (src) {
if ($window.cordova) {
$scope.media = new $window.Media(src);
$scope.media.play();
} else {
$scope.media = new Audio();
$scope.media.src = src;
$scope.media.load();
$scope.media.play();
}
}