Skip to content

Commit

Permalink
adding the autplay webkit bug thingi
Browse files Browse the repository at this point in the history
  • Loading branch information
Carl Fürstenberg committed Mar 21, 2010
1 parent 593556e commit 3b51ac7
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions jquery.video.js
Expand Up @@ -112,6 +112,10 @@ $.widget("ui.video", {

$.each( videoOptions , function( key, value) {
if( value !== null ) {
// webkit bug
if( key == 'autoplay' && $.browser.webkit ) {
value = false;
}
self.oldVideoOpts[key] = self.element.attr( key );
self.element.attr( key, value );
}
Expand Down Expand Up @@ -167,6 +171,11 @@ $.widget("ui.video", {
.fadeOut(this.options.fadeSpeed);

self.volumeSlider.slider('value', this.options.volume * 100);

// webkit bug
if( this.options.autoPlay && $.browser.webkit ) {
self.play();
}
},

_createControls: function() {
Expand Down

0 comments on commit 3b51ac7

Please sign in to comment.