Tweaks
This commit is contained in:
@ -1064,18 +1064,15 @@
|
|||||||
|
|
||||||
// Get URL of caption file if exists
|
// Get URL of caption file if exists
|
||||||
var captionSources = [],
|
var captionSources = [],
|
||||||
captionSrc = '',
|
captionSrc = '';
|
||||||
kind,
|
|
||||||
children = plyr.media.childNodes;
|
|
||||||
|
|
||||||
for (var i = 0; i < children.length; i++) {
|
plyr.media.childNodes.forEach(function(child) {
|
||||||
if (children[i].nodeName.toLowerCase() === 'track') {
|
if (child.nodeName.toLowerCase() === 'track') {
|
||||||
kind = children[i].kind;
|
if (child.kind === 'captions' || child.kind === 'subtitles') {
|
||||||
if (kind === 'captions' || kind === 'subtitles') {
|
captionSources.push(child.getAttribute('src'));
|
||||||
captionSources.push(children[i].getAttribute('src'));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
|
||||||
// Record if caption file exists or not
|
// Record if caption file exists or not
|
||||||
plyr.captionExists = true;
|
plyr.captionExists = true;
|
||||||
|
Reference in New Issue
Block a user