@vkontakte/videoplayer-core 2.0.140 → 2.0.141-dev.02be9553.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": "@vkontakte/videoplayer-core",
3
- "version": "2.0.140",
3
+ "version": "2.0.141-dev.02be9553.0",
4
4
  "author": "vk.com",
5
5
  "description": "Videoplayer core library based on the vk.com platform",
6
6
  "homepage": "https://vk.com",
@@ -54,6 +54,6 @@
54
54
  "**/*.d.ts"
55
55
  ],
56
56
  "dependencies": {
57
- "@vkontakte/videoplayer-shared": "1.0.68"
57
+ "@vkontakte/videoplayer-shared": "1.0.69-dev.02be9553.0"
58
58
  }
59
59
  }
@@ -1,6 +1,7 @@
1
1
  import { IOptionalTuningConfig } from '../utils/tuningConfig';
2
2
  import { IError, ILogEntry, Seconds, Subject, ValueSubject, QualityLimits, VideoQuality, ITracer } from '@vkontakte/videoplayer-shared';
3
3
  import { ChromecastState, HttpConnectionType, IAudioStream, IConfig, ICueSettings, IExternalTextTrack, IPlayer, ISeekRequest, ISources, ITextTrack, IVideoStream, PlaybackRate, PlaybackState, PredefinedQualityLimits, StartEnd, Surface, VideoFormat } from './types';
4
+ import { IPlayerOptions } from '../utils/playerOptions';
4
5
  export default class Player implements IPlayer {
5
6
  private subscription;
6
7
  private domContainer;
@@ -119,7 +120,7 @@ export default class Player implements IPlayer {
119
120
  dumpTelemetry: (receiver: (value: Record<string, any>) => void) => void;
120
121
  getCurrentTime$: ValueSubject<null>;
121
122
  };
122
- constructor(tuning?: IOptionalTuningConfig, tracer?: ITracer);
123
+ constructor(tuning?: IOptionalTuningConfig, tracer?: ITracer, playerOptions?: IPlayerOptions);
123
124
  initVideo(config: IConfig): IPlayer;
124
125
  destroy(): void;
125
126
  prepare(): IPlayer;
@@ -9,6 +9,7 @@ export default class HlsProvider implements IProvider {
9
9
  private textTracksManager;
10
10
  private masterManifest;
11
11
  private manifests$;
12
+ private unmuteAfterBrowserResetsHappened;
12
13
  constructor(params: Params);
13
14
  private selectManifest;
14
15
  private subscribe;
@@ -0,0 +1,22 @@
1
+ import { ISubscription, IValueSubject } from '@vkontakte/videoplayer-shared';
2
+ import { IDesiredState } from '../types';
3
+ import { IObservableVideo } from './HTMLVideoElement/observable';
4
+ type Params = {
5
+ subscription: ISubscription;
6
+ desiredState: IDesiredState;
7
+ videoElement$: IValueSubject<HTMLVideoElement | undefined>;
8
+ observableVideo: IObservableVideo;
9
+ };
10
+ /**
11
+ * Когда сафари из за медиа политик отключает звук у видео, и пользователь возвращает звук
12
+ * то сафари расценивает это как сброс внутреннего состояния плеера и может сбросить так же скорость воспроизведения.
13
+ *
14
+ * Ключевые моменты:
15
+ * - Когда сафари форсом делает mute, то у нас разъезжается desiredState.volume;
16
+ * - Когда сафари форсом переводит в дефолт скорость произведения, у нас разъезжается desiredState.playbackRate.
17
+ *
18
+ * Нужно поймать следующую цепочку событий:
19
+ * Пользователь сделал unmute -> Изменился playbackRate -> Считаем, что это Сафари поведение, сверяем desiredState.playbackRate.
20
+ */
21
+ export declare const restorePlaybackRateInSafari: ({ subscription, desiredState, videoElement$, observableVideo }: Params) => void;
22
+ export {};
@@ -0,0 +1,3 @@
1
+ export type IPlayerOptions = {
2
+ playerId?: string;
3
+ };
@@ -112,6 +112,7 @@ export type ITuningConfig = {
112
112
  codecsPrioritizeEnabled: boolean;
113
113
  usePersistentGaps: boolean;
114
114
  abrThrottle: number;
115
+ useVideoElementWaitingCurrentTimeReassign: boolean;
115
116
  };
116
117
  dashCmafLive: {
117
118
  maxActiveLiveOffset: Milliseconds;