forked from 0x2620/oxjs
rather use ''.slice than ''.substr
This commit is contained in:
parent
f990f3b857
commit
1608664bb6
20 changed files with 69 additions and 71 deletions
|
|
@ -89,7 +89,7 @@ Ox.VideoElement = function(options, self) {
|
|||
item.$videos = src.map(function(src, i) {
|
||||
// in all browsers except firefox,
|
||||
// loadedmetadata fires only once per src
|
||||
if(Ox.parseURL(src).protocol.substr(0, 4) == 'http') {
|
||||
if (Ox.startsWith(Ox.parseURL(src).protocol, 'http')) {
|
||||
src += '?' + Ox.uid();
|
||||
}
|
||||
return $('<video>')
|
||||
|
|
@ -434,7 +434,7 @@ Ox.VideoElement = function(options, self) {
|
|||
self.$video.each(function(video, i) {
|
||||
if (i != self.currentPart) {
|
||||
var src = self.options.src[i];
|
||||
if(Ox.parseURL(src).protocol.substr(0, 4) == 'http') {
|
||||
if (Ox.startsWith(Ox.parseURL(src).protocol, 'http')) {
|
||||
src += '?' + Ox.uid();
|
||||
}
|
||||
video.src = src;
|
||||
|
|
@ -443,7 +443,7 @@ Ox.VideoElement = function(options, self) {
|
|||
} else {
|
||||
self.items[0].$videos.forEach(function($video, i) {
|
||||
var src = self.options.src[i];
|
||||
if (Ox.parseURL(src).protocol.substr(0, 4) == 'http') {
|
||||
if (Ox.startsWith(Ox.parseURL(src).protocol, 'http')) {
|
||||
src += '?' + Ox.uid();
|
||||
}
|
||||
$video[0].src = src;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue