@vkontakte/videoplayer-core 2.0.134-dev.ca4b9a20.0 → 2.0.134-dev.ddf0760d.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.134-dev.ca4b9a20.0",
3
+ "version": "2.0.134-dev.ddf0760d.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,7 +54,6 @@
54
54
  "**/*.d.ts"
55
55
  ],
56
56
  "dependencies": {
57
- "@vkontakte/videoplayer-shared": "1.0.62-dev.656a0916.0",
58
- "hls.js": "~1.4.7"
57
+ "@vkontakte/videoplayer-shared": "1.0.62-dev.57df0d6d.0"
59
58
  }
60
59
  }
@@ -127,7 +127,7 @@ export default class Player implements IPlayer {
127
127
  */
128
128
  seekPercent(percent: number): IPlayer;
129
129
  setVolume(percent: number, desiredMuted?: boolean): IPlayer;
130
- setMuted(muted: boolean): IPlayer;
130
+ setMuted(muted: boolean, forced?: boolean): IPlayer;
131
131
  setVideoStream(stream: IVideoStream): IPlayer;
132
132
  setAudioStream(stream: IAudioStream): IPlayer;
133
133
  setQuality(quality: VideoQuality): IPlayer;
@@ -32,7 +32,12 @@ export interface IPlayer {
32
32
  * @param percent: number [0; 1]
33
33
  */
34
34
  setVolume(percent: number, muted?: boolean): IPlayer;
35
- setMuted(muted: boolean): IPlayer;
35
+ /**
36
+ * @param muted Флаг, отражающий нужно ли сделать мьют.
37
+ * @param forced Флаг, который игнорирует внутренние механики простановки mute значения
38
+ * и ставит то значение, которое передали в функцию.
39
+ */
40
+ setMuted(muted: boolean, forced?: boolean): IPlayer;
36
41
  setAudioStream(stream: IVideoStream): IPlayer;
37
42
  setVideoStream(stream: IVideoStream): IPlayer;
38
43
  setQuality(quality: VideoQuality): IPlayer;
@@ -3,9 +3,11 @@ import { IStateMachine } from '../../../utils/StateMachine/types';
3
3
  import { Milliseconds } from '@vkontakte/videoplayer-shared';
4
4
  import { IRepresentation, State } from '../types';
5
5
  import { Subject } from '@vkontakte/videoplayer-shared';
6
+ import { PlaybackState } from '../../../player/types';
6
7
  interface IParams {
7
8
  videoElement: HTMLVideoElement;
8
9
  videoState: IStateMachine<State>;
10
+ playbackState: IStateMachine<PlaybackState>;
9
11
  liveOffset: ILiveOffset;
10
12
  playerCallback: (...args: any) => void;
11
13
  config: {
@@ -1,7 +1,7 @@
1
1
  import { VideoFormat } from '../../../player/types';
2
2
  import { type ITuningConfig } from '../../../utils/tuningConfig';
3
- type FilterConstraints = Pick<ITuningConfig, 'useHlsJs' | 'useManagedMediaSource' | 'useOldMSEDetection'>;
4
- export declare const filterAvailableFormats: (formats: VideoFormat[], { useHlsJs, useManagedMediaSource, useOldMSEDetection }: FilterConstraints) => VideoFormat[];
3
+ type FilterConstraints = Pick<ITuningConfig, 'useManagedMediaSource' | 'useOldMSEDetection'>;
4
+ export declare const filterAvailableFormats: (formats: VideoFormat[], { useManagedMediaSource, useOldMSEDetection }: FilterConstraints) => VideoFormat[];
5
5
  type VodFormat = VideoFormat.MPEG | VideoFormat.DASH_SEP | VideoFormat.DASH_WEBM | VideoFormat.DASH_WEBM_AV1 | VideoFormat.DASH_STREAMS | VideoFormat.DASH_ONDEMAND | VideoFormat.HLS | VideoFormat.HLS_ONDEMAND;
6
6
  type Constraints = Pick<ITuningConfig, 'webmCodec' | 'androidPreferredFormat' | 'preferCMAF' | 'preferWebRTC' | 'preferMultiStream'>;
7
7
  /**
@@ -103,7 +103,6 @@ export type ITuningConfig = {
103
103
  sourceOpenTimeout: number;
104
104
  vktvAbrThrottle: number;
105
105
  timeupdateEventTickThrottle: number;
106
- useOldFetherInNewDashProvider: boolean;
107
106
  };
108
107
  dashCmafLive: {
109
108
  maxActiveLiveOffset: Milliseconds;
@@ -174,6 +173,7 @@ export type ITuningConfig = {
174
173
  stallIgnoreThreshold: Milliseconds;
175
174
  gapWatchdogInterval: Milliseconds;
176
175
  requestQuick: boolean;
176
+ /** @deprecated HLS.js удалён, флаг ничего не делает */
177
177
  useHlsJs: boolean;
178
178
  useNativeHLSTextTracks: boolean;
179
179
  useManagedMediaSource: boolean;
@@ -1,24 +0,0 @@
1
- import { IHLSSource } from '../../player/types';
2
- import { IProvider, IProviderParams } from '../../providers/types';
3
- type Params = IProviderParams<IHLSSource>;
4
- export default class HlsJsProvider implements IProvider {
5
- private subscription;
6
- private videoState;
7
- private video;
8
- private params;
9
- private hls;
10
- private textTracksManager;
11
- private trackLevels;
12
- constructor(params: Params);
13
- destroy(): void;
14
- private loadHlsJs;
15
- private init;
16
- private subscribe;
17
- private syncPlayback;
18
- private prepare;
19
- private playIfAllowed;
20
- private pause;
21
- private seek;
22
- private stop;
23
- }
24
- export {};