diff --git a/src/dash/models/DashManifestModel.js b/src/dash/models/DashManifestModel.js index 161fef97fc..23b01dc485 100644 --- a/src/dash/models/DashManifestModel.js +++ b/src/dash/models/DashManifestModel.js @@ -892,8 +892,8 @@ function DashManifestModel() { let id = Period.DEFAULT_ID + '_' + i; - if (realPeriod.hasOwnProperty(DashConstants.ID) && realPeriod.id.length > 0 && realPeriod.id !== '__proto__') { - id = realPeriod.id; + if (realPeriod.hasOwnProperty(DashConstants.ID) && realPeriod.id.toString().length > 0 && realPeriod.id !== '__proto__') { + id = realPeriod.id.toString(); } return id; diff --git a/src/streaming/rules/abr/ThroughputRule.js b/src/streaming/rules/abr/ThroughputRule.js index 260280bccf..5964385bc5 100644 --- a/src/streaming/rules/abr/ThroughputRule.js +++ b/src/streaming/rules/abr/ThroughputRule.js @@ -72,7 +72,7 @@ function ThroughputRule(config) { switchRequest.reason = { throughput, latency, - message: `[ThroughputRule]: Switching to Representation with bitrate ${switchRequest.representation.bitrateInKbit} kbit/s. Throughput: ${throughput}` + message:`[ThroughputRule]: Switching to Representation with bitrate ${switchRequest.representation ? switchRequest.representation.bitrateInKbit : 'n/a'} kbit/s. Throughput: ${throughput}` }; scheduleController.setTimeToLoadDelay(0); }