@vkontakte/videoplayer-core 2.0.105-dev.3573a175.0 → 2.0.105-dev.65651c8b.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.105-dev.3573a175.0",
3
+ "version": "2.0.105-dev.65651c8b.0",
4
4
  "author": "vk.com",
5
5
  "description": "Videoplayer core library based on the vk.com platform",
6
6
  "homepage": "https://vk.com",
@@ -388,6 +388,7 @@ export interface IConfig {
388
388
  sources: ISources;
389
389
  meta?: IMetadata;
390
390
  failoverHosts?: string[];
391
+ volumeMultiplier?: number;
391
392
  }
392
393
  export interface ISources {
393
394
  [VideoFormat.MPEG]?: IMpegSource;
@@ -10,11 +10,13 @@ interface IParams extends IProviderDependencies {
10
10
  failoverHosts: string[];
11
11
  desiredState: IDesiredState;
12
12
  tuning: ITuningConfig;
13
+ volumeMultiplier?: number;
13
14
  }
14
15
  export default class ProviderContainer implements IProviderContainer {
15
16
  current$: IValueSubject<IProviderEntry>;
16
17
  providerError$: ISubject<IError>;
17
18
  noAvailableProvidersError$: ISubject<VideoFormat | undefined>;
19
+ volumeMultiplierError$: ISubject<IError>;
18
20
  providerOutput: IProviderOutput;
19
21
  private subscription;
20
22
  private screenFormatsIterator;
@@ -22,6 +24,7 @@ export default class ProviderContainer implements IProviderContainer {
22
24
  private log;
23
25
  private params;
24
26
  private failoverIndex;
27
+ private volumeMultiplierManager;
25
28
  constructor(params: IParams);
26
29
  init(): void;
27
30
  destroy(): void;
@@ -5,6 +5,7 @@ export interface IProviderContainer {
5
5
  current$: IValueObservable<IProviderEntry>;
6
6
  providerError$: ISubject<IError>;
7
7
  noAvailableProvidersError$: ISubject<VideoFormat | undefined>;
8
+ volumeMultiplierError$: ISubject<IError>;
8
9
  providerOutput: IProviderOutput;
9
10
  init(): void;
10
11
  destroy(): void;
@@ -80,4 +80,5 @@ export interface IProviderOutput {
80
80
  is3DVideo$: ISubject<boolean>;
81
81
  inPiP$: IValueSubject<boolean>;
82
82
  inFullscreen$: IValueSubject<boolean>;
83
+ playbackState$: IValueSubject<PlaybackState | string>;
83
84
  }
@@ -0,0 +1,17 @@
1
+ import { IError, ISubject, IValueSubject } from '@vkontakte/videoplayer-shared';
2
+ import { IProviderOutput } from '../../providers/types';
3
+ import { IProviderEntry } from '../../providers/ProviderContainer/types';
4
+ export declare class VolumeMultiplierManager {
5
+ private providerOutput;
6
+ private provider$;
7
+ private volumeMultiplierError$;
8
+ private volumeMultiplier;
9
+ private static errorId;
10
+ private subscriptions;
11
+ private lastAudioContextResumeId;
12
+ constructor(providerOutput: IProviderOutput, provider$: IValueSubject<IProviderEntry>, volumeMultiplierError$: ISubject<IError>, volumeMultiplier: number, enabled: boolean);
13
+ private subscribe;
14
+ private isSupported;
15
+ private initAudioContextOnce;
16
+ destroy(): void;
17
+ }
@@ -0,0 +1,9 @@
1
+ interface IAudioContext {
2
+ audioCtx: AudioContext;
3
+ gainNode: GainNode;
4
+ }
5
+ /**
6
+ * Возвращает AudioContext
7
+ */
8
+ export declare function getAudioContext(): IAudioContext;
9
+ export {};
@@ -0,0 +1 @@
1
+ export { VolumeMultiplierManager } from './VolumeMultiplierManager';
@@ -157,6 +157,7 @@ export type ITuningConfig = {
157
157
  speedFadeTime: Milliseconds;
158
158
  speedFadeThreshold: Milliseconds;
159
159
  };
160
+ useVolumeMultiplier: boolean;
160
161
  };
161
162
  export type IOptionalTuningConfig = RecursivePartial<ITuningConfig> & {
162
163
  configName: ITuningConfig['configName'];