@wscsports/blaze-web-sdk 0.26.0 → 0.27.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wscsports/blaze-web-sdk",
3
- "version": "0.26.0",
3
+ "version": "0.27.0",
4
4
  "main": "publish/index",
5
5
  "types": "publish/index",
6
6
  "files": [
@@ -4372,6 +4372,15 @@ export declare function validateLoggerConfigurationDetailed(config: ILoggerConfi
4372
4372
  export declare function sanitizeBatchSizeConfiguration(config: ILoggerConfiguration): ILoggerConfiguration;
4373
4373
  export declare function shouldIgnoreLog(logIdentifier: string, ignoredLogs: IIgnoredLog[]): boolean;
4374
4374
 
4375
+ export declare class HLSQualityManager {
4376
+ private static readonly DURATION;
4377
+ private static memory;
4378
+ static remember(level: number): void;
4379
+ static recall(): number;
4380
+ static shouldUseMemory(): boolean;
4381
+ static clear(): void;
4382
+ }
4383
+
4375
4384
  export * from './commands/player-buttons.command';
4376
4385
  export * from './commands/video-commands';
4377
4386
  export * from './components/timer';
@@ -4387,6 +4396,7 @@ export * from './strategy/long-form-hls.strategy';
4387
4396
  export * from './strategy/base-hls.strategy';
4388
4397
  export * from './strategy/short-form-hls.strategy';
4389
4398
  export * from './strategy/native-video.strategy';
4399
+ export * from './hls-quality-manager';
4390
4400
  export * from './interface/playback-strategy.interface';
4391
4401
  export * from './video-events';
4392
4402
 
@@ -5014,32 +5024,32 @@ export interface HLSConfig {
5014
5024
  }
5015
5025
  export declare const HLS_CONFIGS: {
5016
5026
  readonly LONG_FORM: {
5017
- readonly maxBufferLength: 30;
5018
- readonly maxMaxBufferLength: 30;
5027
+ readonly abrEwmaFastLive: 2;
5028
+ readonly abrEwmaSlowLive: 3;
5029
+ readonly abrEwmaFastVoD: 2;
5030
+ readonly abrEwmaSlowVoD: 3;
5031
+ readonly abrBandWidthFactor: 0.95;
5032
+ readonly abrBandWidthUpFactor: 0.9;
5033
+ readonly fragLoadingMaxRetry: 3;
5034
+ readonly fragLoadingRetryDelay: 100;
5035
+ readonly maxBufferLength: 15;
5036
+ readonly maxMaxBufferLength: 20;
5019
5037
  readonly maxBufferSize: number;
5020
5038
  readonly maxBufferHole: 4;
5021
- readonly fragLoadingMaxRetry: 5;
5022
- readonly fragLoadingRetryDelay: 1000;
5023
- readonly abrEwmaFastLive: 3;
5024
- readonly abrEwmaSlowLive: 9;
5025
- readonly abrEwmaFastVoD: 3;
5026
- readonly abrEwmaSlowVoD: 9;
5027
- readonly abrBandWidthFactor: 0.95;
5028
- readonly abrBandWidthUpFactor: 0.7;
5029
5039
  };
5030
5040
  readonly SHORT_FORM: {
5031
- readonly maxBufferLength: 3;
5032
- readonly maxMaxBufferLength: 5;
5041
+ readonly abrEwmaFastLive: 2;
5042
+ readonly abrEwmaSlowLive: 3;
5043
+ readonly abrEwmaFastVoD: 2;
5044
+ readonly abrEwmaSlowVoD: 3;
5045
+ readonly abrBandWidthFactor: 0.95;
5046
+ readonly abrBandWidthUpFactor: 0.9;
5047
+ readonly fragLoadingMaxRetry: 3;
5048
+ readonly fragLoadingRetryDelay: 100;
5049
+ readonly maxBufferLength: 5;
5050
+ readonly maxMaxBufferLength: 8;
5033
5051
  readonly maxBufferSize: number;
5034
5052
  readonly maxBufferHole: 0.5;
5035
- readonly fragLoadingMaxRetry: 2;
5036
- readonly fragLoadingRetryDelay: 200;
5037
- readonly abrEwmaFastLive: 1;
5038
- readonly abrEwmaSlowLive: 2;
5039
- readonly abrEwmaFastVoD: 1;
5040
- readonly abrEwmaSlowVoD: 2;
5041
- readonly abrBandWidthFactor: 0.9;
5042
- readonly abrBandWidthUpFactor: 0.8;
5043
5053
  };
5044
5054
  };
5045
5055
  export declare abstract class BaseHLSStrategy extends BasePlaybackStrategy {
@@ -5052,13 +5062,13 @@ export declare abstract class BaseHLSStrategy extends BasePlaybackStrategy {
5052
5062
  protected loaderTimeout?: ReturnType<typeof setTimeout>;
5053
5063
  protected recoveryTimeout?: ReturnType<typeof setTimeout>;
5054
5064
  protected seekRecoveryListener?: () => void;
5055
- protected boundOnManifestParsed: () => void;
5056
5065
  protected boundOnBufferAppended: () => void;
5057
5066
  protected boundOnFragParsed: () => void;
5058
5067
  protected boundOnLoadedMetadata: () => void;
5059
5068
  protected boundOnPlaying: () => void;
5060
5069
  protected boundOnCanPlay: () => void;
5061
5070
  protected boundOnError: (event: any, data: any) => void;
5071
+ protected boundOnLevelSwitched: (event: any, data: any) => void;
5062
5072
  protected boundOnNativeError: (e: Event) => void;
5063
5073
  constructor(video: HTMLVideoElement);
5064
5074
  abstract initialize(options?: any): void;
@@ -5090,11 +5100,11 @@ export declare abstract class BaseHLSStrategy extends BasePlaybackStrategy {
5090
5100
  protected handlePlaybackTimeout(): void;
5091
5101
  protected handleSeekRecovery(seekTime: number): void;
5092
5102
  protected isSlowConnection(): boolean;
5093
- protected handleManifestParsed(): void;
5094
5103
  protected handleBufferAppended(): void;
5095
5104
  protected handleFragParsed(): void;
5096
5105
  protected handleError(event: any, data: any): void;
5097
5106
  protected handlePlaying(): void;
5107
+ protected handleLevelSwitched(event: any, data: any): void;
5098
5108
  protected handleNativeError(e: Event): void;
5099
5109
  protected handleLoadedMetadata(): void;
5100
5110
  protected getBufferProgress(): number;
@@ -5152,6 +5162,7 @@ export declare class LongFormHlsStrategy extends BaseHLSStrategy {
5152
5162
  private videoOverlay?;
5153
5163
  initialize(options?: PlaybackStrategyOptions): void;
5154
5164
  private configureVideoElement;
5165
+ protected setupHLSInstance(src: string, startingTime: number): void;
5155
5166
  protected onLoadingState(): void;
5156
5167
  protected onBufferUpdate(progress: number): void;
5157
5168
  protected onError(event: any, data: any): void;
@@ -5219,6 +5230,9 @@ export declare class ShortFormHLSStrategy extends BaseHLSStrategy {
5219
5230
  private lastProgressTime;
5220
5231
  private lastCurrentTime;
5221
5232
  private boundOnTimeUpdate;
5233
+ private readonly MIN_BUFFER_BEFORE_RECOVERY;
5234
+ private lastRecoveryAttempt;
5235
+ private readonly RECOVERY_COOLDOWN;
5222
5236
  initialize(options?: PlaybackStrategyOptions): void;
5223
5237
  protected setupEventListeners(): void;
5224
5238
  protected setupHLSInstance(src: string, startingTime: number): void;
@@ -5230,6 +5244,7 @@ export declare class ShortFormHLSStrategy extends BaseHLSStrategy {
5230
5244
  protected onBufferUpdate(progress: number): void;
5231
5245
  protected handlePlaying(): void;
5232
5246
  protected handlePause(): void;
5247
+ protected handlePlaybackTimeout(): void;
5233
5248
  protected onError(event: any, data: any): void;
5234
5249
  protected handleError(event: any, data: any): void;
5235
5250
  protected handleSeekRecovery(seekTime: number): void;
@@ -5241,6 +5256,10 @@ export declare class ShortFormHLSStrategy extends BaseHLSStrategy {
5241
5256
  private startProgressBasedLoaderCleanup;
5242
5257
  private stopProgressBasedLoaderCleanup;
5243
5258
  private checkVideoProgressAndCleanupLoader;
5259
+ private getBufferAhead;
5260
+ private shouldTriggerRecovery;
5261
+ private tryForceLowestQuality;
5262
+ private canAttemptRecovery;
5244
5263
  }
5245
5264
 
5246
5265
  export * from './widget-video-base';