Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mpd-parser

Package Overview
Dependencies
Maintainers
15
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mpd-parser - npm Package Compare versions

Comparing version 0.15.1 to 0.15.2

7

CHANGELOG.md

@@ -0,1 +1,8 @@

<a name="0.15.2"></a>
## [0.15.2](https://github.com/videojs/mpd-parser/compare/v0.15.1...v0.15.2) (2021-01-12)
### Bug Fixes
* cjs dist should only import cjs ([#118](https://github.com/videojs/mpd-parser/issues/118)) ([0529e62](https://github.com/videojs/mpd-parser/commit/0529e62))
<a name="0.15.1"></a>

@@ -2,0 +9,0 @@ ## [0.15.1](https://github.com/videojs/mpd-parser/compare/v0.15.0...v0.15.1) (2021-01-11)

28

dist/mpd-parser.cjs.js

@@ -1,2 +0,2 @@

/*! @name mpd-parser @version 0.15.1 @license Apache-2.0 */
/*! @name mpd-parser @version 0.15.2 @license Apache-2.0 */
'use strict';

@@ -6,11 +6,15 @@

function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
var resolveUrl = _interopDefault(require('@videojs/vhs-utils/es/resolve-url'));
var window = _interopDefault(require('global/window'));
var decodeB64ToUint8Array = _interopDefault(require('@videojs/vhs-utils/es/decode-b64-to-uint8-array'));
var resolveUrl = require('@videojs/vhs-utils/cjs/resolve-url');
var window = require('global/window');
var decodeB64ToUint8Array = require('@videojs/vhs-utils/cjs/decode-b64-to-uint8-array');
var xmldom = require('xmldom');
var version = "0.15.1";
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
var resolveUrl__default = /*#__PURE__*/_interopDefaultLegacy(resolveUrl);
var window__default = /*#__PURE__*/_interopDefaultLegacy(window);
var decodeB64ToUint8Array__default = /*#__PURE__*/_interopDefaultLegacy(decodeB64ToUint8Array);
var version = "0.15.2";
var isObject = function isObject(obj) {

@@ -132,3 +136,3 @@ return !!obj && typeof obj === 'object';

uri: source,
resolvedUri: resolveUrl(baseUrl || '', source)
resolvedUri: resolveUrl__default['default'](baseUrl || '', source)
};

@@ -1013,3 +1017,3 @@

duration: segment.duration,
resolvedUri: resolveUrl(attributes.baseUrl || '', uri),
resolvedUri: resolveUrl__default['default'](attributes.baseUrl || '', uri),
map: mapSegment,

@@ -1483,3 +1487,3 @@ number: segment.number

return baseUrlElements.map(function (baseUrlElement) {
return resolveUrl(reference, getContent(baseUrlElement));
return resolveUrl__default['default'](reference, getContent(baseUrlElement));
});

@@ -1637,3 +1641,3 @@ }));

var pssh = getContent(psshNode);
var psshBuffer = pssh && decodeB64ToUint8Array(pssh);
var psshBuffer = pssh && decodeB64ToUint8Array__default['default'](pssh);
acc[keySystem].pssh = psshBuffer;

@@ -1727,3 +1731,3 @@ }

var periodIndex = window.isNaN(parsedPeriodId) ? index : parsedPeriodId;
var periodIndex = window__default['default'].isNaN(parsedPeriodId) ? index : parsedPeriodId;
var periodAttributes = merge(mpdAttributes, {

@@ -1730,0 +1734,0 @@ periodIndex: periodIndex

@@ -1,2 +0,2 @@

/*! @name mpd-parser @version 0.15.1 @license Apache-2.0 */
/*! @name mpd-parser @version 0.15.2 @license Apache-2.0 */
import resolveUrl from '@videojs/vhs-utils/es/resolve-url';

@@ -7,3 +7,3 @@ import window from 'global/window';

var version = "0.15.1";
var version = "0.15.2";

@@ -10,0 +10,0 @@ var isObject = function isObject(obj) {

@@ -1,2 +0,2 @@

/*! @name mpd-parser @version 0.15.1 @license Apache-2.0 */
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("global/window"),require("xmldom")):"function"==typeof define&&define.amd?define(["exports","global/window","xmldom"],e):e((t=t||self).mpdParser={},t.window,t.window)}(this,(function(t,e,r){"use strict";e=e&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e;var n=function(t){return!!t&&"object"==typeof t},i=function t(){for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];return r.reduce((function(e,r){return"object"!=typeof r||Object.keys(r).forEach((function(i){Array.isArray(e[i])&&Array.isArray(r[i])?e[i]=e[i].concat(r[i]):n(e[i])&&n(r[i])?e[i]=t(e[i],r[i]):e[i]=r[i]})),e}),{})},a=function(t){return t.reduce((function(t,e){return t.concat(e)}),[])},o=function(t){if(!t.length)return[];for(var e=[],r=0;r<t.length;r++)e.push(t[r]);return e},u="INVALID_NUMBER_OF_PERIOD",s="DASH_EMPTY_MANIFEST",c="DASH_INVALID_XML",d="NO_BASE_URL",l="SEGMENT_TIME_UNSPECIFIED",m="UNSUPPORTED_UTC_TIMING_SCHEME";var f=function(t,e){return t(e={exports:{}},e.exports),e.exports}((function(t,e){var r,n,i,a,o;r=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/?#]*\/)*[^;?#]*)?(;[^?#]*)?(\?[^#]*)?(#.*)?$/,n=/^([^\/?#]*)(.*)$/,i=/(?:\/|^)\.(?=\/)/g,a=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,o={buildAbsoluteURL:function(t,e,r){if(r=r||{},t=t.trim(),!(e=e.trim())){if(!r.alwaysNormalize)return t;var i=o.parseURL(t);if(!i)throw new Error("Error trying to parse base URL.");return i.path=o.normalizePath(i.path),o.buildURLFromParts(i)}var a=o.parseURL(e);if(!a)throw new Error("Error trying to parse relative URL.");if(a.scheme)return r.alwaysNormalize?(a.path=o.normalizePath(a.path),o.buildURLFromParts(a)):e;var u=o.parseURL(t);if(!u)throw new Error("Error trying to parse base URL.");if(!u.netLoc&&u.path&&"/"!==u.path[0]){var s=n.exec(u.path);u.netLoc=s[1],u.path=s[2]}u.netLoc&&!u.path&&(u.path="/");var c={scheme:u.scheme,netLoc:a.netLoc,path:null,params:a.params,query:a.query,fragment:a.fragment};if(!a.netLoc&&(c.netLoc=u.netLoc,"/"!==a.path[0]))if(a.path){var d=u.path,l=d.substring(0,d.lastIndexOf("/")+1)+a.path;c.path=o.normalizePath(l)}else c.path=u.path,a.params||(c.params=u.params,a.query||(c.query=u.query));return null===c.path&&(c.path=r.alwaysNormalize?o.normalizePath(a.path):a.path),o.buildURLFromParts(c)},parseURL:function(t){var e=r.exec(t);return e?{scheme:e[1]||"",netLoc:e[2]||"",path:e[3]||"",params:e[4]||"",query:e[5]||"",fragment:e[6]||""}:null},normalizePath:function(t){for(t=t.split("").reverse().join("").replace(i,"");t.length!==(t=t.replace(a,"")).length;);return t.split("").reverse().join("")},buildURLFromParts:function(t){return t.scheme+t.netLoc+t.path+t.params+t.query+t.fragment}},t.exports=o})),p=function(t,r){return/^[a-z]+:/i.test(r)?r:(/\/\//i.test(t)||(t=f.buildAbsoluteURL(e.location&&e.location.href||"",t)),f.buildAbsoluteURL(t,r))},v=function(t){var e=t.baseUrl,r=void 0===e?"":e,n=t.source,i=void 0===n?"":n,a=t.range,o=void 0===a?"":a,u=t.indexRange,s=void 0===u?"":u,c={uri:i,resolvedUri:p(r||"",i)};if(o||s){var d=(o||s).split("-"),l=parseInt(d[0],10),m=parseInt(d[1],10);c.byterange={length:m-l+1,offset:l}}return c},h={static:function(t){var e=t.duration,r=t.timescale,n=void 0===r?1:r,i=t.sourceDuration;return{start:0,end:Math.ceil(i/(e/n))}},dynamic:function(t){var e=t.NOW,r=t.clientOffset,n=t.availabilityStartTime,i=t.timescale,a=void 0===i?1:i,o=t.duration,u=t.start,s=void 0===u?0:u,c=t.minimumUpdatePeriod,d=void 0===c?0:c,l=t.timeShiftBufferDepth,m=void 0===l?1/0:l,f=(e+r)/1e3,p=n+s,v=f+d-p,h=Math.ceil(v*a/o),g=Math.floor((f-p-m)*a/o),b=Math.floor((f-p)*a/o);return{start:Math.max(0,g),end:Math.min(h,b)}}},g=function(t){var e=t.type,r=void 0===e?"static":e,n=t.duration,i=t.timescale,a=void 0===i?1:i,o=t.sourceDuration,u=h[r](t),s=function(t,e){for(var r=[],n=t;n<e;n++)r.push(n);return r}(u.start,u.end).map(function(t){return function(e,r){var n=t.duration,i=t.timescale,a=void 0===i?1:i,o=t.periodIndex,u=t.startNumber;return{number:(void 0===u?1:u)+e,duration:n/a,timeline:o,time:r*n}}}(t));if("static"===r){var c=s.length-1;s[c].duration=o-n/a*c}return s},b=function(t){var e=t.baseUrl,r=t.initialization,n=void 0===r?{}:r,i=t.sourceDuration,a=t.indexRange,o=void 0===a?"":a,u=t.duration;if(!e)throw new Error(d);var s=v({baseUrl:e,source:n.sourceURL,range:n.range}),c=v({baseUrl:e,source:e,indexRange:o});if(c.map=s,u){var l=g(t);l.length&&(c.duration=l[0].duration,c.timeline=l[0].timeline)}else i&&(c.duration=i,c.timeline=0);return c.number=0,[c]},y=function(t,e,r){for(var n=t.sidx.map?t.sidx.map:null,i=t.sidx.duration,a=t.timeline||0,o=t.sidx.byterange,u=o.offset+o.length,s=e.timescale,c=e.references.filter((function(t){return 1!==t.referenceType})),d=[],l=u+e.firstOffset,m=0;m<c.length;m++){var f=e.references[m],p=f.referencedSize,v=f.subsegmentDuration,h=b({baseUrl:r,timescale:s,timeline:a,periodIndex:a,duration:v,sourceDuration:i,indexRange:l+"-"+(l+p-1)})[0];n&&(h.map=n),d.push(h),l+=p}return t.segments=d,t},U=function(t){var e;return(e=t.reduce((function(t,e){var r,n=e.attributes.id+(e.attributes.lang||"");return t[n]?(e.segments[0]&&(e.segments[0].discontinuity=!0),(r=t[n].segments).push.apply(r,e.segments),e.attributes.contentProtection&&(t[n].attributes.contentProtection=e.attributes.contentProtection)):t[n]=e,t}),{}),Object.keys(e).map((function(t){return e[t]}))).map((function(t){var e,r;return t.discontinuityStarts=(e=t.segments,r="discontinuity",e.reduce((function(t,e,n){return e[r]&&t.push(n),t}),[])),t}))},I=function(t,e){if(void 0===e&&(e={}),!Object.keys(e).length)return t;for(var r in t){var n=t[r];if(n.sidx){var i=n.sidx.uri+"-"+(o=n.sidx.byterange,u=void 0,u=o.offset+o.length-1,o.offset+"-"+u),a=e[i]&&e[i].sidx;n.sidx&&a&&y(n,a,n.sidx.resolvedUri)}}var o,u;return t},D=function(t){var e,r=t.attributes,n=t.segments,i=t.sidx,a={attributes:(e={NAME:r.id,BANDWIDTH:r.bandwidth,CODECS:r.codecs},e["PROGRAM-ID"]=1,e),uri:"",endList:"static"===(r.type||"static"),timeline:r.periodIndex,resolvedUri:"",targetDuration:r.duration,segments:n,mediaSequence:n.length?n[0].number:1};return r.contentProtection&&(a.contentProtection=r.contentProtection),i&&(a.sidx=i),a},x=function(t){var e,r=t.attributes,n=t.segments;void 0===n&&(n=[{uri:r.baseUrl,timeline:r.periodIndex,resolvedUri:r.baseUrl||"",duration:r.sourceDuration,number:0}],r.duration=r.sourceDuration);var i=((e={NAME:r.id,BANDWIDTH:r.bandwidth})["PROGRAM-ID"]=1,e);return r.codecs&&(i.CODECS=r.codecs),{attributes:i,uri:"",endList:"static"===(r.type||"static"),timeline:r.periodIndex,resolvedUri:r.baseUrl||"",targetDuration:r.duration,segments:n,mediaSequence:n.length?n[0].number:1}},L=function(t){var e,r=t.attributes,n=t.segments,i=t.sidx,a={attributes:(e={NAME:r.id,AUDIO:"audio",SUBTITLES:"subs",RESOLUTION:{width:r.width,height:r.height},CODECS:r.codecs,BANDWIDTH:r.bandwidth},e["PROGRAM-ID"]=1,e),uri:"",endList:"static"===(r.type||"static"),timeline:r.periodIndex,resolvedUri:"",targetDuration:r.duration,segments:n,mediaSequence:n.length?n[0].number:1};return r.contentProtection&&(a.contentProtection=r.contentProtection),i&&(a.sidx=i),a},w=function(t,e,r){var n;if(void 0===r&&(r={}),!t.length)return{};var i=t[0].attributes,a=i.sourceDuration,o=i.type,u=void 0===o?"static":o,s=i.suggestedPresentationDelay,c=i.minimumUpdatePeriod,d=U(t.filter((function(t){var e=t.attributes;return"video/mp4"===e.mimeType||"video/webm"===e.mimeType||"video"===e.contentType}))).map(L),l=U(t.filter((function(t){var e=t.attributes;return"audio/mp4"===e.mimeType||"audio/webm"===e.mimeType||"audio"===e.contentType}))),m=t.filter((function(t){var e=t.attributes;return"text/vtt"===e.mimeType||"text"===e.contentType})),f={allowCache:!0,discontinuityStarts:[],segments:[],endList:!0,mediaGroups:(n={AUDIO:{},VIDEO:{}},n["CLOSED-CAPTIONS"]={},n.SUBTITLES={},n),uri:"",duration:a,playlists:I(d,r)};return c>=0&&(f.minimumUpdatePeriod=1e3*c),e&&(f.locations=e),"dynamic"===u&&(f.suggestedPresentationDelay=s),l.length&&(f.mediaGroups.AUDIO.audio=function(t,e){var r;void 0===e&&(e={});var n=t.reduce((function(t,n){var i=n.attributes.role&&n.attributes.role.value||"",a=n.attributes.lang||"",o="main";if(a){var u=i?" ("+i+")":"";o=""+n.attributes.lang+u}return t[o]&&t[o].playlists[0].attributes.BANDWIDTH>n.attributes.bandwidth||(t[o]={language:a,autoselect:!0,default:"main"===i,playlists:I([D(n)],e),uri:""},void 0===r&&"main"===i&&((r=n).default=!0)),t}),{});r||(n[Object.keys(n)[0]].default=!0);return n}(l,r)),m.length&&(f.mediaGroups.SUBTITLES.subs=function(t,e){return void 0===e&&(e={}),t.reduce((function(t,r){var n=r.attributes.lang||"text";return t[n]||(t[n]={language:n,default:!1,autoselect:!1,playlists:I([x(r)],e),uri:""}),t}),{})}(m,r)),f},P=function(t,e,r){var n=t.NOW,i=t.clientOffset,a=t.availabilityStartTime,o=t.timescale,u=void 0===o?1:o,s=t.start,c=void 0===s?0:s,d=t.minimumUpdatePeriod,l=(n+i)/1e3+(void 0===d?0:d)-(a+c);return Math.ceil((l*u-e)/r)},E=function(t,e){for(var r=t.type,n=void 0===r?"static":r,i=t.minimumUpdatePeriod,a=void 0===i?0:i,o=t.media,u=void 0===o?"":o,s=t.sourceDuration,c=t.timescale,d=void 0===c?1:c,l=t.startNumber,m=void 0===l?1:l,f=t.periodIndex,p=[],v=-1,h=0;h<e.length;h++){var g=e[h],b=g.d,y=g.r||0,U=g.t||0;v<0&&(v=U),U&&U>v&&(v=U);var I=void 0;if(y<0){var D=h+1;I=D===e.length?"dynamic"===n&&a>0&&u.indexOf("$Number$")>0?P(t,v,b):(s*d-v)/b:(e[D].t-v)/b}else I=y+1;for(var x=m+p.length+I,L=m+p.length;L<x;)p.push({number:L,duration:b/d,time:v,timeline:f}),v+=b,L++}return p},R=/\$([A-z]*)(?:(%0)([0-9]+)d)?\$/g,T=function(t,e){return t.replace(R,function(t){return function(e,r,n,i){if("$$"===e)return"$";if(void 0===t[r])return e;var a=""+t[r];return"RepresentationID"===r?a:(i=n?parseInt(i,10):1,a.length>=i?a:""+new Array(i-a.length+1).join("0")+a)}}(e))},S=function(t,e){var r={RepresentationID:t.id,Bandwidth:t.bandwidth||0},n=t.initialization,i=void 0===n?{sourceURL:"",range:""}:n,a=v({baseUrl:t.baseUrl,source:T(i.sourceURL,r),range:i.range});return function(t,e){return t.duration||e?t.duration?g(t):E(t,e):[{number:t.startNumber||1,duration:t.sourceDuration,time:0,timeline:t.periodIndex}]}(t,e).map((function(e){r.Number=e.number,r.Time=e.time;var n=T(t.media||"",r);return{uri:n,timeline:e.timeline,duration:e.duration,resolvedUri:p(t.baseUrl||"",n),map:a,number:e.number}}))},N=function(t,e){var r=t.duration,n=t.segmentUrls,i=void 0===n?[]:n;if(!r&&!e||r&&e)throw new Error(l);var a,o=i.map((function(e){return function(t,e){var r=t.baseUrl,n=t.initialization,i=void 0===n?{}:n,a=v({baseUrl:r,source:i.sourceURL,range:i.range}),o=v({baseUrl:r,source:e.media,range:e.mediaRange});return o.map=a,o}(t,e)}));return r&&(a=g(t)),e&&(a=E(t,e)),a.map((function(t,e){if(o[e]){var r=o[e];return r.timeline=t.timeline,r.duration=t.duration,r.number=t.number,r}})).filter((function(t){return t}))},O=function(t){var e,r,n=t.attributes,a=t.segmentInfo;a.template?(r=S,e=i(n,a.template)):a.base?(r=b,e=i(n,a.base)):a.list&&(r=N,e=i(n,a.list));var o={attributes:n};if(!r)return o;var u=r(e,a.timeline);if(e.duration){var s=e,c=s.duration,d=s.timescale,l=void 0===d?1:d;e.duration=c/l}else u.length?e.duration=u.reduce((function(t,e){return Math.max(t,Math.ceil(e.duration))}),0):e.duration=0;return o.attributes=e,o.segments=u,a.base&&e.indexRange&&(o.sidx=u[0],o.segments=[]),o},A=function(t){return t.map(O)},M=function(t,e){return o(t.childNodes).filter((function(t){return t.tagName===e}))},z=function(t){return t.textContent.trim()},B=function(t){var e=/P(?:(\d*)Y)?(?:(\d*)M)?(?:(\d*)D)?(?:T(?:(\d*)H)?(?:(\d*)M)?(?:([\d.]*)S)?)?/.exec(t);if(!e)return 0;var r=e.slice(1),n=r[0],i=r[1],a=r[2],o=r[3],u=r[4],s=r[5];return 31536e3*parseFloat(n||0)+2592e3*parseFloat(i||0)+86400*parseFloat(a||0)+3600*parseFloat(o||0)+60*parseFloat(u||0)+parseFloat(s||0)},C={mediaPresentationDuration:function(t){return B(t)},availabilityStartTime:function(t){return/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(e=t)&&(e+="Z"),Date.parse(e)/1e3;var e},minimumUpdatePeriod:function(t){return B(t)},suggestedPresentationDelay:function(t){return B(t)},type:function(t){return t},timeShiftBufferDepth:function(t){return B(t)},start:function(t){return B(t)},width:function(t){return parseInt(t,10)},height:function(t){return parseInt(t,10)},bandwidth:function(t){return parseInt(t,10)},startNumber:function(t){return parseInt(t,10)},timescale:function(t){return parseInt(t,10)},duration:function(t){var e=parseInt(t,10);return isNaN(e)?B(t):e},d:function(t){return parseInt(t,10)},t:function(t){return parseInt(t,10)},r:function(t){return parseInt(t,10)},DEFAULT:function(t){return t}},F=function(t){return t&&t.attributes?o(t.attributes).reduce((function(t,e){var r=C[e.name]||C.DEFAULT;return t[e.name]=r(e.value),t}),{}):{}};function _(t){for(var r,n=(r=t,e.atob?e.atob(r):Buffer.from(r,"base64").toString("binary")),i=new Uint8Array(n.length),a=0;a<n.length;a++)i[a]=n.charCodeAt(a);return i}var j={"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb":"com.adobe.primetime"},q=function(t,e){return e.length?a(t.map((function(t){return e.map((function(e){return p(t,z(e))}))}))):t},k=function(t){var e=M(t,"SegmentTemplate")[0],r=M(t,"SegmentList")[0],n=r&&M(r,"SegmentURL").map((function(t){return i({tag:"SegmentURL"},F(t))})),a=M(t,"SegmentBase")[0],o=r||e,u=o&&M(o,"SegmentTimeline")[0],s=r||a||e,c=s&&M(s,"Initialization")[0],d=e&&F(e);d&&c?d.initialization=c&&F(c):d&&d.initialization&&(d.initialization={sourceURL:d.initialization});var l={template:d,timeline:u&&M(u,"S").map((function(t){return F(t)})),list:r&&i(F(r),{segmentUrls:n,initialization:F(c)}),base:a&&i(F(a),{initialization:F(c)})};return Object.keys(l).forEach((function(t){l[t]||delete l[t]})),l},$=function(t,e,r){return function(n){var o=F(n),u=q(e,M(n,"BaseURL")),s=M(n,"Role")[0],c={role:F(s)},d=i(t,o,c),l=M(n,"ContentProtection").reduce((function(t,e){var r=F(e),n=j[r.schemeIdUri];if(n){t[n]={attributes:r};var i=M(e,"cenc:pssh")[0];if(i){var a=z(i),o=a&&_(a);t[n].pssh=o}}return t}),{});Object.keys(l).length&&(d=i(d,{contentProtection:l}));var m=k(n),f=M(n,"Representation"),p=i(r,m);return a(f.map(function(t,e,r){return function(n){var a=M(n,"BaseURL"),o=q(e,a),u=i(t,F(n)),s=k(n);return o.map((function(t){return{segmentInfo:i(r,s),attributes:i(u,{baseUrl:t})}}))}}(d,u,p)))}},G=function(t,r){return function(n,o){var u=q(r,M(n,"BaseURL")),s=F(n),c=parseInt(s.id,10),d=e.isNaN(c)?o:c,l=i(t,{periodIndex:d}),m=M(n,"AdaptationSet"),f=k(n);return a(m.map($(l,u,f)))}},H=function(t,e){void 0===e&&(e={});var r=e,n=r.manifestUri,i=void 0===n?"":n,o=r.NOW,s=void 0===o?Date.now():o,c=r.clientOffset,d=void 0===c?0:c,l=M(t,"Period");if(!l.length)throw new Error(u);var m=M(t,"Location"),f=F(t),p=q([i],M(t,"BaseURL"));return f.sourceDuration=f.mediaPresentationDuration||0,f.NOW=s,f.clientOffset=d,m.length&&(f.locations=m.map(z)),{locations:f.locations,representationInfo:a(l.map(G(f,p)))}},W=function(t){if(""===t)throw new Error(s);var e,n,i=new r.DOMParser;try{n=(e=i.parseFromString(t,"application/xml"))&&"MPD"===e.documentElement.tagName?e.documentElement:null}catch(t){}if(!n||n&&n.getElementsByTagName("parsererror").length>0)throw new Error(c);return n},V=y;t.VERSION="0.15.1",t.addSidxSegmentsToPlaylist=V,t.inheritAttributes=H,t.parse=function(t,e){void 0===e&&(e={});var r=H(W(t),e),n=A(r.representationInfo);return w(n,r.locations,e.sidxMapping)},t.parseUTCTiming=function(t){return function(t){var e=M(t,"UTCTiming")[0];if(!e)return null;var r=F(e);switch(r.schemeIdUri){case"urn:mpeg:dash:utc:http-head:2014":case"urn:mpeg:dash:utc:http-head:2012":r.method="HEAD";break;case"urn:mpeg:dash:utc:http-xsdate:2014":case"urn:mpeg:dash:utc:http-iso:2014":case"urn:mpeg:dash:utc:http-xsdate:2012":case"urn:mpeg:dash:utc:http-iso:2012":r.method="GET";break;case"urn:mpeg:dash:utc:direct:2014":case"urn:mpeg:dash:utc:direct:2012":r.method="DIRECT",r.value=Date.parse(r.value);break;case"urn:mpeg:dash:utc:http-ntp:2014":case"urn:mpeg:dash:utc:ntp:2014":case"urn:mpeg:dash:utc:sntp:2014":default:throw new Error(m)}return r}(W(t))},t.stringToMpdXml=W,t.toM3u8=w,t.toPlaylists=A,Object.defineProperty(t,"__esModule",{value:!0})}));
/*! @name mpd-parser @version 0.15.2 @license Apache-2.0 */
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("global/window"),require("xmldom")):"function"==typeof define&&define.amd?define(["exports","global/window","xmldom"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).mpdParser={},t.window,t.window)}(this,(function(t,e,r){"use strict";function n(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var i=n(e),a=function(t){return!!t&&"object"==typeof t},o=function t(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return r.reduce((function(e,r){return"object"!=typeof r||Object.keys(r).forEach((function(n){Array.isArray(e[n])&&Array.isArray(r[n])?e[n]=e[n].concat(r[n]):a(e[n])&&a(r[n])?e[n]=t(e[n],r[n]):e[n]=r[n]})),e}),{})},u=function(t){return t.reduce((function(t,e){return t.concat(e)}),[])},s=function(t){if(!t.length)return[];for(var e=[],r=0;r<t.length;r++)e.push(t[r]);return e},c="INVALID_NUMBER_OF_PERIOD",d="DASH_EMPTY_MANIFEST",l="DASH_INVALID_XML",m="NO_BASE_URL",f="SEGMENT_TIME_UNSPECIFIED",p="UNSUPPORTED_UTC_TIMING_SCHEME";var h=function(t,e,r){return t(r={path:e,exports:{},require:function(t,e){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==e&&r.path)}},r.exports),r.exports}((function(t,e){var r,n,i,a,o;r=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/?#]*\/)*[^;?#]*)?(;[^?#]*)?(\?[^#]*)?(#.*)?$/,n=/^([^\/?#]*)(.*)$/,i=/(?:\/|^)\.(?=\/)/g,a=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,o={buildAbsoluteURL:function(t,e,r){if(r=r||{},t=t.trim(),!(e=e.trim())){if(!r.alwaysNormalize)return t;var i=o.parseURL(t);if(!i)throw new Error("Error trying to parse base URL.");return i.path=o.normalizePath(i.path),o.buildURLFromParts(i)}var a=o.parseURL(e);if(!a)throw new Error("Error trying to parse relative URL.");if(a.scheme)return r.alwaysNormalize?(a.path=o.normalizePath(a.path),o.buildURLFromParts(a)):e;var u=o.parseURL(t);if(!u)throw new Error("Error trying to parse base URL.");if(!u.netLoc&&u.path&&"/"!==u.path[0]){var s=n.exec(u.path);u.netLoc=s[1],u.path=s[2]}u.netLoc&&!u.path&&(u.path="/");var c={scheme:u.scheme,netLoc:a.netLoc,path:null,params:a.params,query:a.query,fragment:a.fragment};if(!a.netLoc&&(c.netLoc=u.netLoc,"/"!==a.path[0]))if(a.path){var d=u.path,l=d.substring(0,d.lastIndexOf("/")+1)+a.path;c.path=o.normalizePath(l)}else c.path=u.path,a.params||(c.params=u.params,a.query||(c.query=u.query));return null===c.path&&(c.path=r.alwaysNormalize?o.normalizePath(a.path):a.path),o.buildURLFromParts(c)},parseURL:function(t){var e=r.exec(t);return e?{scheme:e[1]||"",netLoc:e[2]||"",path:e[3]||"",params:e[4]||"",query:e[5]||"",fragment:e[6]||""}:null},normalizePath:function(t){for(t=t.split("").reverse().join("").replace(i,"");t.length!==(t=t.replace(a,"")).length;);return t.split("").reverse().join("")},buildURLFromParts:function(t){return t.scheme+t.netLoc+t.path+t.params+t.query+t.fragment}},t.exports=o})),v=function(t,e){return/^[a-z]+:/i.test(e)?e:(/\/\//i.test(t)||(t=h.buildAbsoluteURL(i.default.location&&i.default.location.href||"",t)),h.buildAbsoluteURL(t,e))},g=function(t){var e=t.baseUrl,r=void 0===e?"":e,n=t.source,i=void 0===n?"":n,a=t.range,o=void 0===a?"":a,u=t.indexRange,s=void 0===u?"":u,c={uri:i,resolvedUri:v(r||"",i)};if(o||s){var d=(o||s).split("-"),l=parseInt(d[0],10),m=parseInt(d[1],10);c.byterange={length:m-l+1,offset:l}}return c},b={static:function(t){var e=t.duration,r=t.timescale,n=void 0===r?1:r,i=t.sourceDuration;return{start:0,end:Math.ceil(i/(e/n))}},dynamic:function(t){var e=t.NOW,r=t.clientOffset,n=t.availabilityStartTime,i=t.timescale,a=void 0===i?1:i,o=t.duration,u=t.start,s=void 0===u?0:u,c=t.minimumUpdatePeriod,d=void 0===c?0:c,l=t.timeShiftBufferDepth,m=void 0===l?1/0:l,f=(e+r)/1e3,p=n+s,h=f+d-p,v=Math.ceil(h*a/o),g=Math.floor((f-p-m)*a/o),b=Math.floor((f-p)*a/o);return{start:Math.max(0,g),end:Math.min(v,b)}}},y=function(t){var e=t.type,r=void 0===e?"static":e,n=t.duration,i=t.timescale,a=void 0===i?1:i,o=t.sourceDuration,u=b[r](t),s=function(t,e){for(var r=[],n=t;n<e;n++)r.push(n);return r}(u.start,u.end).map(function(t){return function(e,r){var n=t.duration,i=t.timescale,a=void 0===i?1:i,o=t.periodIndex,u=t.startNumber;return{number:(void 0===u?1:u)+e,duration:n/a,timeline:o,time:r*n}}}(t));if("static"===r){var c=s.length-1;s[c].duration=o-n/a*c}return s},U=function(t){var e=t.baseUrl,r=t.initialization,n=void 0===r?{}:r,i=t.sourceDuration,a=t.indexRange,o=void 0===a?"":a,u=t.duration;if(!e)throw new Error(m);var s=g({baseUrl:e,source:n.sourceURL,range:n.range}),c=g({baseUrl:e,source:e,indexRange:o});if(c.map=s,u){var d=y(t);d.length&&(c.duration=d[0].duration,c.timeline=d[0].timeline)}else i&&(c.duration=i,c.timeline=0);return c.number=0,[c]},I=function(t,e,r){for(var n=t.sidx.map?t.sidx.map:null,i=t.sidx.duration,a=t.timeline||0,o=t.sidx.byterange,u=o.offset+o.length,s=e.timescale,c=e.references.filter((function(t){return 1!==t.referenceType})),d=[],l=u+e.firstOffset,m=0;m<c.length;m++){var f=e.references[m],p=f.referencedSize,h=f.subsegmentDuration,v=U({baseUrl:r,timescale:s,timeline:a,periodIndex:a,duration:h,sourceDuration:i,indexRange:l+"-"+(l+p-1)})[0];n&&(v.map=n),d.push(v),l+=p}return t.segments=d,t},D=function(t){var e;return(e=t.reduce((function(t,e){var r,n=e.attributes.id+(e.attributes.lang||"");return t[n]?(e.segments[0]&&(e.segments[0].discontinuity=!0),(r=t[n].segments).push.apply(r,e.segments),e.attributes.contentProtection&&(t[n].attributes.contentProtection=e.attributes.contentProtection)):t[n]=e,t}),{}),Object.keys(e).map((function(t){return e[t]}))).map((function(t){var e,r;return t.discontinuityStarts=(e=t.segments,r="discontinuity",e.reduce((function(t,e,n){return e[r]&&t.push(n),t}),[])),t}))},x=function(t,e){if(void 0===e&&(e={}),!Object.keys(e).length)return t;for(var r in t){var n=t[r];if(n.sidx){var i=n.sidx.uri+"-"+(o=n.sidx.byterange,u=void 0,u=o.offset+o.length-1,o.offset+"-"+u),a=e[i]&&e[i].sidx;n.sidx&&a&&I(n,a,n.sidx.resolvedUri)}}var o,u;return t},w=function(t){var e,r=t.attributes,n=t.segments,i=t.sidx,a={attributes:(e={NAME:r.id,BANDWIDTH:r.bandwidth,CODECS:r.codecs},e["PROGRAM-ID"]=1,e),uri:"",endList:"static"===(r.type||"static"),timeline:r.periodIndex,resolvedUri:"",targetDuration:r.duration,segments:n,mediaSequence:n.length?n[0].number:1};return r.contentProtection&&(a.contentProtection=r.contentProtection),i&&(a.sidx=i),a},L=function(t){var e,r=t.attributes,n=t.segments;void 0===n&&(n=[{uri:r.baseUrl,timeline:r.periodIndex,resolvedUri:r.baseUrl||"",duration:r.sourceDuration,number:0}],r.duration=r.sourceDuration);var i=((e={NAME:r.id,BANDWIDTH:r.bandwidth})["PROGRAM-ID"]=1,e);return r.codecs&&(i.CODECS=r.codecs),{attributes:i,uri:"",endList:"static"===(r.type||"static"),timeline:r.periodIndex,resolvedUri:r.baseUrl||"",targetDuration:r.duration,segments:n,mediaSequence:n.length?n[0].number:1}},E=function(t){var e,r=t.attributes,n=t.segments,i=t.sidx,a={attributes:(e={NAME:r.id,AUDIO:"audio",SUBTITLES:"subs",RESOLUTION:{width:r.width,height:r.height},CODECS:r.codecs,BANDWIDTH:r.bandwidth},e["PROGRAM-ID"]=1,e),uri:"",endList:"static"===(r.type||"static"),timeline:r.periodIndex,resolvedUri:"",targetDuration:r.duration,segments:n,mediaSequence:n.length?n[0].number:1};return r.contentProtection&&(a.contentProtection=r.contentProtection),i&&(a.sidx=i),a},T=function(t,e,r){var n;if(void 0===r&&(r={}),!t.length)return{};var i=t[0].attributes,a=i.sourceDuration,o=i.type,u=void 0===o?"static":o,s=i.suggestedPresentationDelay,c=i.minimumUpdatePeriod,d=D(t.filter((function(t){var e=t.attributes;return"video/mp4"===e.mimeType||"video/webm"===e.mimeType||"video"===e.contentType}))).map(E),l=D(t.filter((function(t){var e=t.attributes;return"audio/mp4"===e.mimeType||"audio/webm"===e.mimeType||"audio"===e.contentType}))),m=t.filter((function(t){var e=t.attributes;return"text/vtt"===e.mimeType||"text"===e.contentType})),f={allowCache:!0,discontinuityStarts:[],segments:[],endList:!0,mediaGroups:(n={AUDIO:{},VIDEO:{}},n["CLOSED-CAPTIONS"]={},n.SUBTITLES={},n),uri:"",duration:a,playlists:x(d,r)};return c>=0&&(f.minimumUpdatePeriod=1e3*c),e&&(f.locations=e),"dynamic"===u&&(f.suggestedPresentationDelay=s),l.length&&(f.mediaGroups.AUDIO.audio=function(t,e){var r;void 0===e&&(e={});var n=t.reduce((function(t,n){var i=n.attributes.role&&n.attributes.role.value||"",a=n.attributes.lang||"",o="main";if(a){var u=i?" ("+i+")":"";o=""+n.attributes.lang+u}return t[o]&&t[o].playlists[0].attributes.BANDWIDTH>n.attributes.bandwidth||(t[o]={language:a,autoselect:!0,default:"main"===i,playlists:x([w(n)],e),uri:""},void 0===r&&"main"===i&&((r=n).default=!0)),t}),{});return r||(n[Object.keys(n)[0]].default=!0),n}(l,r)),m.length&&(f.mediaGroups.SUBTITLES.subs=function(t,e){return void 0===e&&(e={}),t.reduce((function(t,r){var n=r.attributes.lang||"text";return t[n]||(t[n]={language:n,default:!1,autoselect:!1,playlists:x([L(r)],e),uri:""}),t}),{})}(m,r)),f},P=function(t,e,r){var n=t.NOW,i=t.clientOffset,a=t.availabilityStartTime,o=t.timescale,u=void 0===o?1:o,s=t.start,c=void 0===s?0:s,d=t.minimumUpdatePeriod,l=(n+i)/1e3+(void 0===d?0:d)-(a+c);return Math.ceil((l*u-e)/r)},R=function(t,e){for(var r=t.type,n=void 0===r?"static":r,i=t.minimumUpdatePeriod,a=void 0===i?0:i,o=t.media,u=void 0===o?"":o,s=t.sourceDuration,c=t.timescale,d=void 0===c?1:c,l=t.startNumber,m=void 0===l?1:l,f=t.periodIndex,p=[],h=-1,v=0;v<e.length;v++){var g=e[v],b=g.d,y=g.r||0,U=g.t||0;h<0&&(h=U),U&&U>h&&(h=U);var I=void 0;if(y<0){var D=v+1;I=D===e.length?"dynamic"===n&&a>0&&u.indexOf("$Number$")>0?P(t,h,b):(s*d-h)/b:(e[D].t-h)/b}else I=y+1;for(var x=m+p.length+I,w=m+p.length;w<x;)p.push({number:w,duration:b/d,time:h,timeline:f}),h+=b,w++}return p},S=/\$([A-z]*)(?:(%0)([0-9]+)d)?\$/g,N=function(t,e){return t.replace(S,function(t){return function(e,r,n,i){if("$$"===e)return"$";if(void 0===t[r])return e;var a=""+t[r];return"RepresentationID"===r?a:(i=n?parseInt(i,10):1,a.length>=i?a:""+new Array(i-a.length+1).join("0")+a)}}(e))},A=function(t,e){var r={RepresentationID:t.id,Bandwidth:t.bandwidth||0},n=t.initialization,i=void 0===n?{sourceURL:"",range:""}:n,a=g({baseUrl:t.baseUrl,source:N(i.sourceURL,r),range:i.range});return function(t,e){return t.duration||e?t.duration?y(t):R(t,e):[{number:t.startNumber||1,duration:t.sourceDuration,time:0,timeline:t.periodIndex}]}(t,e).map((function(e){r.Number=e.number,r.Time=e.time;var n=N(t.media||"",r);return{uri:n,timeline:e.timeline,duration:e.duration,resolvedUri:v(t.baseUrl||"",n),map:a,number:e.number}}))},O=function(t,e){var r=t.duration,n=t.segmentUrls,i=void 0===n?[]:n;if(!r&&!e||r&&e)throw new Error(f);var a,o=i.map((function(e){return function(t,e){var r=t.baseUrl,n=t.initialization,i=void 0===n?{}:n,a=g({baseUrl:r,source:i.sourceURL,range:i.range}),o=g({baseUrl:r,source:e.media,range:e.mediaRange});return o.map=a,o}(t,e)}));return r&&(a=y(t)),e&&(a=R(t,e)),a.map((function(t,e){if(o[e]){var r=o[e];return r.timeline=t.timeline,r.duration=t.duration,r.number=t.number,r}})).filter((function(t){return t}))},M=function(t){var e,r,n=t.attributes,i=t.segmentInfo;i.template?(r=A,e=o(n,i.template)):i.base?(r=U,e=o(n,i.base)):i.list&&(r=O,e=o(n,i.list));var a={attributes:n};if(!r)return a;var u=r(e,i.timeline);if(e.duration){var s=e,c=s.duration,d=s.timescale,l=void 0===d?1:d;e.duration=c/l}else u.length?e.duration=u.reduce((function(t,e){return Math.max(t,Math.ceil(e.duration))}),0):e.duration=0;return a.attributes=e,a.segments=u,i.base&&e.indexRange&&(a.sidx=u[0],a.segments=[]),a},z=function(t){return t.map(M)},B=function(t,e){return s(t.childNodes).filter((function(t){return t.tagName===e}))},C=function(t){return t.textContent.trim()},F=function(t){var e=/P(?:(\d*)Y)?(?:(\d*)M)?(?:(\d*)D)?(?:T(?:(\d*)H)?(?:(\d*)M)?(?:([\d.]*)S)?)?/.exec(t);if(!e)return 0;var r=e.slice(1),n=r[0],i=r[1],a=r[2],o=r[3],u=r[4],s=r[5];return 31536e3*parseFloat(n||0)+2592e3*parseFloat(i||0)+86400*parseFloat(a||0)+3600*parseFloat(o||0)+60*parseFloat(u||0)+parseFloat(s||0)},_={mediaPresentationDuration:function(t){return F(t)},availabilityStartTime:function(t){return/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(e=t)&&(e+="Z"),Date.parse(e)/1e3;var e},minimumUpdatePeriod:function(t){return F(t)},suggestedPresentationDelay:function(t){return F(t)},type:function(t){return t},timeShiftBufferDepth:function(t){return F(t)},start:function(t){return F(t)},width:function(t){return parseInt(t,10)},height:function(t){return parseInt(t,10)},bandwidth:function(t){return parseInt(t,10)},startNumber:function(t){return parseInt(t,10)},timescale:function(t){return parseInt(t,10)},duration:function(t){var e=parseInt(t,10);return isNaN(e)?F(t):e},d:function(t){return parseInt(t,10)},t:function(t){return parseInt(t,10)},r:function(t){return parseInt(t,10)},DEFAULT:function(t){return t}},j=function(t){return t&&t.attributes?s(t.attributes).reduce((function(t,e){var r=_[e.name]||_.DEFAULT;return t[e.name]=r(e.value),t}),{}):{}};function q(t){for(var e,r=(e=t,i.default.atob?i.default.atob(e):Buffer.from(e,"base64").toString("binary")),n=new Uint8Array(r.length),a=0;a<r.length;a++)n[a]=r.charCodeAt(a);return n}var k={"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb":"com.adobe.primetime"},$=function(t,e){return e.length?u(t.map((function(t){return e.map((function(e){return v(t,C(e))}))}))):t},G=function(t){var e=B(t,"SegmentTemplate")[0],r=B(t,"SegmentList")[0],n=r&&B(r,"SegmentURL").map((function(t){return o({tag:"SegmentURL"},j(t))})),i=B(t,"SegmentBase")[0],a=r||e,u=a&&B(a,"SegmentTimeline")[0],s=r||i||e,c=s&&B(s,"Initialization")[0],d=e&&j(e);d&&c?d.initialization=c&&j(c):d&&d.initialization&&(d.initialization={sourceURL:d.initialization});var l={template:d,timeline:u&&B(u,"S").map((function(t){return j(t)})),list:r&&o(j(r),{segmentUrls:n,initialization:j(c)}),base:i&&o(j(i),{initialization:j(c)})};return Object.keys(l).forEach((function(t){l[t]||delete l[t]})),l},H=function(t,e,r){return function(n){var i=j(n),a=$(e,B(n,"BaseURL")),s=B(n,"Role")[0],c={role:j(s)},d=o(t,i,c),l=B(n,"ContentProtection").reduce((function(t,e){var r=j(e),n=k[r.schemeIdUri];if(n){t[n]={attributes:r};var i=B(e,"cenc:pssh")[0];if(i){var a=C(i),o=a&&q(a);t[n].pssh=o}}return t}),{});Object.keys(l).length&&(d=o(d,{contentProtection:l}));var m=G(n),f=B(n,"Representation"),p=o(r,m);return u(f.map(function(t,e,r){return function(n){var i=B(n,"BaseURL"),a=$(e,i),u=o(t,j(n)),s=G(n);return a.map((function(t){return{segmentInfo:o(r,s),attributes:o(u,{baseUrl:t})}}))}}(d,a,p)))}},W=function(t,e){return function(r,n){var a=$(e,B(r,"BaseURL")),s=j(r),c=parseInt(s.id,10),d=i.default.isNaN(c)?n:c,l=o(t,{periodIndex:d}),m=B(r,"AdaptationSet"),f=G(r);return u(m.map(H(l,a,f)))}},V=function(t,e){void 0===e&&(e={});var r=e,n=r.manifestUri,i=void 0===n?"":n,a=r.NOW,o=void 0===a?Date.now():a,s=r.clientOffset,d=void 0===s?0:s,l=B(t,"Period");if(!l.length)throw new Error(c);var m=B(t,"Location"),f=j(t),p=$([i],B(t,"BaseURL"));return f.sourceDuration=f.mediaPresentationDuration||0,f.NOW=o,f.clientOffset=d,m.length&&(f.locations=m.map(C)),{locations:f.locations,representationInfo:u(l.map(W(f,p)))}},X=function(t){if(""===t)throw new Error(d);var e,n,i=new r.DOMParser;try{n=(e=i.parseFromString(t,"application/xml"))&&"MPD"===e.documentElement.tagName?e.documentElement:null}catch(t){}if(!n||n&&n.getElementsByTagName("parsererror").length>0)throw new Error(l);return n},Y=I;t.VERSION="0.15.2",t.addSidxSegmentsToPlaylist=Y,t.inheritAttributes=V,t.parse=function(t,e){void 0===e&&(e={});var r=V(X(t),e),n=z(r.representationInfo);return T(n,r.locations,e.sidxMapping)},t.parseUTCTiming=function(t){return function(t){var e=B(t,"UTCTiming")[0];if(!e)return null;var r=j(e);switch(r.schemeIdUri){case"urn:mpeg:dash:utc:http-head:2014":case"urn:mpeg:dash:utc:http-head:2012":r.method="HEAD";break;case"urn:mpeg:dash:utc:http-xsdate:2014":case"urn:mpeg:dash:utc:http-iso:2014":case"urn:mpeg:dash:utc:http-xsdate:2012":case"urn:mpeg:dash:utc:http-iso:2012":r.method="GET";break;case"urn:mpeg:dash:utc:direct:2014":case"urn:mpeg:dash:utc:direct:2012":r.method="DIRECT",r.value=Date.parse(r.value);break;case"urn:mpeg:dash:utc:http-ntp:2014":case"urn:mpeg:dash:utc:ntp:2014":case"urn:mpeg:dash:utc:sntp:2014":default:throw new Error(p)}return r}(X(t))},t.stringToMpdXml=X,t.toM3u8=T,t.toPlaylists=z,Object.defineProperty(t,"__esModule",{value:!0})}));
{
"name": "mpd-parser",
"version": "0.15.1",
"version": "0.15.2",
"description": "mpd parser",

@@ -56,18 +56,19 @@ "main": "dist/mpd-parser.cjs.js",

"dependencies": {
"@babel/runtime": "^7.5.5",
"@babel/runtime": "^7.12.5",
"@videojs/vhs-utils": "^3.0.0",
"global": "^4.3.2",
"xmldom": "^0.1.27"
"global": "^4.4.0",
"xmldom": "^0.4.0"
},
"devDependencies": {
"@videojs/generator-helpers": "~1.2.0",
"jsdom": "^15.1.1",
"karma": "^5.0.0",
"rollup": "^1.19.4",
"rollup-plugin-string": "^2.0.2",
"sinon": "^7.2.2",
"@rollup/plugin-replace": "^2.3.4",
"@videojs/generator-helpers": "~2.0.1",
"jsdom": "^16.4.0",
"karma": "^5.2.3",
"rollup": "^2.36.1",
"rollup-plugin-string": "^3.0.0",
"sinon": "^9.2.3",
"videojs-generate-karma-config": "~7.0.0",
"videojs-generate-rollup-config": "~5.0.1",
"videojs-generator-verify": "~2.0.0",
"videojs-standard": "^8.0.3"
"videojs-generate-rollup-config": "~6.1.0",
"videojs-generator-verify": "~3.0.1",
"videojs-standard": "^8.0.4"
},

@@ -82,10 +83,4 @@ "generator-videojs-plugin": {

"lint-staged": {
"*.js": [
"vjsstandard --fix",
"git add"
],
"README.md": [
"doctoc --notitle",
"git add"
]
"*.js": "vjsstandard --fix",
"README.md": "doctoc --notitle"
},

@@ -92,0 +87,0 @@ "husky": {

const generate = require('videojs-generate-rollup-config');
const string = require('rollup-plugin-string');
const string = require('rollup-plugin-string').string;
const replace = require('@rollup/plugin-replace');

@@ -10,2 +11,3 @@ // see https://github.com/videojs/videojs-generate-rollup-config

defaults.test.unshift('string');
defaults.module.unshift('replace');

@@ -16,2 +18,10 @@ return defaults;

defaults.string = string({include: ['test/manifests/*.mpd']});
// when using "require" rather than import
// require cjs module
defaults.replace = replace({
// single quote replace
"require('@videojs/vhs-utils/es": "require('@videojs/vhs-utils/cjs",
// double quote replace
'require("@videojs/vhs-utils/es': 'require("@videojs/vhs-utils/cjs'
});

@@ -18,0 +28,0 @@ return defaults;

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc