Skip to content

Commit

Permalink
Fix linting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
peaBerberian committed Sep 15, 2023
1 parent aacb08c commit a3d16f0
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/compat/is_worker.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable-next-line @typescript-eslint/no-explicit-any */
declare const WorkerGlobalScope : any | undefined;
declare const WorkerGlobalScope : any;

/**
* `true` if the current code is running in a WebWorker.
Expand Down
2 changes: 2 additions & 0 deletions src/core/api/track_management/track_dispatcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,10 @@ export default class TrackDispatcher extends EventEmitter<ITrackDispatcherEvent>

function updateReferenceIfNeeded() : void {
const repSettings = trackInfo.lockedRepresentations.getValue();
/* eslint-disable @typescript-eslint/no-duplicate-type-constituents */
let switchingMode : IAudioRepresentationsSwitchingMode |
IVideoRepresentationsSwitchingMode;
/* eslint-enable @typescript-eslint/no-duplicate-type-constituents */

/** Representations for which a `RepresentationStream` can be created. */
let playableRepresentations;
Expand Down
4 changes: 2 additions & 2 deletions src/core/api/track_management/tracks_store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ export default class TracksStore extends EventEmitter<ITracksStoreEvents> {

// We assume that they are always sorted chronologically
// In dev mode, perform a runtime check that this is the case
if (__ENVIRONMENT__.CURRENT_ENV === __ENVIRONMENT__.DEV as number) {
if (__ENVIRONMENT__.CURRENT_ENV as number === __ENVIRONMENT__.DEV as number) {
for (let i = 1; i < periods.length; i++) {
assert(periods[i - 1].start <= periods[i].start);
}
Expand Down Expand Up @@ -1015,7 +1015,7 @@ export default class TracksStore extends EventEmitter<ITracksStoreEvents> {
private _removePeriodObject(
index : number
) {
if (__ENVIRONMENT__.CURRENT_ENV === __ENVIRONMENT__.DEV as number) {
if (__ENVIRONMENT__.CURRENT_ENV as number === __ENVIRONMENT__.DEV as number) {
assert(index < this._storedPeriodInfo.length, "Invalid index for Period removal");
}
const oldPeriodItem = this._storedPeriodInfo[index];
Expand Down
2 changes: 2 additions & 0 deletions src/core/stream/representation/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,8 @@ export interface IRepresentationsChoice {
* How the Streams should react if another, not currently authorized,
* Representation was previously playing.
*/
/* eslint-disable @typescript-eslint/no-duplicate-type-constituents */
switchingMode : IVideoRepresentationsSwitchingMode |
IAudioRepresentationsSwitchingMode;
/* eslint-enable @typescript-eslint/no-duplicate-type-constituents */
}
4 changes: 4 additions & 0 deletions src/public_types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -922,19 +922,23 @@ export interface IBrokenRepresentationsLockContext {
export interface ITrackUpdateEventPayload {
period : IPeriod;
trackType : ITrackType;
/* eslint-disable @typescript-eslint/no-redundant-type-constituents */
reason : "missing" | // Missing from Manifest update
"manual" | // Manually and explicitely updated
"trickmode-enabled" | // Video trickmode tracks being enabled
"trickmode-disabled" | // Video trickmode tracks being disabled
"no-playable-representation" | // Previous track had no playable Representation
string;
/* eslint-enable @typescript-eslint/no-redundant-type-constituents */
}

export interface IRepresentationListUpdateContext {
period : IPeriod;
trackType : ITrackType;
/* eslint-disable @typescript-eslint/no-redundant-type-constituents */
reason : "decipherability-update" |
string;
/* eslint-enable @typescript-eslint/no-redundant-type-constituents */
}

export interface ILockedVideoRepresentationsSettings {
Expand Down

0 comments on commit a3d16f0

Please sign in to comment.