diff --git a/app/js/mss/MssParser.js b/app/js/mss/MssParser.js index b6ba20077..e830cab6f 100644 --- a/app/js/mss/MssParser.js +++ b/app/js/mss/MssParser.js @@ -167,7 +167,7 @@ Mss.dependencies.MssParser = function() { // Check if codec is supported if (SUPPORTED_CODECS.indexOf(fourCCValue.toUpperCase()) === -1) { // Do not send warning - //this.errHandler.sendWarning(MediaPlayer.dependencies.ErrorHandler.prototype.MEDIA_ERR_CODEC_UNSUPPORTED, "Codec/FourCC not supported", {codec: fourCCValue}); + this.errHandler.sendWarning(MediaPlayer.dependencies.ErrorHandler.prototype.MEDIA_ERR_CODEC_UNSUPPORTED, "Codec/FourCC not supported", {codec: fourCCValue}); this.debug.warn("[MssParser] Codec not supported: " + fourCCValue); return null; } @@ -386,13 +386,16 @@ Mss.dependencies.MssParser = function() { // Parse to get KID field value xmlReader = (new DOMParser()).parseFromString(wrmHeader, "application/xml"); - KID = xmlReader.querySelector("KID").textContent; + var kidNode = xmlReader.querySelector("KID"); + if (kidNode) { + KID = kidNode.textContent; - // Get KID (base64 decoded) as byte array - KID = BASE64.decodeArray(KID); + // Get KID (base64 decoded) as byte array + KID = BASE64.decodeArray(KID); - // Convert UUID from little-endian to big-endian - convertUuidEndianness(KID); + // Convert UUID from little-endian to big-endian + convertUuidEndianness(KID); + } return KID; }, @@ -717,4 +720,4 @@ Mss.dependencies.MssParser = function() { Mss.dependencies.MssParser.prototype = { constructor: Mss.dependencies.MssParser -}; \ No newline at end of file +};