diff options
Diffstat (limited to 'public/assets/javascripts/mx/primitives/mx.video.js')
| -rw-r--r-- | public/assets/javascripts/mx/primitives/mx.video.js | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/public/assets/javascripts/mx/primitives/mx.video.js b/public/assets/javascripts/mx/primitives/mx.video.js index c5dd749..5341226 100644 --- a/public/assets/javascripts/mx/primitives/mx.video.js +++ b/public/assets/javascripts/mx/primitives/mx.video.js @@ -20,6 +20,7 @@ MX.Video = MX.Object3D.extend({ this.backface && this.el.classList.add("backface-visible") this.el.classList.add("video") this.paused = true + this.muted = this.media.mute this.load() }, @@ -40,12 +41,15 @@ MX.Video = MX.Object3D.extend({ }, ready: function(){ + this.seek( this.media.keyframe || 0 ) + + if (this.media.mute) { + this.mute() + } + if (this.media.autoplay) { this.play() } - else { - this.player.currentTime = this.player.duration / 3 - } }, error: function(err){ @@ -71,10 +75,12 @@ MX.Video = MX.Object3D.extend({ mute: function(){ this.player.muted = true + this.muted = true }, unmute: function(){ this.player.muted = false + this.muted = false }, duration: function(){ |
