From 77a4faa90d510412da8f76baadced6c40b2b5693 Mon Sep 17 00:00:00 2001 From: yflory Date: Thu, 7 Jan 2021 15:48:20 +0100 Subject: [PATCH] Fix Dom Exception with mediatags --- www/common/media-tag.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/www/common/media-tag.js b/www/common/media-tag.js index 4823e41c0..15b038724 100644 --- a/www/common/media-tag.js +++ b/www/common/media-tag.js @@ -423,7 +423,7 @@ var factory = function () { } catch (e) { return null; } }; - var fetchDecryptedMetadata = function (src, strKey, cb) { + var fetchDecryptedMetadata = function (src, key, cb) { if (typeof(src) !== 'string') { return window.setTimeout(function () { cb('NO_SOURCE'); @@ -431,7 +431,7 @@ var factory = function () { } fetchMetadata(src, function (e, buffer) { if (e) { return cb(e); } - var key = Decrypt.getKeyFromStr(strKey); + if (typeof(key) === "string") { key = Decrypt.getKeyFromStr(key); } cb(void 0, decryptMetadata(buffer, key)); }); };