mirror of
https://github.com/videojs/video.js.git
synced 2025-04-09 07:23:57 +02:00
Fixed bug of traversing video source/track child nodes by making nodeName comparison case-insensitive.
It caused the issue of flash-fallback not being able to discover the source of the video and embed it into flashvars.
This commit is contained in:
parent
5c2a3cbbf8
commit
4df3d84358
@ -60,7 +60,7 @@ _V_.Player = _V_.Component.extend({
|
||||
if (tag.hasChildNodes()) {
|
||||
var nrOfChildNodes = tag.childNodes.length;
|
||||
for (var i=0,j=tag.childNodes;i<nrOfChildNodes;i++) {
|
||||
if (j[0].nodeName == "SOURCE" || j[0].nodeName == "TRACK") {
|
||||
if (j[0].nodeName.toLowerCase() == "source" || j[0].nodeName.toLowerCase() == "track") {
|
||||
tag.removeChild(j[0]);
|
||||
}
|
||||
}
|
||||
@ -142,7 +142,7 @@ _V_.Player = _V_.Component.extend({
|
||||
if (this.tag.hasChildNodes()) {
|
||||
for (var c,i=0,j=this.tag.childNodes;i<j.length;i++) {
|
||||
c = j[i];
|
||||
if (c.nodeName == "SOURCE") {
|
||||
if (c.nodeName.toLowerCase() == "source") {
|
||||
options.sources.push({
|
||||
src: c.getAttribute('src'),
|
||||
type: c.getAttribute('type'),
|
||||
@ -150,7 +150,7 @@ _V_.Player = _V_.Component.extend({
|
||||
title: c.getAttribute('title')
|
||||
});
|
||||
}
|
||||
if (c.nodeName == "TRACK") {
|
||||
if (c.nodeName.toLowerCase() == "track") {
|
||||
options.tracks.push({
|
||||
src: c.getAttribute("src"),
|
||||
kind: c.getAttribute("kind"),
|
||||
|
Loading…
x
Reference in New Issue
Block a user