diff options
| author | PliablePixels <pliablepixels@gmail.com> | 2015-08-17 19:37:06 -0400 |
|---|---|---|
| committer | PliablePixels <pliablepixels@gmail.com> | 2015-08-17 19:37:06 -0400 |
| commit | f073cdda22715b0463b7a3ec48b75cd7fa43938a (patch) | |
| tree | d7ce27d4462d91d4dcdb5ba092e864ca705d7e2a /www/js/app.js | |
| parent | e2df878c71f810cdac7ef9570017d12115719c2e (diff) | |
no video error handling (experimental)
Diffstat (limited to 'www/js/app.js')
| -rw-r--r-- | www/js/app.js | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/www/js/app.js b/www/js/app.js index eaedae7c..5df0278b 100644 --- a/www/js/app.js +++ b/www/js/app.js @@ -114,6 +114,7 @@ angular.module('zmApp', [ } imageLoadingDataShare.set(1); loadImage(); + $attributes.$observe('imageSpinnerSrc', function(value){ //console.log ("SOURCE CHANGED"); imageLoadingDataShare.set(1); @@ -121,6 +122,22 @@ angular.module('zmApp', [ //deregistration(); }); + + + // show an image-missing image FIXME: never seems to get called + $element.bind('error',function () { +console.log ("***** IMAGE ELEMENT ERROR CALLED " + w + "x" + h); + var w = $element.width(); + var h = $element.height(); + + // using 20 here because it seems even a missing image will have ~18px width + // after this error function has been called + //if (w <= 20) { w = 100; } + //if (h <= 20) { h = 100; } + var url = 'img/novideo.png'; + $element.prop('src', url); + //$element.css('border', 'double 3px #cccccc'); + }); function loadImage() { $element.bind("load", function (e) { |
