first bind loadedmetadata, then set src
This commit is contained in:
parent
6d47477890
commit
a9554bf477
1 changed files with 6 additions and 6 deletions
|
@ -26,12 +26,6 @@ Ox.VideoElement = function(options, self) {
|
||||||
|
|
||||||
self.$videos = self.options.src.map(function(src, i) {
|
self.$videos = self.options.src.map(function(src, i) {
|
||||||
return $('<video>')
|
return $('<video>')
|
||||||
.attr(Ox.extend({
|
|
||||||
preload: 'metadata',
|
|
||||||
src: src
|
|
||||||
}, i == 0 && self.options.autoplay ? {
|
|
||||||
autoplay: 'autoplay'
|
|
||||||
} : {}))
|
|
||||||
.css({position: 'absolute'})
|
.css({position: 'absolute'})
|
||||||
.bind({
|
.bind({
|
||||||
ended: function() {
|
ended: function() {
|
||||||
|
@ -66,6 +60,12 @@ Ox.VideoElement = function(options, self) {
|
||||||
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
.attr(Ox.extend({
|
||||||
|
preload: 'metadata',
|
||||||
|
src: src
|
||||||
|
}, i == 0 && self.options.autoplay ? {
|
||||||
|
autoplay: 'autoplay'
|
||||||
|
} : {}))
|
||||||
.hide()
|
.hide()
|
||||||
.appendTo(that.$element);
|
.appendTo(that.$element);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue