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

Error event not caught #78

Open
acorbel opened this issue Jan 25, 2016 · 0 comments
Open

Error event not caught #78

acorbel opened this issue Jan 25, 2016 · 0 comments

Comments

@acorbel
Copy link

acorbel commented Jan 25, 2016

Hi,

I try to catch the 'error' event according to http://www.w3schools.com/tags/ref_av_dom.asp if a track could not be loaded.

I implemented the following:

angular.module('myApp',['mediaPlayer'])
    .controller('MyController', function ($scope) {
        $scope.playerName.on('error', function (evt) {
             // Tell someone a song cannot be loaded.
        });
    })    

This event is not caught but pause/play are.
How can I solve this issue?

It seems that it is the file not found error which is not caught. Maybe encapsulate the $elDom.load() in a try catch and fire an event when fail?

Thank you.

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

1 participant