Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using the angularPlayer factory methods cause duplicate apply() errors #53

Closed
Mattnmoore opened this issue May 12, 2016 · 4 comments
Closed

Comments

@Mattnmoore
Copy link

Whenever I try to use the factory methods directly, I get errors from Angular saying that apply() is already in progress.

@rochapablo
Copy link

Try $timeout, like:

$timeout(function() {
   angularPlayer.play();
}, 0);

@litil
Copy link

litil commented Jun 5, 2016

Thanks @rochapablo , it worked for me!

@LRonHubs
Copy link

How do you inject the "angularPlayer" object?

@rochapablo
Copy link

rochapablo commented Mar 10, 2017

@LRonHubs, for example in your controller:

app.controller('MainCtrl', ['$scope', 'angularPlayer', function($scope, angularPlayer) {
   // the code ...
}])

... and don't forget:

angular.module('myApp', ['angularSoundManager'])

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants