@vkontakte/videoplayer-statistics 1.0.113-dev.652aecfe7.0 → 1.0.113-dev.9dd0ca0bc.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/es2015.cjs +3 -3
- package/es2015.esm.js +3 -3
- package/esnext.cjs +3 -3
- package/esnext.esm.js +3 -3
- package/evergreen.esm.js +3 -3
- package/package.json +6 -6
- package/types/oneStat/OneStat.d.ts +3 -3
- package/types/oneStat/index.d.ts +2 -1
- package/types/oneStat/playerAdapter.d.ts +7 -0
- package/types/oneStat/utils/watchCoverage.d.ts +2 -2
- package/types/shared/useModeController.d.ts +5 -2
- package/types/thinOneStat/ThinOneStat.d.ts +3 -3
- package/types/thinOneStat/index.d.ts +1 -0
- package/types/thinOneStat/playerAdapter.d.ts +8 -0
- package/types/thinOneStat/utils/calculateTotalViewTime.d.ts +3 -2
- package/types/thinOneStat/utils/downloadBytes.d.ts +2 -2
- package/types/thinOneStat/utils/telemetry.d.ts +2 -2
- package/types/thinOneStat/utils/watchCoverage.d.ts +2 -2
- package/types/thinOneStat/utils/watchedN.d.ts +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { IError, IObservable, ISubject, ISubscription, IValueObservable, IValueSubject, Milliseconds } from "@vkontakte/videoplayer-shared";
|
|
2
2
|
import { ErrorCategory } from "@vkontakte/videoplayer-shared";
|
|
3
|
-
import type {
|
|
3
|
+
import type { IThinOneStatPlayerAdapter } from "./playerAdapter";
|
|
4
4
|
import type { IOptionalConfig } from "./config";
|
|
5
5
|
import type { Mode, Quality, Visibility, ConnectionType, ContentType } from "./values";
|
|
6
6
|
import { ActionSeekType, AutoQuality } from "./values";
|
|
@@ -27,7 +27,7 @@ export interface IThinOneStat {
|
|
|
27
27
|
/**
|
|
28
28
|
* Привязываемся к событиям и разным изменениям состояний плеера
|
|
29
29
|
*/
|
|
30
|
-
attachTo(player:
|
|
30
|
+
attachTo(player: IThinOneStatPlayerAdapter, adsEvents: IAdsEvents): ISubscription;
|
|
31
31
|
attachToUi(uiEvents: IUIEvents): ISubscription;
|
|
32
32
|
attachToAds(adsEvents: IAdsEvents): ISubscription;
|
|
33
33
|
/**
|
|
@@ -349,7 +349,7 @@ export declare class ThinOneStat implements IThinOneStat {
|
|
|
349
349
|
authorize(authToken?: string): void;
|
|
350
350
|
reportError(payload: IReportErrorPayload): void;
|
|
351
351
|
updateContext(newContext: Partial<IStatContext>): void;
|
|
352
|
-
attachTo(player:
|
|
352
|
+
attachTo(player: IThinOneStatPlayerAdapter, adsEvents: IAdsEvents): ISubscription;
|
|
353
353
|
attachToUi(events: IUIEvents): ISubscription;
|
|
354
354
|
attachToAds(events: IAdsEvents): ISubscription;
|
|
355
355
|
getDeviceId(): string;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { ThinOneStat } from "./ThinOneStat";
|
|
2
2
|
export type { IThinOneStat, IStatContext } from "./ThinOneStat";
|
|
3
|
+
export type { IThinOneStatPlayerAdapter } from "./playerAdapter";
|
|
3
4
|
export { ActionSeekType } from "./values";
|
|
4
5
|
export type { ActionQualityType } from "./values";
|
|
5
6
|
export type { IUIEvents } from "./events";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { IPlayer, IPlayerInfo, IPlayerEvents } from "@vkontakte/videoplayer-core";
|
|
2
|
+
export interface IThinOneStatPlayerAdapter {
|
|
3
|
+
info: Pick<IPlayerInfo, "atLiveEdge$" | "availableSources$" | "availableTextTracks$" | "currentAudioStream$" | "currentBuffer$" | "currentFormat$" | "currentPlaybackRate$" | "currentQuality$" | "currentTextTrack$" | "currentVideoStream$" | "hostname$" | "httpConnectionMetrics$" | "httpConnectionReused$" | "httpConnectionType$" | "httpDownloadMetrics$" | "isAutoQualityEnabled$" | "isLive$" | "isStalled$" | "liveTime$" | "muted$" | "playbackState$" | "position$" | "rttEstimation$" | "stallStartTime$" | "surface$" | "videoBitrate$" | "volume$">;
|
|
4
|
+
events: Pick<IPlayerEvents, "willStart$" | "willReady$" | "willSeek$" | "willStop$" | "willDestruct$" | "started$" | "playing$" | "paused$" | "seeked$" | "ended$" | "looped$" | "firstBytes$" | "firstBytesManifest$" | "firstBytesRequested$" | "firstFrame$" | "manifestRequested$" | "manifestReceived$" | "managedError$" | "fatalError$" | "fetcherRecoverableError$">;
|
|
5
|
+
experimental: Pick<IPlayer["experimental"], "element$">;
|
|
6
|
+
getExactTime: IPlayer["getExactTime"];
|
|
7
|
+
getExactLiveTime: IPlayer["getExactLiveTime"];
|
|
8
|
+
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { Milliseconds } from "@vkontakte/videoplayer-shared";
|
|
2
|
-
import type {
|
|
2
|
+
import type { IObservable } from "@vkontakte/videoplayer-core";
|
|
3
|
+
import type { IThinOneStatPlayerAdapter } from "../playerAdapter";
|
|
3
4
|
type GetTotalViewTime = () => Milliseconds;
|
|
4
|
-
export declare const calculateTotalViewTime: (player:
|
|
5
|
+
export declare const calculateTotalViewTime: (player: IThinOneStatPlayerAdapter) => IObservable<GetTotalViewTime>;
|
|
5
6
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { IThinOneStatPlayerAdapter } from "../playerAdapter";
|
|
2
2
|
import type { IObservable } from "@vkontakte/videoplayer-shared";
|
|
3
3
|
import type { IDownloadBytesPayload } from "../ThinOneStat";
|
|
4
4
|
export type IParams = {
|
|
5
5
|
maxTimeWindow: number;
|
|
6
6
|
};
|
|
7
|
-
export declare const downloadBytes: (player:
|
|
7
|
+
export declare const downloadBytes: (player: IThinOneStatPlayerAdapter, { maxTimeWindow }: IParams) => IObservable<IDownloadBytesPayload>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { IThinOneStatPlayerAdapter } from "../playerAdapter";
|
|
2
2
|
import type { IObservable, Milliseconds } from "@vkontakte/videoplayer-shared";
|
|
3
3
|
export type IParams = {
|
|
4
4
|
interval: number;
|
|
5
5
|
getTotalViewTime: () => Milliseconds;
|
|
6
6
|
};
|
|
7
|
-
export declare const telemetry: (player:
|
|
7
|
+
export declare const telemetry: (player: IThinOneStatPlayerAdapter, params: IParams) => IObservable<void>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { IThinOneStatPlayerAdapter } from "../playerAdapter";
|
|
2
2
|
import type { Seconds, IObservable, IRange } from "@vkontakte/videoplayer-shared";
|
|
3
3
|
import type { IAdsEvents } from "../events";
|
|
4
4
|
export type IParams = {
|
|
5
5
|
heartbeatInterval?: Seconds;
|
|
6
6
|
exactTime: boolean;
|
|
7
7
|
};
|
|
8
|
-
export declare const watchCoverage: (player:
|
|
8
|
+
export declare const watchCoverage: (player: IThinOneStatPlayerAdapter, adsEvents: IAdsEvents, params: IParams) => IObservable<IRange<Seconds>>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { IThinOneStatPlayerAdapter } from "../playerAdapter";
|
|
2
2
|
import type { IObservable, Milliseconds } from "@vkontakte/videoplayer-shared";
|
|
3
3
|
import type { IWatchedNPayload } from "../ThinOneStat";
|
|
4
4
|
export type IParams = {
|
|
5
5
|
targetDuration: Milliseconds;
|
|
6
6
|
getTotalViewTime: () => Milliseconds;
|
|
7
7
|
};
|
|
8
|
-
export declare const watchedN: (player:
|
|
8
|
+
export declare const watchedN: (player: IThinOneStatPlayerAdapter, params: IParams) => IObservable<IWatchedNPayload>;
|