only add uid to http urls, this breaks for file:// or blob urls
This commit is contained in:
parent
17b17707fc
commit
461cd3d686
1 changed files with 13 additions and 3 deletions
|
@ -91,7 +91,9 @@ Ox.VideoElement = function(options, self) {
|
|||
item.$videos = src.map(function(src, i) {
|
||||
// in all browsers except firefox,
|
||||
// loadedmetadata fires only once per src
|
||||
src += '?' + Ox.uid();
|
||||
if(Ox.parseURL(src).protocol.substr(0, 4) == 'http') {
|
||||
src += '?' + Ox.uid();
|
||||
}
|
||||
return $('<video>')
|
||||
.css({position: 'absolute'})
|
||||
.bind({
|
||||
|
@ -433,12 +435,20 @@ Ox.VideoElement = function(options, self) {
|
|||
self.$video[self.currentPart].src = self.options.src[self.currentPart];
|
||||
self.$video.each(function(video, i) {
|
||||
if (i != self.currentPart) {
|
||||
video.src = self.options.src[i] + '?' + Ox.uid();
|
||||
var src = self.options.src[i];
|
||||
if(Ox.parseURL(src).protocol.substr(0, 4) == 'http') {
|
||||
src += '?' + Ox.uid();
|
||||
}
|
||||
video.src = src;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
Ox.forEach(self.items[0].$videos, function($video, i) {
|
||||
$video[0].src = self.options.src[i] + '?' + Ox.uid();
|
||||
var src = self.options.src[i];
|
||||
if(Ox.parseURL(src).protocol.substr(0, 4) == 'http') {
|
||||
src += '?' + Ox.uid();
|
||||
}
|
||||
$video[0].src = src;
|
||||
});
|
||||
}
|
||||
ret = that;
|
||||
|
|
Loading…
Reference in a new issue