dasha 3.0.2 → 3.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/dash.js +6 -10
- package/package.json +1 -1
package/lib/dash.js
CHANGED
|
@@ -56,16 +56,12 @@ const combineGetters = (representation, adaptationSet) => {
|
|
|
56
56
|
};
|
|
57
57
|
|
|
58
58
|
const parseBaseUrl = (manifestUrl, mpd, period, representation) => {
|
|
59
|
-
let
|
|
60
|
-
if (!
|
|
61
|
-
else if (!
|
|
62
|
-
|
|
63
|
-
const
|
|
64
|
-
|
|
65
|
-
representation.getBaseUrl() || '',
|
|
66
|
-
periodBaseUrl
|
|
67
|
-
).toString();
|
|
68
|
-
return representationBaseUrl;
|
|
59
|
+
let base = mpd.getBaseUrl();
|
|
60
|
+
if (!base) base = manifestUrl;
|
|
61
|
+
else if (!base.startsWith('https://')) base = new URL(base, manifestUrl).toString();
|
|
62
|
+
if (!!period.getBaseUrl() || !!base) base = new URL(period.getBaseUrl() || '', base).toString();
|
|
63
|
+
const baseUrl = new URL(representation.getBaseUrl() || '', base).toString();
|
|
64
|
+
return baseUrl;
|
|
69
65
|
};
|
|
70
66
|
|
|
71
67
|
const parseContentTypes = (representation) => {
|