angular-media-player icon indicating copy to clipboard operation
angular-media-player copied to clipboard

Problem in safari this.$domEl.load()

Open tlambeir opened this issue 10 years ago • 2 comments

I get this error when trying to use the player in safari browser:

'undefined' is not a function (evaluating 'this.$domEl.play()') scripts/360c0ed9.vendor.js:8

tlambeir avatar Jul 08 '14 08:07 tlambeir

It looks Iike you're minifying or otherwise processing the file before its included. Are you?

If so, have you tried it without minification?

secretfader avatar Aug 07 '14 17:08 secretfader

I am facing same issue. 'undefined' is not a function (evaluating 'this.$domEl.load()') http://localhost:9000/bower_components/angular-media-player/dist/angular-media-player.js:54 Offending code is this:

load: function (mediaElement, autoplay) {
        // method overloading
        if (typeof mediaElement === 'boolean') {
          autoplay = mediaElement;
          mediaElement = null;
        } else if (typeof mediaElement === 'object') {
          this.$clearSourceList();
          this.$addSourceList(mediaElement);
        }
        this.$domEl.load();
        this.ended = undefined;
        if (autoplay) {
          this.$element.one('canplay', this.play.bind(this));
        }
      },

Is there any solution?

rgjamkhedkar avatar Feb 17 '15 12:02 rgjamkhedkar