@vkontakte/videoplayer-core 2.0.79 → 2.0.80

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/index.d.ts CHANGED
@@ -206,6 +206,18 @@ interface IPlayerInfo {
206
206
  * default value: `{}`
207
207
  */
208
208
  availableQualitiesFps$: IValueObservable<FpsByQuality>;
209
+ /**
210
+ * Список доступных аудиодорожек
211
+ *
212
+ * default value: `[]`
213
+ */
214
+ availableAudioTracks$: IValueSubject<IAudioTrack[]>;
215
+ /**
216
+ * Есть ли аудио дорожки
217
+ *
218
+ * default value: true
219
+ */
220
+ isAudioTracksExist$: IValueSubject<boolean>;
209
221
  /**
210
222
  * Реальное качество, в котором сейчас воспроизводится видео.
211
223
  *
@@ -384,6 +396,10 @@ declare enum VideoFormat {
384
396
  HLS_LIVE = "HLS_LIVE",
385
397
  WEB_RTC_LIVE = "WEB_RTC_LIVE"
386
398
  }
399
+ interface IAudioTrack {
400
+ id: string;
401
+ bitrate?: Kbps;
402
+ }
387
403
  interface ITextTrackBase {
388
404
  type: 'external' | 'internal';
389
405
  id: string;
@@ -425,8 +441,11 @@ type PlaybackRate = number;
425
441
 
426
442
  type ITuningConfig = {
427
443
  throughputEstimator: {
444
+ type: 'TwoEma' | 'EmaAndMa';
428
445
  emaAlphaSlow: number;
429
446
  emaAlphaFast: number;
447
+ emaAlpha: number;
448
+ basisTrendChangeCount: number;
430
449
  changeThreshold: number;
431
450
  useBrowserEstimation: boolean;
432
451
  rttPenaltyRequestSize: Byte;
@@ -472,6 +491,7 @@ type ITuningConfig = {
472
491
  minBufferSegments: number;
473
492
  lowLatencyMinBuffer: Milliseconds;
474
493
  lowLatencyMinBufferSegments: number;
494
+ isLiveCatchUpMode: boolean;
475
495
  };
476
496
  enableTelemetryAtStart: boolean;
477
497
  formatsToAvoid: VideoFormat[];
@@ -491,6 +511,7 @@ type ITuningConfig = {
491
511
  requestQuick: boolean;
492
512
  useDashJs: boolean;
493
513
  useHlsJs: boolean;
514
+ isAudioDisabled: boolean;
494
515
  webrtc: {
495
516
  connectionRetryMaxNumber: number;
496
517
  };
@@ -520,6 +541,8 @@ declare class Player implements IPlayer {
520
541
  volume$: ValueSubject<number>;
521
542
  availableQualities$: ValueSubject<VideoQuality[]>;
522
543
  availableQualitiesFps$: ValueSubject<Partial<Record<VideoQuality, number>>>;
544
+ availableAudioTracks$: ValueSubject<IAudioTrack[]>;
545
+ isAudioTracksExist$: ValueSubject<boolean>;
523
546
  currentQuality$: ValueSubject<VideoQuality | undefined>;
524
547
  isAutoQualityEnabled$: ValueSubject<boolean>;
525
548
  autoQualityLimitingAvailable$: ValueSubject<boolean>;
@@ -598,6 +621,7 @@ declare class Player implements IPlayer {
598
621
  toggleChromecast(): void;
599
622
  getExactTime(): Seconds;
600
623
  getAllLogs(): ILogEntry[];
624
+ private setIntrinsicVideoSize;
601
625
  private initDesiredStateSubscriptions;
602
626
  private initProviderContainerSubscription;
603
627
  private initChromecastSubscription;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vkontakte/videoplayer-core",
3
- "version": "2.0.79",
3
+ "version": "2.0.80",
4
4
  "author": "vk.com",
5
5
  "description": "Videoplayer core library based on the vk.com platform",
6
6
  "homepage": "https://vk.com",
@@ -39,7 +39,7 @@
39
39
  "**/*.d.ts"
40
40
  ],
41
41
  "dependencies": {
42
- "@vkontakte/videoplayer-shared": "^1.0.21",
42
+ "@vkontakte/videoplayer-shared": "^1.0.22",
43
43
  "dashjs": "4.5.2",
44
44
  "hls.js": "1.3.4",
45
45
  "lodash": "4.17.21"