Ring a bell at $scope.counter === 0?

Hello ionicframework forum friends,

I want to play a short soundclip, such as a bell or a chime, at the end of a function. It will literally play for 5 seconds and then not play again until the same event is fired.

$scope.on('timer-end', function () {
    // play chime

Will the best method be to use ngCordovas Media Plugin, or will this completely enable the Music application within the respective operating system?

Thank you!

Hey @azurikai!

If you code something like this:

var media = $cordovaMedia.newMedia(src);

The sound will be played in background (the Music app will not appear)


exactly what I was wondering. I was just worried it’d open up the media player, thanks for the help man :heart:

1 Like