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