@vkontakte/videoplayer-core 2.0.127-dev.0fa08f48.0 → 2.0.127-dev.af27c500.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.127-dev.0fa08f48.0",
3
+ "version": "2.0.127-dev.af27c500.0",
4
4
  "author": "vk.com",
5
5
  "description": "Videoplayer core library based on the vk.com platform",
6
6
  "homepage": "https://vk.com",
@@ -49,7 +49,7 @@
49
49
  "**/*.d.ts"
50
50
  ],
51
51
  "dependencies": {
52
- "@vkontakte/videoplayer-shared": "^1.0.54",
52
+ "@vkontakte/videoplayer-shared": "1.0.55-dev.a2b072f9.0",
53
53
  "hls.js": "~1.4.7"
54
54
  }
55
55
  }
@@ -46,7 +46,6 @@ export default class Player implements IPlayer {
46
46
  isEnded$: ValueSubject<boolean>;
47
47
  isLooped$: ValueSubject<boolean>;
48
48
  isLive$: ValueSubject<boolean | undefined>;
49
- isLiveEnded$: ValueSubject<boolean | null>;
50
49
  canChangePlaybackSpeed$: ValueSubject<boolean | undefined>;
51
50
  atLiveEdge$: ValueSubject<boolean | undefined>;
52
51
  atLiveDurationEdge$: ValueSubject<boolean | undefined>;
@@ -310,10 +310,6 @@ export interface IPlayerInfo {
310
310
  * Бесконечный ли стрим
311
311
  */
312
312
  isLive$: IValueObservable<boolean | undefined>;
313
- /**
314
- * Был ли завершен бесконечный стрим
315
- */
316
- isLiveEnded$: IValueObservable<boolean | null>;
317
313
  /**
318
314
  * Доступно ли ускоренное воспроизведении в лайв трансляции
319
315
  */
@@ -5,6 +5,7 @@ import { TrackHistory } from '../../utils/autoSelectTrack';
5
5
  import { IStateMachine } from '../../utils/StateMachine/types';
6
6
  import { ISubscription, Milliseconds, ITracer } from '@vkontakte/videoplayer-shared';
7
7
  import { Player } from './lib/player';
8
+ import { ILiveOffset } from '../utils/LiveOffset/types';
8
9
  import { Scene3D } from '../../utils/3d/Scene3D';
9
10
  import DroppedFramesManager from '../../providers/utils/HTMLVideoElement/DroppedFramesManager';
10
11
  import TextTrackManager from '../../providers/utils/HTMLVideoElement/TextTrackManager';
@@ -41,6 +42,7 @@ export default abstract class BaseDashProvider implements IProvider {
41
42
  protected audioStreamsMap: Map<Stream, IAudioTrack[]>;
42
43
  protected videoTrackSwitchHistory: TrackHistory<IVideoTrack>;
43
44
  protected audioTrackSwitchHistory: TrackHistory<import("../../player/types").IBaseTrack>;
45
+ protected liveOffset?: ILiveOffset;
44
46
  constructor(params: IParams);
45
47
  protected abstract seek(position: Milliseconds, forcePrecise: boolean): void;
46
48
  protected getProviderSubscriptionInfo(): IProviderSubscriptionInfo;
@@ -1,3 +1,3 @@
1
1
  export declare const DASH_LIVE_UPDATE_INTERVAL_MS = 1000;
2
2
  export declare const DASH_STALL_UPDATE_INTERVAL_MS = 50;
3
- export declare const DASH_LIVE_STALL_REINIT_INTERVAL_MS = 2000;
3
+ export declare const DASH_LIVE_STALL_REINIT_INTERVAL_MS = 5000;
@@ -1,9 +1,9 @@
1
1
  import { HttpConnectionType } from '../../../player/types';
2
- import { CommonInit, LiveStreamStatus, Manifest, Representation, StreamKind, TextRepresentation } from './types';
2
+ import { CommonInit, Manifest, Representation, StreamKind, TextRepresentation } from './types';
3
3
  import StateMachine from '../../../utils/StateMachine/StateMachine';
4
4
  import type ThroughputEstimator from '../../../utils/ThroughputEstimator';
5
5
  import { ITuningConfig } from '../../../utils/tuningConfig';
6
- import { IError, ISubject, ITracer, IValueSubject, Milliseconds, Subject } from '@vkontakte/videoplayer-shared';
6
+ import { IError, ISubject, ITracer, IValueSubject, Milliseconds, Seconds, Subject } from '@vkontakte/videoplayer-shared';
7
7
  export declare enum State {
8
8
  NONE = "none",
9
9
  MANIFEST_READY = "manifest_ready",
@@ -46,9 +46,7 @@ export declare class Player {
46
46
  isActiveLive$: IValueSubject<boolean>;
47
47
  isLowLatency$: IValueSubject<boolean>;
48
48
  liveDuration$: IValueSubject<Milliseconds>;
49
- liveSeekableDuration$: IValueSubject<Milliseconds>;
50
- liveAvailabilityStartTime$: IValueSubject<Milliseconds>;
51
- liveStreamStatus$: IValueSubject<LiveStreamStatus | undefined>;
49
+ liveAvailabilityStartTime$: IValueSubject<Seconds | undefined>;
52
50
  bufferLength$: IValueSubject<Milliseconds>;
53
51
  liveLatency$: IValueSubject<Milliseconds | undefined>;
54
52
  liveLoadBufferLength$: IValueSubject<Milliseconds>;
@@ -57,15 +55,14 @@ export declare class Player {
57
55
  videoLastDataObtainedTimestamp$: IValueSubject<Milliseconds>;
58
56
  fetcherRecoverableError$: Subject<IError>;
59
57
  fetcherError$: Subject<IError>;
60
- private liveStreamEndTimestamp;
61
58
  private liveBuffer;
62
59
  private isUpdatingLive;
63
60
  private isJumpGapAfterSeekLive;
61
+ private liveLastSeekOffset;
64
62
  private forceEnded$;
65
63
  private gapWatchdogActive;
66
64
  private gapWatchdogSubscription;
67
65
  private stallWatchdogSubscription;
68
- private livePauseWatchdogSubscription;
69
66
  private destroyController;
70
67
  constructor(params: Params);
71
68
  initManifest: (param_0: HTMLVideoElement, param_1: string, param_2: number) => Promise<void | undefined>;
@@ -13,11 +13,6 @@ export declare enum LiveStatus {
13
13
  LiveForwardBuffering = "live_forward_buffering",
14
14
  None = "none"
15
15
  }
16
- export declare enum LiveStreamStatus {
17
- Active = "active",
18
- UnexpectedlyDown = "unexpectedly_down",// Стрим в сети, но трансляция оборвалась из-за тех. проблем
19
- Unpublished = "unpublished"
20
- }
21
16
  export declare enum Profile {
22
17
  WEBM_AS_IN_SPEC = "urn:mpeg:dash:profile:webm-on-demand:2012",// Такой указан в спеке
23
18
  WEBM_AS_IN_FFMPEG = "urn:webm:dash:profile:webm-on-demand:2012"
@@ -104,20 +99,14 @@ export interface Stream {
104
99
  mime: string;
105
100
  representations: Representation[];
106
101
  }
107
- export interface LiveMetadata {
108
- availabilityStartTime: Milliseconds;
109
- publishTime: Milliseconds;
110
- latestSegmentPublishTime: Milliseconds;
111
- streamIsAlive: boolean;
112
- streamIsUnpublished: boolean;
113
- }
114
102
  export interface Manifest {
103
+ dynamic: boolean;
104
+ liveAvailabilityStartTime: Milliseconds | undefined;
115
105
  duration: Milliseconds | undefined;
116
106
  streams: {
117
107
  [key in StreamKind]: Stream[];
118
108
  };
119
109
  baseUrls: string[];
120
- live?: LiveMetadata;
121
110
  }
122
111
  export declare enum ProjectionType {
123
112
  RECTANGULAR = 0,
@@ -67,7 +67,6 @@ export interface IProviderOutput {
67
67
  currentBuffer$: IValueSubject<IRange<Seconds> | undefined>;
68
68
  isBuffering$: IValueSubject<boolean>;
69
69
  isLive$: IValueSubject<boolean | undefined>;
70
- isLiveEnded$: IValueSubject<boolean | null>;
71
70
  isLowLatency$: IValueSubject<boolean | undefined>;
72
71
  liveTime$: IValueSubject<Milliseconds | undefined>;
73
72
  liveBufferTime$: IValueSubject<Milliseconds | undefined>;