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) {
|
item.$videos = src.map(function(src, i) {
|
||||||
// in all browsers except firefox,
|
// in all browsers except firefox,
|
||||||
// loadedmetadata fires only once per src
|
// loadedmetadata fires only once per src
|
||||||
src += '?' + Ox.uid();
|
if(Ox.parseURL(src).protocol.substr(0, 4) == 'http') {
|
||||||
|
src += '?' + Ox.uid();
|
||||||
|
}
|
||||||
return $('<video>')
|
return $('<video>')
|
||||||
.css({position: 'absolute'})
|
.css({position: 'absolute'})
|
||||||
.bind({
|
.bind({
|
||||||
|
@ -433,12 +435,20 @@ Ox.VideoElement = function(options, self) {
|
||||||
self.$video[self.currentPart].src = self.options.src[self.currentPart];
|
self.$video[self.currentPart].src = self.options.src[self.currentPart];
|
||||||
self.$video.each(function(video, i) {
|
self.$video.each(function(video, i) {
|
||||||
if (i != self.currentPart) {
|
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 {
|
} else {
|
||||||
Ox.forEach(self.items[0].$videos, function($video, i) {
|
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;
|
ret = that;
|
||||||
|
|
Loading…
Reference in a new issue