@amazon/vinyl 1.2.1 → 1.2.2
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/dist/index.cjs +13 -4
- package/dist/index.cjs.map +2 -2
- package/dist/index.js +18 -9
- package/dist/index.js.map +3 -3
- package/dist/test/integ.es5.js +60 -60
- package/dist/test/integ.js +49 -4
- package/dist/test/integ.js.map +2 -2
- package/dist/types/current/ad/AdBreakInfo.d.ts.map +1 -1
- package/dist/types/current/ad/AdControllerImpl.d.ts +18 -2
- package/dist/types/current/ad/AdControllerImpl.d.ts.map +1 -1
- package/dist/types/current/ad/AdControllerImpl.js +58 -22
- package/dist/types/current/ad/discoverHlsInterstitials.d.ts.map +1 -1
- package/dist/types/current/ad/discoverHlsInterstitials.js +5 -3
- package/dist/types/current/drm/DrmControllerImpl.d.ts +6 -0
- package/dist/types/current/drm/DrmControllerImpl.d.ts.map +1 -1
- package/dist/types/current/drm/DrmControllerImpl.js +13 -1
- package/dist/types/current/playback/createStallDetector.d.ts +43 -0
- package/dist/types/current/playback/createStallDetector.d.ts.map +1 -0
- package/dist/types/current/playback/createStallDetector.js +101 -0
- package/dist/types/current/playback/createStallMonitor.d.ts +45 -0
- package/dist/types/current/playback/createStallMonitor.d.ts.map +1 -0
- package/dist/types/current/playback/createStallMonitor.js +99 -0
- package/dist/types/current/streaming/AudioOptions.d.ts +27 -0
- package/dist/types/current/streaming/AudioOptions.d.ts.map +1 -1
- package/dist/types/current/streaming/AudioOptions.js +5 -1
- package/dist/types/current/streaming/LoadMetric.d.ts +15 -1
- package/dist/types/current/streaming/LoadMetric.d.ts.map +1 -1
- package/dist/types/current/streaming/createTimelineContentTypesValue.d.ts +21 -0
- package/dist/types/current/streaming/createTimelineContentTypesValue.d.ts.map +1 -0
- package/dist/types/current/streaming/createTimelineContentTypesValue.js +25 -0
- package/dist/types/current/text/SidecarTextTrackLoader.d.ts.map +1 -1
- package/dist/types/current/text/SidecarTextTrackLoader.js +4 -4
- package/dist/types/current/text/TextTrack.d.ts.map +1 -1
- package/dist/types/current/text/discoverDashTextTracks.d.ts +2 -2
- package/dist/types/current/text/discoverDashTextTracks.js +4 -3
- package/dist/types/current/text/parseWebVtt.d.ts.map +1 -1
- package/dist/types/current/text/parseWebVtt.js +3 -2
- package/dist/types/current/track/mse/MseTrack.d.ts +0 -1
- package/dist/types/current/track/mse/MseTrack.d.ts.map +1 -1
- package/dist/types/current/track/mse/MseTrack.js +4 -5
- package/dist/types/current/tsconfig.tsbuildinfo +1 -1
- package/dist/types/ts3.7/ad/AdControllerImpl.d.ts +18 -2
- package/dist/types/ts3.7/drm/DrmControllerImpl.d.ts +6 -0
- package/dist/types/ts3.7/playback/createStallDetector.d.ts +43 -0
- package/dist/types/ts3.7/playback/createStallMonitor.d.ts +45 -0
- package/dist/types/ts3.7/streaming/AudioOptions.d.ts +27 -0
- package/dist/types/ts3.7/streaming/LoadMetric.d.ts +15 -1
- package/dist/types/ts3.7/streaming/createTimelineContentTypesValue.d.ts +21 -0
- package/dist/types/ts3.7/text/discoverDashTextTracks.d.ts +2 -2
- package/dist/types/ts3.7/track/mse/MseTrack.d.ts +0 -1
- package/dist/types/ts4.1/ad/AdControllerImpl.d.ts +18 -2
- package/dist/types/ts4.1/drm/DrmControllerImpl.d.ts +6 -0
- package/dist/types/ts4.1/playback/createStallDetector.d.ts +43 -0
- package/dist/types/ts4.1/playback/createStallMonitor.d.ts +45 -0
- package/dist/types/ts4.1/streaming/AudioOptions.d.ts +27 -0
- package/dist/types/ts4.1/streaming/LoadMetric.d.ts +15 -1
- package/dist/types/ts4.1/streaming/createTimelineContentTypesValue.d.ts +21 -0
- package/dist/types/ts4.1/text/discoverDashTextTracks.d.ts +2 -2
- package/dist/types/ts4.1/track/mse/MseTrack.d.ts +0 -1
- package/dist/types/ts4.7/ad/AdControllerImpl.d.ts +18 -2
- package/dist/types/ts4.7/drm/DrmControllerImpl.d.ts +6 -0
- package/dist/types/ts4.7/playback/createStallDetector.d.ts +43 -0
- package/dist/types/ts4.7/playback/createStallMonitor.d.ts +45 -0
- package/dist/types/ts4.7/streaming/AudioOptions.d.ts +27 -0
- package/dist/types/ts4.7/streaming/LoadMetric.d.ts +15 -1
- package/dist/types/ts4.7/streaming/createTimelineContentTypesValue.d.ts +21 -0
- package/dist/types/ts4.7/text/discoverDashTextTracks.d.ts +2 -2
- package/dist/types/ts4.7/track/mse/MseTrack.d.ts +0 -1
- package/dist/unit/types/current/ad/AdControllerImpl.test.js +203 -5
- package/dist/unit/types/current/ad/discoverHlsInterstitials.test.js +2 -1
- package/dist/unit/types/current/drm/DrmControllerImpl.test.js +30 -1
- package/dist/unit/types/current/playback/createStallDetector.test.d.ts +2 -0
- package/dist/unit/types/current/playback/createStallDetector.test.d.ts.map +1 -0
- package/dist/unit/types/current/playback/createStallDetector.test.js +163 -0
- package/dist/unit/types/current/playback/createStallMonitor.test.d.ts +2 -0
- package/dist/unit/types/current/playback/createStallMonitor.test.d.ts.map +1 -0
- package/dist/unit/types/current/playback/createStallMonitor.test.js +163 -0
- package/dist/unit/types/current/streaming/MseTrack.test.js +15 -0
- package/dist/unit/types/current/streaming/createTimelineContentTypesValue.test.d.ts +2 -0
- package/dist/unit/types/current/streaming/createTimelineContentTypesValue.test.d.ts.map +1 -0
- package/dist/unit/types/current/streaming/createTimelineContentTypesValue.test.js +57 -0
- package/dist/unit/types/current/text/TextTrack.test.d.ts +2 -0
- package/dist/unit/types/current/text/TextTrack.test.d.ts.map +1 -0
- package/dist/unit/types/current/text/TextTrack.test.js +12 -0
- package/dist/unit/types/current/text/discoverDashTextTracks.test.js +17 -0
- package/dist/unit/types/current/text/parseWebVtt.test.js +26 -0
- package/dist/unit/types/current/tsconfig.tsbuildinfo +1 -1
- package/dist/vinylTestUtil/types/current/tsconfig.tsbuildinfo +1 -1
- package/package.json +9 -9
package/dist/index.js
CHANGED
|
@@ -1838,7 +1838,6 @@ import {
|
|
|
1838
1838
|
|
|
1839
1839
|
// src/track/mse/MseTrack.ts
|
|
1840
1840
|
import {
|
|
1841
|
-
Abort as Abort2,
|
|
1842
1841
|
equalDeep,
|
|
1843
1842
|
IntersectionRanges,
|
|
1844
1843
|
logDebug as logDebug5,
|
|
@@ -1864,7 +1863,6 @@ var MseTrack = class extends TrackBase {
|
|
|
1864
1863
|
const deps = depsContainer.dependencies;
|
|
1865
1864
|
super(uri, type, deps);
|
|
1866
1865
|
__publicField(this, "streams", []);
|
|
1867
|
-
__publicField(this, "disposeAbort", /* @__PURE__ */ new Abort2());
|
|
1868
1866
|
__publicField(this, "lastPreloadOptions", null);
|
|
1869
1867
|
__publicField(this, "activateOptions", null);
|
|
1870
1868
|
__publicField(this, "allFetchedRanges", []);
|
|
@@ -1899,14 +1897,14 @@ var MseTrack = class extends TrackBase {
|
|
|
1899
1897
|
if (this.activateOptions) {
|
|
1900
1898
|
this.deps.drmController.initializeForPlayback(
|
|
1901
1899
|
event.current,
|
|
1902
|
-
this.
|
|
1900
|
+
this.drmSessionAbort.value
|
|
1903
1901
|
);
|
|
1904
1902
|
}
|
|
1905
1903
|
});
|
|
1906
1904
|
this.on("bufferingQualityChange", (event) => {
|
|
1907
1905
|
this.deps.drmController.setBufferingDrmInfo(
|
|
1908
1906
|
event.current,
|
|
1909
|
-
this.
|
|
1907
|
+
this.drmSessionAbort.value
|
|
1910
1908
|
);
|
|
1911
1909
|
});
|
|
1912
1910
|
add(
|
|
@@ -2062,7 +2060,7 @@ var MseTrack = class extends TrackBase {
|
|
|
2062
2060
|
this.streams.forEach((stream) => {
|
|
2063
2061
|
this.deps.drmController.initializeForPlayback(
|
|
2064
2062
|
stream.streamingQuality,
|
|
2065
|
-
this.
|
|
2063
|
+
this.drmSessionAbort.value
|
|
2066
2064
|
);
|
|
2067
2065
|
});
|
|
2068
2066
|
this.deps.playbackSource.src = this.deps.mediaSourceController.createUrl();
|
|
@@ -3964,7 +3962,7 @@ var BufferingControllerImpl = class extends EventHostImpl6 {
|
|
|
3964
3962
|
|
|
3965
3963
|
// src/streaming/SegmentControllerImpl.ts
|
|
3966
3964
|
import {
|
|
3967
|
-
Abort as
|
|
3965
|
+
Abort as Abort2,
|
|
3968
3966
|
clone as clone2,
|
|
3969
3967
|
closeTo as closeTo5,
|
|
3970
3968
|
createDisposer as createDisposer10,
|
|
@@ -4156,7 +4154,7 @@ var SegmentControllerImpl = class extends EventHostImpl7 {
|
|
|
4156
4154
|
__publicField(this, "timeUpdateSub", null);
|
|
4157
4155
|
__publicField(this, "seekingSub", null);
|
|
4158
4156
|
// When disposed, aborts in-flight operations.
|
|
4159
|
-
__publicField(this, "abort", /* @__PURE__ */ new
|
|
4157
|
+
__publicField(this, "abort", /* @__PURE__ */ new Abort2());
|
|
4160
4158
|
/**
|
|
4161
4159
|
* Cached last period lookup for fast repeated access.
|
|
4162
4160
|
*/
|
|
@@ -6653,6 +6651,7 @@ import {
|
|
|
6653
6651
|
isSilentError as isSilentError6,
|
|
6654
6652
|
logDebug as logDebug14,
|
|
6655
6653
|
logVerbose as logVerbose2,
|
|
6654
|
+
logWarn as logWarn4,
|
|
6656
6655
|
memoize as memoize7,
|
|
6657
6656
|
noop as noop7,
|
|
6658
6657
|
normalizeHeadersInit as normalizeHeadersInit2,
|
|
@@ -6807,6 +6806,7 @@ function createFairPlaySessionInitData(initData, contentId, certificateData) {
|
|
|
6807
6806
|
// src/drm/DrmControllerImpl.ts
|
|
6808
6807
|
var LICENSE_TIMEOUT = 90;
|
|
6809
6808
|
var LICENSE_TIMEOUT_MESSAGE = "License provider timed out after {time}s";
|
|
6809
|
+
var EXCESSIVE_SESSION_COUNT = 20;
|
|
6810
6810
|
var DrmControllerImpl = class extends EventHostImpl12 {
|
|
6811
6811
|
constructor(deps, options) {
|
|
6812
6812
|
super();
|
|
@@ -6988,12 +6988,20 @@ var DrmControllerImpl = class extends EventHostImpl12 {
|
|
|
6988
6988
|
keySystemOptions == null ? void 0 : keySystemOptions.initDataTransformer
|
|
6989
6989
|
);
|
|
6990
6990
|
this.sessions.push(newSession);
|
|
6991
|
+
logVerbose2(this, `total sessions: ${this.sessions.length}`);
|
|
6992
|
+
if (this.sessions.length === EXCESSIVE_SESSION_COUNT + 1) {
|
|
6993
|
+
logWarn4(
|
|
6994
|
+
this,
|
|
6995
|
+
`${this.sessions.length} open key sessions exceeds ${EXCESSIVE_SESSION_COUNT}; sessions may be leaking (not closing on track deactivation)`
|
|
6996
|
+
);
|
|
6997
|
+
}
|
|
6991
6998
|
this.dispatch("sessionCreate", {
|
|
6992
6999
|
initDataType: newSession.initDataType,
|
|
6993
7000
|
mimeType: newSession.mimeType
|
|
6994
7001
|
});
|
|
6995
7002
|
newSession.on("closed", () => this.closeSession(newSession));
|
|
6996
7003
|
abort == null ? void 0 : abort.onAborted(() => {
|
|
7004
|
+
if (this.disposed) return;
|
|
6997
7005
|
logDebug14(this, "abort session");
|
|
6998
7006
|
this.closeSession(newSession);
|
|
6999
7007
|
});
|
|
@@ -7601,7 +7609,7 @@ import {
|
|
|
7601
7609
|
globalRef as globalRef4,
|
|
7602
7610
|
globalTarget,
|
|
7603
7611
|
IllegalStateError as IllegalStateError2,
|
|
7604
|
-
logWarn as
|
|
7612
|
+
logWarn as logWarn5,
|
|
7605
7613
|
remove as remove2,
|
|
7606
7614
|
substitute as substitute2
|
|
7607
7615
|
} from "@amazon/vinyl-util";
|
|
@@ -7623,7 +7631,7 @@ var PlayerRegistryImpl = class {
|
|
|
7623
7631
|
const n = this._players.length;
|
|
7624
7632
|
if (n > this.maxPlayersWarning && !this.gaveMaxPlayersWarning) {
|
|
7625
7633
|
this.gaveMaxPlayersWarning = true;
|
|
7626
|
-
|
|
7634
|
+
logWarn5(
|
|
7627
7635
|
globalTarget,
|
|
7628
7636
|
substitute2(locale2.maxPlayersWarning, { count: n })
|
|
7629
7637
|
);
|
|
@@ -8281,6 +8289,7 @@ export {
|
|
|
8281
8289
|
DrmError,
|
|
8282
8290
|
DrmKeySystem,
|
|
8283
8291
|
DrmRobustness,
|
|
8292
|
+
EXCESSIVE_SESSION_COUNT,
|
|
8284
8293
|
FAIR_PLAY_KEY_SYSTEMS,
|
|
8285
8294
|
FixedPlaybackQuality,
|
|
8286
8295
|
HlsManifestControllerImpl,
|