0

I'm just trying to display an error message instead of my video when the video 404's (right now it attempts to load endlessly). I thought the best solution was indicated here, but I don't know that videogular fires an event at all upon 404.

If an event does fire I would just flag a bool to show the div:

controller constructor

error404 = false;
$rootScope.$on('$VideogularError', function(event) {
      error404 = true;
    });

HTML

<videogular ng-hide="error404">
  ...
</videogular>    
<div ng-show="error404">
   404 error occurred!
 </div>
Community
  • 1
  • 1
Womble
  • 345
  • 3
  • 13

1 Answers1

0

It appears there's a vg-error callback you can take off of your videogular element.

<videogular ng-hide="error404" vg-error="error404 = true">
  ...
</videogular>
Daniel A. White
  • 187,200
  • 47
  • 362
  • 445