@amazon/vinyl-util 3.0.0 → 3.1.0
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/browserTestUtil/index.js.map +2 -2
- package/dist/browserTestUtil/types/current/mock/dom/lib.dom.d.ts.map +1 -1
- package/dist/browserTestUtil/types/current/tsconfig.tsbuildinfo +1 -1
- package/dist/index.cjs +165 -178
- package/dist/index.cjs.map +4 -4
- package/dist/index.js +165 -178
- package/dist/index.js.map +4 -4
- package/dist/polyfill/index.js +35 -32
- package/dist/polyfill/index.js.map +3 -3
- package/dist/polyfill/tsconfig.tsbuildinfo +1 -1
- package/dist/test/benchmark.js.map +2 -2
- package/dist/testUtil/index.js +0 -36
- package/dist/testUtil/index.js.map +3 -3
- package/dist/testUtil/types/current/index.d.ts +0 -1
- package/dist/testUtil/types/current/index.d.ts.map +1 -1
- package/dist/testUtil/types/current/index.js +0 -1
- package/dist/testUtil/types/current/tsconfig.tsbuildinfo +1 -1
- package/dist/testUtil/types/ts3.7/index.d.ts +0 -1
- package/dist/testUtil/types/ts4.1/index.d.ts +0 -1
- package/dist/testUtil/types/ts4.7/index.d.ts +0 -1
- package/dist/types/current/index.d.ts +1 -1
- package/dist/types/current/index.d.ts.map +1 -1
- package/dist/types/current/index.js +1 -1
- package/dist/types/current/network/responseUtil.d.ts +21 -0
- package/dist/types/current/network/responseUtil.d.ts.map +1 -1
- package/dist/types/current/network/responseUtil.js +30 -0
- package/dist/types/current/tsconfig.tsbuildinfo +1 -1
- package/dist/types/current/util/async/never.d.ts.map +1 -1
- package/dist/types/current/util/type.d.ts.map +1 -1
- package/dist/types/current/util/webm/parseWebm.d.ts +43 -0
- package/dist/types/current/util/webm/parseWebm.d.ts.map +1 -0
- package/dist/types/current/util/webm/parseWebm.js +166 -0
- package/dist/types/ts3.7/index.d.ts +1 -1
- package/dist/types/ts3.7/network/responseUtil.d.ts +21 -0
- package/dist/types/ts3.7/util/webm/parseWebm.d.ts +43 -0
- package/dist/types/ts4.1/index.d.ts +1 -1
- package/dist/types/ts4.1/network/responseUtil.d.ts +21 -0
- package/dist/types/ts4.1/util/webm/parseWebm.d.ts +43 -0
- package/dist/types/ts4.7/index.d.ts +1 -1
- package/dist/types/ts4.7/network/responseUtil.d.ts +21 -0
- package/dist/types/ts4.7/util/webm/parseWebm.d.ts +43 -0
- package/dist/unit/types/current/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -4
- package/dist/testUtil/types/current/patch/addPatchTests.d.ts +0 -35
- package/dist/testUtil/types/current/patch/addPatchTests.d.ts.map +0 -1
- package/dist/testUtil/types/current/patch/addPatchTests.js +0 -54
- package/dist/testUtil/types/ts3.7/patch/addPatchTests.d.ts +0 -35
- package/dist/testUtil/types/ts4.1/patch/addPatchTests.d.ts +0 -35
- package/dist/testUtil/types/ts4.7/patch/addPatchTests.d.ts +0 -35
- package/dist/types/current/patch/patchTarget.d.ts +0 -114
- package/dist/types/current/patch/patchTarget.d.ts.map +0 -1
- package/dist/types/current/patch/patchTarget.js +0 -219
- package/dist/types/ts3.7/patch/patchTarget.d.ts +0 -114
- package/dist/types/ts4.1/patch/patchTarget.d.ts +0 -114
- package/dist/types/ts4.7/patch/patchTarget.d.ts +0 -114
package/dist/index.cjs
CHANGED
|
@@ -47,6 +47,7 @@ __export(index_exports, {
|
|
|
47
47
|
ConsoleLogHandlerImpl: () => ConsoleLogHandlerImpl,
|
|
48
48
|
DEFAULT_MAX_HISTORY: () => DEFAULT_MAX_HISTORY,
|
|
49
49
|
DEFAULT_TIMEOUT_MESSAGE: () => DEFAULT_TIMEOUT_MESSAGE,
|
|
50
|
+
DEFAULT_WEBM_TIMECODE_SCALE: () => DEFAULT_WEBM_TIMECODE_SCALE,
|
|
50
51
|
Deferred: () => Deferred,
|
|
51
52
|
DeviceType: () => DeviceType,
|
|
52
53
|
DeviceVendor: () => DeviceVendor,
|
|
@@ -227,7 +228,6 @@ __export(index_exports, {
|
|
|
227
228
|
logDebug: () => logDebug,
|
|
228
229
|
logError: () => logError,
|
|
229
230
|
logInfo: () => logInfo,
|
|
230
|
-
logPatchedEvents: () => logPatchedEvents,
|
|
231
231
|
logTimer: () => logTimer,
|
|
232
232
|
logVerbose: () => logVerbose,
|
|
233
233
|
logWarn: () => logWarn,
|
|
@@ -265,9 +265,9 @@ __export(index_exports, {
|
|
|
265
265
|
parseTimestamp: () => parseTimestamp,
|
|
266
266
|
parseUserAgent: () => parseUserAgent,
|
|
267
267
|
parseVersion: () => parseVersion,
|
|
268
|
+
parseWebmCues: () => parseWebmCues,
|
|
269
|
+
parseWebmInit: () => parseWebmInit,
|
|
268
270
|
patchFetch: () => patchFetch,
|
|
269
|
-
patchTarget: () => patchTarget,
|
|
270
|
-
patchTargetFromFlags: () => patchTargetFromFlags,
|
|
271
271
|
persistenceRef: () => persistenceRef,
|
|
272
272
|
plainObjectEqualRule: () => plainObjectEqualRule,
|
|
273
273
|
plainObjectMergeRule: () => plainObjectMergeRule,
|
|
@@ -278,6 +278,7 @@ __export(index_exports, {
|
|
|
278
278
|
promise: () => promise,
|
|
279
279
|
rangeIntersects: () => rangeIntersects,
|
|
280
280
|
rangesOf: () => rangesOf,
|
|
281
|
+
readResponseBody: () => readResponseBody,
|
|
281
282
|
redispatchEvents: () => redispatchEvents,
|
|
282
283
|
regexRule: () => regexRule,
|
|
283
284
|
regexpEqualRule: () => regexpEqualRule,
|
|
@@ -4748,183 +4749,36 @@ function requestWithRetry(input, init, options) {
|
|
|
4748
4749
|
function isResponseError(error) {
|
|
4749
4750
|
return error instanceof RequestError && error.info.type === "response" /* RESPONSE */;
|
|
4750
4751
|
}
|
|
4751
|
-
|
|
4752
|
-
|
|
4753
|
-
|
|
4754
|
-
|
|
4755
|
-
|
|
4756
|
-
|
|
4757
|
-
|
|
4758
|
-
|
|
4759
|
-
|
|
4760
|
-
|
|
4761
|
-
|
|
4762
|
-
|
|
4763
|
-
|
|
4764
|
-
|
|
4765
|
-
|
|
4766
|
-
}
|
|
4767
|
-
|
|
4768
|
-
|
|
4769
|
-
|
|
4770
|
-
|
|
4771
|
-
|
|
4772
|
-
const eventSquelched = add(new SignalImpl());
|
|
4773
|
-
const patchedChain = [];
|
|
4774
|
-
patchFactories.forEach((factory) => {
|
|
4775
|
-
const next = patchTarget(patched, factory);
|
|
4776
|
-
patched = next.patched;
|
|
4777
|
-
patchedChain.push(next);
|
|
4778
|
-
next.eventFabricated.listen(
|
|
4779
|
-
(event) => eventFabricated.dispatch(event)
|
|
4752
|
+
async function readResponseBody(response, as) {
|
|
4753
|
+
let read;
|
|
4754
|
+
switch (as) {
|
|
4755
|
+
case "arrayBuffer":
|
|
4756
|
+
read = response.arrayBuffer();
|
|
4757
|
+
break;
|
|
4758
|
+
case "text":
|
|
4759
|
+
read = response.text();
|
|
4760
|
+
break;
|
|
4761
|
+
case "json":
|
|
4762
|
+
read = response.json();
|
|
4763
|
+
break;
|
|
4764
|
+
}
|
|
4765
|
+
try {
|
|
4766
|
+
return await read;
|
|
4767
|
+
} catch (error) {
|
|
4768
|
+
if ((error == null ? void 0 : error.name) === "AbortError")
|
|
4769
|
+
throw new ReportableError(
|
|
4770
|
+
"Response body read aborted",
|
|
4771
|
+
ErrorOrigin.INTERNAL,
|
|
4772
|
+
"silent" /* SILENT */
|
|
4780
4773
|
);
|
|
4781
|
-
|
|
4782
|
-
|
|
4783
|
-
|
|
4784
|
-
|
|
4785
|
-
|
|
4786
|
-
|
|
4787
|
-
|
|
4788
|
-
return {
|
|
4789
|
-
patched,
|
|
4790
|
-
eventFabricated,
|
|
4791
|
-
eventSquelched,
|
|
4792
|
-
dispose
|
|
4793
|
-
};
|
|
4794
|
-
}
|
|
4795
|
-
}
|
|
4796
|
-
function _patchTarget(target, patchFactory) {
|
|
4797
|
-
var _a, _b, _c;
|
|
4798
|
-
const { add, dispose } = createDisposer();
|
|
4799
|
-
const eventFabricated = add(new SignalImpl());
|
|
4800
|
-
const eventSquelched = add(new SignalImpl());
|
|
4801
|
-
const patch = add(patchFactory(target));
|
|
4802
|
-
const proxyEventHost = add(new EventHostImpl());
|
|
4803
|
-
(_a = patch.eventFabricated) == null ? void 0 : _a.listen((event) => {
|
|
4804
|
-
eventFabricated.dispatch(event);
|
|
4805
|
-
proxyEventHost.dispatch(event.type, event);
|
|
4806
|
-
});
|
|
4807
|
-
const delegatedEvents = /* @__PURE__ */ new Set();
|
|
4808
|
-
const subs = /* @__PURE__ */ new Map();
|
|
4809
|
-
let addEventListener = void 0;
|
|
4810
|
-
let removeEventListener = void 0;
|
|
4811
|
-
if (isEventTarget(target)) {
|
|
4812
|
-
if (patch.events || patch.eventFabricated) {
|
|
4813
|
-
const eventPatches = (_b = patch.events) != null ? _b : {};
|
|
4814
|
-
const observeTargetEvent = (type) => {
|
|
4815
|
-
if (!delegatedEvents.has(type)) {
|
|
4816
|
-
delegatedEvents.add(type);
|
|
4817
|
-
const targetHandler = (event) => {
|
|
4818
|
-
const patchedEvent = event.type in eventPatches ? eventPatches[event.type](event) : event;
|
|
4819
|
-
if (patchedEvent)
|
|
4820
|
-
proxyEventHost.dispatch(
|
|
4821
|
-
patchedEvent.type,
|
|
4822
|
-
patchedEvent
|
|
4823
|
-
);
|
|
4824
|
-
else eventSquelched.dispatch(event);
|
|
4825
|
-
};
|
|
4826
|
-
target.addEventListener(type, targetHandler);
|
|
4827
|
-
}
|
|
4828
|
-
};
|
|
4829
|
-
addEventListener = (type, callback, options) => {
|
|
4830
|
-
var _a2;
|
|
4831
|
-
if (typeof callback !== "function")
|
|
4832
|
-
throw new IllegalArgumentError(
|
|
4833
|
-
"only function callbacks are supported"
|
|
4834
|
-
);
|
|
4835
|
-
observeTargetEvent(type);
|
|
4836
|
-
subs.set(
|
|
4837
|
-
callback,
|
|
4838
|
-
proxyEventHost.on(type, callback, {
|
|
4839
|
-
once: typeof options === "object" ? (_a2 = options.once) != null ? _a2 : false : false
|
|
4840
|
-
})
|
|
4841
|
-
);
|
|
4842
|
-
};
|
|
4843
|
-
removeEventListener = (_, callback) => {
|
|
4844
|
-
if (typeof callback !== "function")
|
|
4845
|
-
throw new IllegalArgumentError(
|
|
4846
|
-
"only function callbacks are supported"
|
|
4847
|
-
);
|
|
4848
|
-
const sub = subs.get(callback);
|
|
4849
|
-
if (sub) {
|
|
4850
|
-
subs.delete(callback);
|
|
4851
|
-
sub();
|
|
4852
|
-
}
|
|
4853
|
-
};
|
|
4854
|
-
for (const eventPatchesKey in eventPatches) {
|
|
4855
|
-
observeTargetEvent(eventPatchesKey);
|
|
4856
|
-
}
|
|
4857
|
-
} else {
|
|
4858
|
-
addEventListener = target.addEventListener.bind(target);
|
|
4859
|
-
removeEventListener = target.removeEventListener.bind(target);
|
|
4860
|
-
}
|
|
4774
|
+
const status = response.status;
|
|
4775
|
+
const origin = status >= 500 && status < 600 ? ErrorOrigin.SERVICE_EXTERNAL : ErrorOrigin.SERVICE_INTERNAL;
|
|
4776
|
+
throw new ReportableError(
|
|
4777
|
+
`Failed to read response body: ${String(error)}`,
|
|
4778
|
+
origin,
|
|
4779
|
+
"fatal" /* FATAL */
|
|
4780
|
+
);
|
|
4861
4781
|
}
|
|
4862
|
-
const propertyPatches = (_c = patch.properties) != null ? _c : {};
|
|
4863
|
-
const patched = new Proxy(target, {
|
|
4864
|
-
get(target2, p, receiver) {
|
|
4865
|
-
const key = p;
|
|
4866
|
-
if (key === "addEventListener") {
|
|
4867
|
-
return addEventListener;
|
|
4868
|
-
} else if (key === "removeEventListener") {
|
|
4869
|
-
return removeEventListener;
|
|
4870
|
-
}
|
|
4871
|
-
const patch2 = propertyPatches[key];
|
|
4872
|
-
const value = patch2 && patch2.get ? patch2.get() : target2[key];
|
|
4873
|
-
if (typeof value === "function") {
|
|
4874
|
-
return function(...args) {
|
|
4875
|
-
return value.apply(this === receiver ? target2 : this, args);
|
|
4876
|
-
};
|
|
4877
|
-
}
|
|
4878
|
-
return value;
|
|
4879
|
-
},
|
|
4880
|
-
set(target2, p, newValue) {
|
|
4881
|
-
const key = p;
|
|
4882
|
-
const patch2 = propertyPatches[key];
|
|
4883
|
-
if (patch2 && patch2.set) patch2.set(newValue);
|
|
4884
|
-
else target2[key] = newValue;
|
|
4885
|
-
return true;
|
|
4886
|
-
}
|
|
4887
|
-
});
|
|
4888
|
-
return {
|
|
4889
|
-
patched,
|
|
4890
|
-
eventFabricated,
|
|
4891
|
-
eventSquelched,
|
|
4892
|
-
// Certain supported platforms do not support Proxy.revocable, but this is not a
|
|
4893
|
-
// requirement; we do not need to provide a Proxy to a consumer that needs its
|
|
4894
|
-
// lifespan controlled.
|
|
4895
|
-
dispose
|
|
4896
|
-
};
|
|
4897
|
-
}
|
|
4898
|
-
function logPatchedEvents(pathTarget, patched) {
|
|
4899
|
-
const eventSquelchedSub = patched.eventSquelched.listen(
|
|
4900
|
-
(event) => logDebug(pathTarget, `'${event.type}' event squelched`)
|
|
4901
|
-
);
|
|
4902
|
-
const eventFabricatedSub = patched.eventFabricated.listen(
|
|
4903
|
-
(event) => logDebug(pathTarget, `'${event.type}' event fabricated`)
|
|
4904
|
-
);
|
|
4905
|
-
return () => {
|
|
4906
|
-
eventSquelchedSub();
|
|
4907
|
-
eventFabricatedSub();
|
|
4908
|
-
};
|
|
4909
|
-
}
|
|
4910
|
-
function isEventTarget(target) {
|
|
4911
|
-
return "addEventListener" in target;
|
|
4912
|
-
}
|
|
4913
|
-
function patchTargetFromFlags(target, flags, ...patchEntries) {
|
|
4914
|
-
const pathTarget = {
|
|
4915
|
-
logPrefix: createLogPrefix("Patch")
|
|
4916
|
-
};
|
|
4917
|
-
const filtered = patchEntries.filter(([key]) => {
|
|
4918
|
-
const enabled = flags[key] === true;
|
|
4919
|
-
if (enabled) logDebug(pathTarget, `Applying '${String(key)}' patch`);
|
|
4920
|
-
return enabled;
|
|
4921
|
-
});
|
|
4922
|
-
const patchedRef = patchTarget(
|
|
4923
|
-
target,
|
|
4924
|
-
...filtered.map(([_, factory]) => factory)
|
|
4925
|
-
);
|
|
4926
|
-
logPatchedEvents(pathTarget, patchedRef);
|
|
4927
|
-
return patchedRef;
|
|
4928
4782
|
}
|
|
4929
4783
|
|
|
4930
4784
|
// src/persistence/StoragePersistence.ts
|
|
@@ -6131,4 +5985,137 @@ function resolveDots(path) {
|
|
|
6131
5985
|
}
|
|
6132
5986
|
return out.join("/");
|
|
6133
5987
|
}
|
|
5988
|
+
|
|
5989
|
+
// src/util/webm/parseWebm.ts
|
|
5990
|
+
var EBML_ID = {
|
|
5991
|
+
Segment: 408125543,
|
|
5992
|
+
Info: 357149030,
|
|
5993
|
+
TimecodeScale: 2807729,
|
|
5994
|
+
Cues: 475249515,
|
|
5995
|
+
CuePoint: 187,
|
|
5996
|
+
CueTime: 179,
|
|
5997
|
+
CueTrackPositions: 183,
|
|
5998
|
+
CueClusterPosition: 241
|
|
5999
|
+
};
|
|
6000
|
+
var DEFAULT_WEBM_TIMECODE_SCALE = 1e6;
|
|
6001
|
+
function readVint(view, pos, keepMarker) {
|
|
6002
|
+
const first2 = view.getUint8(pos);
|
|
6003
|
+
let mask = 128;
|
|
6004
|
+
let length = 1;
|
|
6005
|
+
while (length <= 8 && (first2 & mask) === 0) {
|
|
6006
|
+
mask >>= 1;
|
|
6007
|
+
length++;
|
|
6008
|
+
}
|
|
6009
|
+
if (length > 8)
|
|
6010
|
+
throw new ValidationError(
|
|
6011
|
+
"invalid EBML variable-length integer",
|
|
6012
|
+
ErrorOrigin.MEDIA
|
|
6013
|
+
);
|
|
6014
|
+
let value = keepMarker ? first2 : first2 & mask - 1;
|
|
6015
|
+
let allOnes = (first2 & mask - 1) === mask - 1;
|
|
6016
|
+
for (let i = 1; i < length; i++) {
|
|
6017
|
+
const byte = view.getUint8(pos + i);
|
|
6018
|
+
allOnes = allOnes && byte === 255;
|
|
6019
|
+
value = value * 256 + byte;
|
|
6020
|
+
}
|
|
6021
|
+
return { value: !keepMarker && allOnes ? null : value, length };
|
|
6022
|
+
}
|
|
6023
|
+
function readElementHeader(view, pos) {
|
|
6024
|
+
const { value: id, length: idLength } = readVint(view, pos, true);
|
|
6025
|
+
const { value: size, length: sizeLength } = readVint(
|
|
6026
|
+
view,
|
|
6027
|
+
pos + idLength,
|
|
6028
|
+
false
|
|
6029
|
+
);
|
|
6030
|
+
const contentStart = pos + idLength + sizeLength;
|
|
6031
|
+
return {
|
|
6032
|
+
id,
|
|
6033
|
+
contentStart,
|
|
6034
|
+
size,
|
|
6035
|
+
end: size == null ? null : contentStart + size
|
|
6036
|
+
};
|
|
6037
|
+
}
|
|
6038
|
+
function childHeaders(view, start, end) {
|
|
6039
|
+
const out = [];
|
|
6040
|
+
let pos = start;
|
|
6041
|
+
while (pos < end) {
|
|
6042
|
+
const el = readElementHeader(view, pos);
|
|
6043
|
+
out.push(el);
|
|
6044
|
+
if (el.end == null) break;
|
|
6045
|
+
pos = el.end;
|
|
6046
|
+
}
|
|
6047
|
+
return out;
|
|
6048
|
+
}
|
|
6049
|
+
function readUint(view, pos, length) {
|
|
6050
|
+
let value = 0;
|
|
6051
|
+
for (let i = 0; i < length; i++)
|
|
6052
|
+
value = value * 256 + view.getUint8(pos + i);
|
|
6053
|
+
return value;
|
|
6054
|
+
}
|
|
6055
|
+
function parseWebmInit(buffer) {
|
|
6056
|
+
var _a;
|
|
6057
|
+
const view = new DataView(buffer);
|
|
6058
|
+
const segment = childHeaders(view, 0, view.byteLength).find(
|
|
6059
|
+
(el) => el.id === EBML_ID.Segment
|
|
6060
|
+
);
|
|
6061
|
+
if (!segment)
|
|
6062
|
+
throw new ValidationError(
|
|
6063
|
+
"WebM init segment missing Segment element",
|
|
6064
|
+
ErrorOrigin.MEDIA
|
|
6065
|
+
);
|
|
6066
|
+
const segmentEnd = Math.min((_a = segment.end) != null ? _a : view.byteLength, view.byteLength);
|
|
6067
|
+
const info = childHeaders(view, segment.contentStart, segmentEnd).find(
|
|
6068
|
+
(el) => el.id === EBML_ID.Info && el.size != null
|
|
6069
|
+
);
|
|
6070
|
+
return {
|
|
6071
|
+
segmentDataStart: segment.contentStart,
|
|
6072
|
+
segmentSize: segment.size,
|
|
6073
|
+
timecodeScale: info ? readTimecodeScale(view, info.contentStart, info.end) : DEFAULT_WEBM_TIMECODE_SCALE
|
|
6074
|
+
};
|
|
6075
|
+
}
|
|
6076
|
+
function readTimecodeScale(view, start, end) {
|
|
6077
|
+
const el = childHeaders(view, start, end).find(
|
|
6078
|
+
(child) => child.id === EBML_ID.TimecodeScale && child.size
|
|
6079
|
+
);
|
|
6080
|
+
return el ? readUint(view, el.contentStart, el.size) : DEFAULT_WEBM_TIMECODE_SCALE;
|
|
6081
|
+
}
|
|
6082
|
+
function parseWebmCues(buffer) {
|
|
6083
|
+
var _a;
|
|
6084
|
+
const view = new DataView(buffer);
|
|
6085
|
+
const cues = readElementHeader(view, 0);
|
|
6086
|
+
if (cues.id !== EBML_ID.Cues)
|
|
6087
|
+
throw new ValidationError(
|
|
6088
|
+
`expected WebM 'Cues' element but had id: 0x${cues.id.toString(16)}`,
|
|
6089
|
+
ErrorOrigin.MEDIA
|
|
6090
|
+
);
|
|
6091
|
+
const cuesEnd = Math.min((_a = cues.end) != null ? _a : view.byteLength, view.byteLength);
|
|
6092
|
+
const cuePoints = [];
|
|
6093
|
+
for (const el of childHeaders(view, cues.contentStart, cuesEnd)) {
|
|
6094
|
+
if (el.id !== EBML_ID.CuePoint || el.size == null) continue;
|
|
6095
|
+
const cuePoint = parseCuePoint(view, el.contentStart, el.end);
|
|
6096
|
+
if (cuePoint) cuePoints.push(cuePoint);
|
|
6097
|
+
}
|
|
6098
|
+
return cuePoints;
|
|
6099
|
+
}
|
|
6100
|
+
function parseCuePoint(view, start, end) {
|
|
6101
|
+
let time = null;
|
|
6102
|
+
let clusterPosition = null;
|
|
6103
|
+
for (const el of childHeaders(view, start, end)) {
|
|
6104
|
+
if (el.id === EBML_ID.CueTime && el.size)
|
|
6105
|
+
time = readUint(view, el.contentStart, el.size);
|
|
6106
|
+
else if (el.id === EBML_ID.CueTrackPositions && el.size != null)
|
|
6107
|
+
clusterPosition = readCueClusterPosition(
|
|
6108
|
+
view,
|
|
6109
|
+
el.contentStart,
|
|
6110
|
+
el.end
|
|
6111
|
+
);
|
|
6112
|
+
}
|
|
6113
|
+
return time != null && clusterPosition != null ? { time, clusterPosition } : null;
|
|
6114
|
+
}
|
|
6115
|
+
function readCueClusterPosition(view, start, end) {
|
|
6116
|
+
const el = childHeaders(view, start, end).find(
|
|
6117
|
+
(child) => child.id === EBML_ID.CueClusterPosition && child.size
|
|
6118
|
+
);
|
|
6119
|
+
return el ? readUint(view, el.contentStart, el.size) : null;
|
|
6120
|
+
}
|
|
6134
6121
|
//# sourceMappingURL=index.cjs.map
|