@vkontakte/videoplayer-statistics 1.0.100-dev.04f0bb5f.0 → 1.0.100-dev.319d6ebf.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/es2018.cjs +3 -3
- package/es2018.esm.js +3 -3
- package/es2024.cjs +3 -3
- package/es2024.esm.js +3 -3
- package/esnext.cjs +3 -3
- package/esnext.esm.js +3 -3
- package/evergreen.esm.js +3 -3
- package/package.json +3 -3
- package/types/ShareVSID.d.ts +3 -3
- package/types/index.d.ts +6 -5
- package/types/mediascopePixel/MediascopePixel.d.ts +36 -36
- package/types/mediascopePixel/Stopwatch.d.ts +10 -10
- package/types/mediascopePixel/types.d.ts +5 -5
- package/types/oneStat/Api.d.ts +35 -34
- package/types/oneStat/ApiTransport.d.ts +19 -19
- package/types/oneStat/Logger.d.ts +35 -35
- package/types/oneStat/OneStat.d.ts +309 -307
- package/types/oneStat/config.d.ts +32 -32
- package/types/oneStat/env.d.ts +3 -3
- package/types/oneStat/index.d.ts +9 -6
- package/types/oneStat/types.d.ts +43 -43
- package/types/oneStat/uiEvents.d.ts +19 -19
- package/types/oneStat/utils/mappers.d.ts +2 -2
- package/types/oneStat/utils/shorten.d.ts +1 -1
- package/types/oneStat/utils/timeSynchronisation.d.ts +8 -8
- package/types/oneStat/utils/watchCoverage.d.ts +4 -4
- package/types/oneStat/values.d.ts +63 -64
- package/types/shared/useModeController.d.ts +6 -5
- package/types/thinOneStat/Api.d.ts +32 -32
- package/types/thinOneStat/ApiTransport.d.ts +19 -19
- package/types/thinOneStat/Logger.d.ts +35 -35
- package/types/thinOneStat/ThinOneStat.d.ts +271 -271
- package/types/thinOneStat/config.d.ts +21 -20
- package/types/thinOneStat/env.d.ts +3 -3
- package/types/thinOneStat/events.d.ts +21 -21
- package/types/thinOneStat/index.d.ts +6 -4
- package/types/thinOneStat/types.d.ts +24 -24
- package/types/thinOneStat/utils/calculateTotalViewTime.d.ts +2 -2
- package/types/thinOneStat/utils/downloadBytes.d.ts +4 -4
- package/types/thinOneStat/utils/mappers.d.ts +3 -2
- package/types/thinOneStat/utils/timeSynchronisation.d.ts +8 -8
- package/types/thinOneStat/utils/watchCoverage.d.ts +4 -4
- package/types/thinOneStat/utils/watchedN.d.ts +5 -5
- package/types/thinOneStat/values.d.ts +67 -67
- package/es2015.cjs +0 -6
- package/es2015.esm.js +0 -6
|
@@ -1,24 +1,25 @@
|
|
|
1
|
-
import { Milliseconds, RecursivePartial } from
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import type { Milliseconds, RecursivePartial } from "@vkontakte/videoplayer-shared";
|
|
2
|
+
import type { EventName } from "./values";
|
|
3
|
+
import { ApiEnv } from "./values";
|
|
4
|
+
import type { IRequiredParams, IRequiredFatParams } from "./types";
|
|
4
5
|
export interface IConfig {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
6
|
+
apiKey: string;
|
|
7
|
+
apiEnv: ApiEnv;
|
|
8
|
+
apiBaseUrl: string | null;
|
|
9
|
+
requestRetryCount: number;
|
|
10
|
+
useVsid64: boolean;
|
|
11
|
+
firstFlushTime: Milliseconds;
|
|
12
|
+
flushDebounceTime: Milliseconds;
|
|
13
|
+
flushMaxWait: Milliseconds;
|
|
14
|
+
storageExpiration: Milliseconds;
|
|
15
|
+
watchCoverageHeartbeatInterval: Milliseconds;
|
|
16
|
+
disabledEvents: EventName[];
|
|
17
|
+
disabledParams: (keyof (IRequiredParams | IRequiredFatParams))[];
|
|
18
|
+
synchronizeTime: boolean;
|
|
19
|
+
useBeacon: boolean;
|
|
20
|
+
alwaysSendDesktop: boolean;
|
|
21
|
+
watchedNDefaultTargetDuration: Milliseconds;
|
|
22
|
+
downloadBytesMaxTime: Milliseconds;
|
|
22
23
|
}
|
|
23
24
|
export type IOptionalConfig = RecursivePartial<IConfig>;
|
|
24
25
|
export declare const fillDefault: (partial: IOptionalConfig) => IConfig;
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import type { IObservable } from
|
|
2
|
-
import { ActionSeekType, ActionQualityType } from
|
|
1
|
+
import type { IObservable } from "@vkontakte/videoplayer-shared";
|
|
2
|
+
import type { ActionSeekType, ActionQualityType } from "./values";
|
|
3
3
|
export interface IUIEvents {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
4
|
+
actionSeek$?: IObservable<ActionSeekType>;
|
|
5
|
+
actionSubtitlesSwitched$?: IObservable<{
|
|
6
|
+
enabled: boolean;
|
|
7
|
+
lang: string;
|
|
8
|
+
auto: boolean;
|
|
9
|
+
}>;
|
|
10
|
+
actionQuality$?: IObservable<ActionQualityType>;
|
|
11
|
+
isLoaderVisible$?: IObservable<boolean>;
|
|
12
|
+
playerSize$?: IObservable<{
|
|
13
|
+
width: number;
|
|
14
|
+
height: number;
|
|
15
|
+
}>;
|
|
16
|
+
inPiP$?: IObservable<boolean>;
|
|
17
|
+
inFullscreen$?: IObservable<boolean>;
|
|
18
18
|
}
|
|
19
19
|
export interface IAdsEvents {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
20
|
+
init$?: IObservable<number>;
|
|
21
|
+
slotRequested$?: IObservable<void>;
|
|
22
|
+
started$?: IObservable<string>;
|
|
23
|
+
ended$?: IObservable<string>;
|
|
24
|
+
error$?: IObservable<string>;
|
|
25
25
|
}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export {
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
1
|
+
export { ThinOneStat } from "./ThinOneStat";
|
|
2
|
+
export type { IThinOneStat, IStatContext } from "./ThinOneStat";
|
|
3
|
+
export { ActionSeekType } from "./values";
|
|
4
|
+
export type { ActionQualityType } from "./values";
|
|
5
|
+
export type { IUIEvents } from "./events";
|
|
6
|
+
export { VERSION } from "../env";
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import type { Milliseconds } from
|
|
2
|
-
import { EventName } from
|
|
1
|
+
import type { Milliseconds } from "@vkontakte/videoplayer-shared";
|
|
2
|
+
import type { EventName } from "./values";
|
|
3
3
|
export interface IRequiredParams {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
4
|
+
vsid: string;
|
|
5
|
+
event_name: EventName;
|
|
6
|
+
client_time: number;
|
|
7
|
+
event_number: number;
|
|
8
|
+
current_tvt: Milliseconds;
|
|
9
|
+
uv_movie_id?: number;
|
|
10
|
+
application?: string;
|
|
11
|
+
platform?: string;
|
|
12
|
+
product?: string;
|
|
13
|
+
playback_position?: Milliseconds;
|
|
14
|
+
cdn_host?: string;
|
|
15
15
|
}
|
|
16
16
|
export interface IRequiredFatParams {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
17
|
+
stats_version: string;
|
|
18
|
+
browser: string;
|
|
19
|
+
browser_version: string;
|
|
20
|
+
os: string;
|
|
21
|
+
os_version: string;
|
|
22
|
+
device_type: string;
|
|
23
|
+
device_manufacturer: string;
|
|
24
|
+
device_model: string;
|
|
25
|
+
navigation?: Record<string, unknown>;
|
|
26
26
|
}
|
|
27
27
|
export type ILogItem = IRequiredParams & Partial<IRequiredFatParams>;
|
|
28
28
|
export type PlayerSize = {
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
width: number;
|
|
30
|
+
height: number;
|
|
31
31
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Milliseconds } from
|
|
2
|
-
import type { IPlayer, IObservable } from
|
|
1
|
+
import type { Milliseconds } from "@vkontakte/videoplayer-shared";
|
|
2
|
+
import type { IPlayer, IObservable } from "@vkontakte/videoplayer-core";
|
|
3
3
|
type GetTotalViewTime = () => Milliseconds;
|
|
4
4
|
export declare const calculateTotalViewTime: (player: IPlayer) => IObservable<GetTotalViewTime>;
|
|
5
5
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { IPlayer } from
|
|
2
|
-
import type { IObservable } from
|
|
3
|
-
import { IDownloadBytes } from
|
|
1
|
+
import type { IPlayer } from "@vkontakte/videoplayer-core";
|
|
2
|
+
import type { IObservable } from "@vkontakte/videoplayer-shared";
|
|
3
|
+
import type { IDownloadBytes } from "../ThinOneStat";
|
|
4
4
|
export type IParams = {
|
|
5
|
-
|
|
5
|
+
maxTimeWindow: number;
|
|
6
6
|
};
|
|
7
7
|
export declare const downloadBytes: (player: IPlayer, { maxTimeWindow }: IParams) => IObservable<IDownloadBytes>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import type { ISources } from "@vkontakte/videoplayer-core";
|
|
2
|
+
import { HttpConnectionType as CoreConnectionType, Surface, VideoFormat, VideoQuality } from "@vkontakte/videoplayer-core";
|
|
3
|
+
import { ConnectionType as StatisticsConnectionType, ContentType, Mode, Quality, StreamingProfile, Visibility } from "../values";
|
|
3
4
|
export declare const connectionType: (coreType?: CoreConnectionType) => StatisticsConnectionType | undefined;
|
|
4
5
|
export declare const contentType: (format?: VideoFormat) => ContentType | undefined;
|
|
5
6
|
export declare const quality: (coreQuality?: VideoQuality) => Quality | undefined;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Milliseconds } from
|
|
1
|
+
import type { Milliseconds } from "@vkontakte/videoplayer-shared";
|
|
2
2
|
export declare class TimeSynchronisation {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
3
|
+
private offset;
|
|
4
|
+
constructor(initialOffset?: Milliseconds);
|
|
5
|
+
getOffset(): Milliseconds;
|
|
6
|
+
setOffset(offset: Milliseconds): void;
|
|
7
|
+
now(): number;
|
|
8
|
+
date(date?: Date): Date;
|
|
9
|
+
addServerTime(serverTime: Milliseconds, rtt: Milliseconds): void;
|
|
10
10
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { IPlayer } from
|
|
2
|
-
import type { Seconds, IObservable, IRange } from
|
|
3
|
-
import { IAdsEvents } from
|
|
1
|
+
import type { IPlayer } from "@vkontakte/videoplayer-core";
|
|
2
|
+
import type { Seconds, IObservable, IRange } from "@vkontakte/videoplayer-shared";
|
|
3
|
+
import type { IAdsEvents } from "../events";
|
|
4
4
|
export type IParams = {
|
|
5
|
-
|
|
5
|
+
heartbeatInterval?: Seconds;
|
|
6
6
|
};
|
|
7
7
|
export declare const watchCoverage: (player: IPlayer, adsEvents: IAdsEvents, params: IParams) => IObservable<IRange<Seconds>>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { IPlayer } from
|
|
2
|
-
import type { IObservable, Milliseconds } from
|
|
3
|
-
import { IWatchedNPayload } from
|
|
1
|
+
import type { IPlayer } from "@vkontakte/videoplayer-core";
|
|
2
|
+
import type { IObservable, Milliseconds } from "@vkontakte/videoplayer-shared";
|
|
3
|
+
import type { IWatchedNPayload } from "../ThinOneStat";
|
|
4
4
|
export type IParams = {
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
targetDuration: Milliseconds;
|
|
6
|
+
getTotalViewTime: () => Milliseconds;
|
|
7
7
|
};
|
|
8
8
|
export declare const watchedN: (player: IPlayer, params: IParams) => IObservable<IWatchedNPayload>;
|
|
@@ -1,86 +1,86 @@
|
|
|
1
|
-
import type { VideoQuality } from
|
|
2
|
-
export type EventName =
|
|
1
|
+
import type { VideoQuality } from "@vkontakte/videoplayer-shared";
|
|
2
|
+
export type EventName = "watch_coverage" | "watch_coverage_live" | "watched_n" | "start_session" | "preload_started" | "preload_ended" | "preload_error" | "playback_started" | "play" | "manifest_request" | "first_media_request" | "first_byte_manifest" | "first_byte_media" | "manifest_received" | "connection_established" | "first_video_frame_decoded" | "ready" | "playing" | "pause" | "resume" | "seeking" | "seeked" | "stop" | "buffer_starvation" | "show_loader" | "quality_change_requested" | "quality_changed" | "cdn_host_changed" | "view_port_changed" | "mode_changed" | "visibility_changed" | "audio_track_switched" | "video_track_switched" | "subtitles_switched" | "sound_changed" | "failover" | "content_type_change" | "error" | "cannot_play" | "download_bytes" | "adv_configuration" | "adv_request" | "adv_break_started" | "adv_break_ended" | "adv_error";
|
|
3
3
|
export declare enum ApiEnv {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
PROD = "prod",
|
|
5
|
+
VK_ALIAS = "vk_alias",
|
|
6
|
+
VIDEOTEST = "videotest",
|
|
7
|
+
TEST = "test",
|
|
8
|
+
OKCDN = "okcdn",
|
|
9
|
+
AUTO = "auto"
|
|
10
10
|
}
|
|
11
11
|
export declare enum ConnectionType {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
HTTP1 = "http1",
|
|
13
|
+
HTTP2 = "http2",
|
|
14
|
+
HTTP3 = "http3",
|
|
15
|
+
RTMP = "rtmp",
|
|
16
|
+
WEBRTC = "webrtc"
|
|
17
17
|
}
|
|
18
18
|
export declare enum ContentType {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
19
|
+
MP4 = "MP4",
|
|
20
|
+
DASH = "DASH",
|
|
21
|
+
DASH_SEP = "DASH_SEP",
|
|
22
|
+
ONDEMAND_DASH = "ONDEMAND_DASH",
|
|
23
|
+
ONDEMAND_HLS = "ONDEMAND_HLS",
|
|
24
|
+
HLS = "HLS",
|
|
25
|
+
HLS_FMP4 = "HLS_FMP4",
|
|
26
|
+
WEBM = "WEBM",
|
|
27
|
+
ONDEMAND_DASH_LIVE = "ONDEMAND_DASH_LIVE",
|
|
28
|
+
ONDEMAND_HLS_LIVE = "ONDEMAND_HLS_LIVE",
|
|
29
|
+
WEBRTC = "WEBRTC",
|
|
30
|
+
AV1 = "AV1",
|
|
31
|
+
MULTI_DASH = "MULTI_DASH",
|
|
32
|
+
EMBED = "EMBED",
|
|
33
|
+
AUDIO_MP4 = "AUDIO_MP4",
|
|
34
|
+
AUDIO_MP3 = "AUDIO_MP3",
|
|
35
|
+
AUDIO_OGG = "AUDIO_OGG",
|
|
36
|
+
MULTI_HLS = "MULTI_HLS",
|
|
37
|
+
/** @deprecated сдк не поддерживает RTMP, не нужно его использовать */
|
|
38
|
+
RTMP = "RTMP",
|
|
39
|
+
UNKNOWN = "UNKNOWN"
|
|
40
40
|
}
|
|
41
41
|
export declare enum Quality {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
42
|
+
Q144P = "144p",
|
|
43
|
+
Q240P = "240p",
|
|
44
|
+
Q360P = "360p",
|
|
45
|
+
Q480P = "480p",
|
|
46
|
+
Q720P = "720p",
|
|
47
|
+
Q1080P = "1080p",
|
|
48
|
+
Q1440P = "1440p",
|
|
49
|
+
Q2160P = "2160p",
|
|
50
|
+
UNKNOWN = "UNKNOWN",
|
|
51
|
+
AUDIO_ONLY = "audio"
|
|
52
52
|
}
|
|
53
53
|
export declare enum AutoQuality {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
54
|
+
AUTO = "auto",
|
|
55
|
+
AUTO_POOR = "auto_poor",
|
|
56
|
+
AUTO_RICH = "auto_rich"
|
|
57
57
|
}
|
|
58
58
|
export declare enum StreamingProfile {
|
|
59
|
-
|
|
60
|
-
|
|
59
|
+
LIVE = "live",
|
|
60
|
+
VOD = "vod"
|
|
61
61
|
}
|
|
62
62
|
export declare enum Mode {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
63
|
+
INLINE = "inline",
|
|
64
|
+
FULLSCREEN = "fullscreen",
|
|
65
|
+
PIP_EXTERNAL = "pip_external",
|
|
66
|
+
PIP_IN_APP = "pip_in_app",
|
|
67
|
+
CHROMECAST = "chromecast",
|
|
68
|
+
AIRPLAY = "airplay",
|
|
69
|
+
EXTERNAL = "external",
|
|
70
|
+
MINIMAL = "minimal"
|
|
71
71
|
}
|
|
72
72
|
export declare enum Visibility {
|
|
73
|
-
|
|
74
|
-
|
|
73
|
+
FOREGROUND = "foreground",
|
|
74
|
+
BACKGROUND = "background"
|
|
75
75
|
}
|
|
76
76
|
export declare enum ActionSeekType {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
77
|
+
SLIDER = "slider",
|
|
78
|
+
RICH = "rich",
|
|
79
|
+
DOUBLE_TAP = "double_tap",
|
|
80
|
+
TIME_CODE = "time_code",
|
|
81
|
+
EPISODE = "episode",
|
|
82
|
+
REWIND = "rewind",
|
|
83
|
+
LIVE = "live",
|
|
84
|
+
UNKNOWN = "unknown"
|
|
85
85
|
}
|
|
86
86
|
export type ActionQualityType = VideoQuality | AutoQuality;
|