Skip to content

Conversation

@DimaDemchenko
Copy link
Contributor

@DimaDemchenko DimaDemchenko commented Oct 21, 2025

Background Information
This pull request includes dependency updates, ESLint configuration improvements, ESLint warning fixes, and type error fixes.

… of an assignment expression, as it is simpler to read @typescript-eslint/prefer-nullish-coalescing
… value of the string @typescript-eslint/no-unnecessary-type-conversion
…t from "react"'; @eslint-react/prefer-namespace-import

& Prefer importing React DOM via a namespace import            @eslint-react/dom/prefer-namespace-import
│ React refs are values that are not needed for rendering. Refs should only be accessed outside of render, such as in event handlers or effects.
… 'initSegment'. In the code we use instance of class MediaSegment which extends Fragment and overrides sn type to number
…gmentReference[]'.

  Type 'SegmentReference | null' is not assignable to type 'SegmentReference'.
    Type 'null' is not assignable to type 'SegmentReference'
…rayBuffer'.

  The types of 'slice(...)[Symbol.toStringTag]' are incompatible between these types.
    Type '"Uint8Array"' is not assignable to type '"ArrayBuffer"'.
start: startTime,
end: endTime,
} = fragment;
if (sn === "initSegment") return;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fragment here is an instance of class MediaFragment.
It overrides type of class Fragment in which sn could be number | "initSegment"


get data(): ArrayBuffer {
if (!this.finalData) this.finalData = Utils.joinChunks(this.bytes);
this.finalData ??= Utils.joinChunks(this.bytes).buffer as ArrayBuffer;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uint8Array.buffer is typed as ArrayBufferLike, which means it could be either an ArrayBuffer or a SharedArrayBuffer.
However, in this case, it will always be a regular ArrayBuffer based on how joinChunks is implemented.

@DimaDemchenko DimaDemchenko marked this pull request as ready for review October 21, 2025 21:13
@DimaDemchenko DimaDemchenko requested a review from mrlika October 21, 2025 21:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants