diff --git a/src/core/init/types.ts b/src/core/init/types.ts index 7effac621b..d325de6b0d 100644 --- a/src/core/init/types.ts +++ b/src/core/init/types.ts @@ -231,8 +231,6 @@ export interface IContentInitializerEvents { segment : ISegment; /** TimeRanges of the concerned SegmentBuffer after the segment was pushed. */ buffered : TimeRanges | null; - /* The data pushed */ - segmentData : unknown; }; /** * Event emitted when one or multiple inband events (i.e. events inside a diff --git a/src/core/stream/adaptation/adaptation_stream.ts b/src/core/stream/adaptation/adaptation_stream.ts index b199a7fe33..1b6f630540 100644 --- a/src/core/stream/adaptation/adaptation_stream.ts +++ b/src/core/stream/adaptation/adaptation_stream.ts @@ -57,7 +57,7 @@ import { * triggered, to immediately stop all operations the `AdaptationStream` is * doing. */ -export default function AdaptationStream( +export default function AdaptationStream( { playbackObserver, content, options, @@ -66,7 +66,7 @@ export default function AdaptationStream( segmentFetcherCreator, wantedBufferAhead, maxVideoBufferSize } : IAdaptationStreamArguments, - callbacks : IAdaptationStreamCallbacks, + callbacks : IAdaptationStreamCallbacks, parentCancelSignal : CancellationSignal ) : void { const { manifest, period, adaptation } = content; @@ -298,7 +298,7 @@ export default function AdaptationStream( return ; // previous callback has stopped everything by side-effect } - const representationStreamCallbacks : IRepresentationStreamCallbacks = { + const representationStreamCallbacks : IRepresentationStreamCallbacks = { streamStatusUpdate: callbacks.streamStatusUpdate, encryptionDataEncountered: callbacks.encryptionDataEncountered, manifestMightBeOufOfSync: callbacks.manifestMightBeOufOfSync, @@ -346,7 +346,7 @@ export default function AdaptationStream( function createRepresentationStream( representation : Representation, terminateCurrentStream : IReadOnlySharedReference, - representationStreamCallbacks : IRepresentationStreamCallbacks, + representationStreamCallbacks : IRepresentationStreamCallbacks, fnCancelSignal : CancellationSignal ) : void { const bufferGoalCanceller = new TaskCanceller(); diff --git a/src/core/stream/adaptation/types.ts b/src/core/stream/adaptation/types.ts index d571f0ddc0..c10ed4b158 100644 --- a/src/core/stream/adaptation/types.ts +++ b/src/core/stream/adaptation/types.ts @@ -22,8 +22,8 @@ import { } from "../representation"; /** Callbacks called by the `AdaptationStream` on various events. */ -export interface IAdaptationStreamCallbacks - extends Omit, "terminating"> +export interface IAdaptationStreamCallbacks + extends Omit { /** Called as new bitrate estimates are done. */ bitrateEstimateChange(payload : IBitrateEstimateChangePayload) : void; diff --git a/src/core/stream/period/period_stream.ts b/src/core/stream/period/period_stream.ts index e97e7babb5..11f268ad64 100644 --- a/src/core/stream/period/period_stream.ts +++ b/src/core/stream/period/period_stream.ts @@ -480,7 +480,7 @@ function createEmptyAdaptationStream( wantedBufferAhead : IReadOnlySharedReference, bufferType : IBufferType, content : { period : Period }, - callbacks : Pick, "streamStatusUpdate">, + callbacks : Pick, cancelSignal : CancellationSignal ) : void { const { period } = content; diff --git a/src/core/stream/period/types.ts b/src/core/stream/period/types.ts index ebfeab0a96..7af27fac5b 100644 --- a/src/core/stream/period/types.ts +++ b/src/core/stream/period/types.ts @@ -23,7 +23,7 @@ import { IPositionPlaybackObservation } from "../representation"; /** Callbacks called by the `AdaptationStream` on various events. */ export interface IPeriodStreamCallbacks extends - IAdaptationStreamCallbacks + IAdaptationStreamCallbacks { /** * Called when a new `PeriodStream` is ready to start but needs an Adaptation diff --git a/src/core/stream/representation/representation_stream.ts b/src/core/stream/representation/representation_stream.ts index ccd01741be..99e2138772 100644 --- a/src/core/stream/representation/representation_stream.ts +++ b/src/core/stream/representation/representation_stream.ts @@ -89,7 +89,7 @@ export default function RepresentationStream( segmentBuffer, segmentFetcher, terminate } : IRepresentationStreamArguments, - callbacks : IRepresentationStreamCallbacks, + callbacks : IRepresentationStreamCallbacks, parentCancelSignal : CancellationSignal ) : void { const { period, adaptation, representation } = content; diff --git a/src/core/stream/representation/types.ts b/src/core/stream/representation/types.ts index e80ba989ae..5cdfbad69b 100644 --- a/src/core/stream/representation/types.ts +++ b/src/core/stream/representation/types.ts @@ -20,7 +20,7 @@ import { } from "../../segment_buffers"; /** Callbacks called by the `RepresentationStream` on various events. */ -export interface IRepresentationStreamCallbacks { +export interface IRepresentationStreamCallbacks { /** * Called to announce the current status regarding the buffer for its * associated Period and type (e.g. "audio", "video", "text" etc.). @@ -30,7 +30,7 @@ export interface IRepresentationStreamCallbacks { */ streamStatusUpdate(payload : IStreamStatusPayload) : void; /** Called after a new segment has been succesfully added to the SegmentBuffer */ - addedSegment(payload : IStreamEventAddedSegmentPayload) : void; + addedSegment(payload : IStreamEventAddedSegmentPayload) : void; /** Called when a segment with protection information has been encountered. */ encryptionDataEncountered(payload : IContentProtection[]) : void; /** @@ -127,7 +127,7 @@ export interface IStreamStatusPayload { } /** Payload for the `addedSegment` callback. */ -export interface IStreamEventAddedSegmentPayload { +export interface IStreamEventAddedSegmentPayload { /** Context about the content that has been added. */ content: { period : Period; adaptation : Adaptation; @@ -136,8 +136,6 @@ export interface IStreamEventAddedSegmentPayload { segment : ISegment; /** TimeRanges of the concerned SegmentBuffer after the segment was pushed. */ buffered : TimeRanges | null; - /* The data pushed */ - segmentData : T; } /** Structure describing an "inband" event, as found in a media segment. */ diff --git a/src/core/stream/representation/utils/push_init_segment.ts b/src/core/stream/representation/utils/push_init_segment.ts index 03851b863b..8bad92adf5 100644 --- a/src/core/stream/representation/utils/push_init_segment.ts +++ b/src/core/stream/representation/utils/push_init_segment.ts @@ -45,7 +45,6 @@ export default async function pushInitSegment( content, initSegmentUniqueId, segment, - segmentData, segmentBuffer, } : { playbackObserver : IReadOnlyPlaybackObserver< @@ -61,7 +60,7 @@ export default async function pushInitSegment( segmentBuffer : SegmentBuffer; }, cancelSignal : CancellationSignal -) : Promise< IStreamEventAddedSegmentPayload | null > { +) : Promise< IStreamEventAddedSegmentPayload | null > { if (cancelSignal.cancellationError !== null) { throw cancelSignal.cancellationError; } @@ -80,5 +79,5 @@ export default async function pushInitSegment( segmentBuffer, { data, inventoryInfos }, cancelSignal); - return { content, segment, buffered: null, segmentData }; + return { content, segment, buffered: null }; } diff --git a/src/core/stream/representation/utils/push_media_segment.ts b/src/core/stream/representation/utils/push_media_segment.ts index 5db21db6b1..5cbb4de07b 100644 --- a/src/core/stream/representation/utils/push_media_segment.ts +++ b/src/core/stream/representation/utils/push_media_segment.ts @@ -57,7 +57,7 @@ export default async function pushMediaSegment( segment : ISegment; segmentBuffer : SegmentBuffer; }, cancelSignal : CancellationSignal -) : Promise< IStreamEventAddedSegmentPayload | null > { +) : Promise< IStreamEventAddedSegmentPayload | null > { if (parsedSegment.chunkData === null) { return null; } @@ -108,5 +108,5 @@ export default async function pushMediaSegment( segmentBuffer, { data, inventoryInfos }, cancelSignal); - return { content, segment, buffered: null, segmentData: chunkData }; + return { content, segment, buffered: null }; }