Permalink
Browse files

added check around pause function

  • Loading branch information...
madwire committed Jan 25, 2013
1 parent 2ed3a99 commit a0b2ff6d4c6e45c986a99436cb9a07842872de40
Showing with 3 additions and 1 deletion.
  1. +3 −1 app/assets/javascripts/mediaelement_rails/mediaelementplayer.js
@@ -1027,7 +1027,9 @@ if (typeof jQuery != 'undefined') {
this.media.play();
},
pause: function() {
- this.media.pause();
+ if (this.media && this.media.pause) {
+ this.media.pause();
+ }
},
load: function() {
this.media.load();

0 comments on commit a0b2ff6

Please sign in to comment.