@vkontakte/videoplayer 1.0.9 → 1.0.95-dev.e4134bc49.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 +20 -0
- package/es2015.esm.js +18 -4
- package/esnext.cjs +20 -0
- package/esnext.esm.js +18 -4
- package/evergreen.esm.js +20 -0
- package/package.json +38 -9
- package/types/VKVideoPlayer/HTMLElement.d.ts +2 -0
- package/types/VKVideoPlayer/defaultConfig.d.ts +5 -0
- package/types/VKVideoPlayer/index.svelte.d.ts +211 -0
- package/types/components/Ads/admanWrapper.d.ts +84 -0
- package/types/components/Ads/types.d.ts +20 -0
- package/types/components/Ads/utils.d.ts +6 -0
- package/types/components/Controls/contants/desktopButtonsLeftIds.d.ts +10 -0
- package/types/components/Controls/contants/desktopButtonsLeftWeights.d.ts +2 -0
- package/types/components/Controls/contants/desktopButtonsRightIds.d.ts +11 -0
- package/types/components/Controls/contants/desktopButtonsRightWeights.d.ts +2 -0
- package/types/components/Controls/types.d.ts +41 -0
- package/types/components/Controls/utils/isInnerButtonGuard.d.ts +2 -0
- package/types/components/Icons/constants.d.ts +8 -0
- package/types/components/Icons/utils.d.ts +2 -0
- package/types/components/Menus/constants/contextMenuItemIds.d.ts +11 -0
- package/types/components/Menus/constants/contextMenuItemWeights.d.ts +2 -0
- package/types/components/Menus/constants/defaultSubMenuMinWidth.d.ts +1 -0
- package/types/components/Menus/constants/index.d.ts +4 -0
- package/types/components/Menus/constants/openSubMenuItemsIds.d.ts +3 -0
- package/types/components/Menus/constants/settingsMenuItemIds.d.ts +11 -0
- package/types/components/Menus/constants/settingsMenuItemWeights.d.ts +2 -0
- package/types/components/Menus/constants/subMenuIds.d.ts +8 -0
- package/types/components/Menus/constants/topOffset.d.ts +1 -0
- package/types/components/Menus/subMenuTabs/rootMenuItems.d.ts +33 -0
- package/types/components/Menus/subMenuTabs/sharedMenuItems.d.ts +17 -0
- package/types/components/Menus/subMenuTabs/subMenuItems.d.ts +7 -0
- package/types/components/Menus/subMenuTabs/types.d.ts +151 -0
- package/types/components/Menus/subMenuTabs/utils.d.ts +3 -0
- package/types/components/Menus/types.d.ts +96 -0
- package/types/components/Menus/utils/constants.d.ts +1 -0
- package/types/components/Menus/utils/getCurrentQualityDisplayValue.d.ts +21 -0
- package/types/components/Menus/utils/getQualityIcon.d.ts +3 -0
- package/types/components/Menus/utils/getSubMenusStack.svelte.d.ts +10 -0
- package/types/components/Menus/utils/menuNavigation.d.ts +20 -0
- package/types/components/Qoe/constants.d.ts +9 -0
- package/types/components/Qoe/utils.d.ts +1 -0
- package/types/components/Root/types.d.ts +47 -0
- package/types/components/Root/utils.d.ts +2 -0
- package/types/components/Timeline/PreviewTrack/useTransitionToPreviewTrack.svelte.d.ts +21 -0
- package/types/components/Timeline/consts.d.ts +4 -0
- package/types/components/Tooltips/TimelinePreview.utils.d.ts +1 -0
- package/types/components/shared/interpolateUtils.d.ts +7 -0
- package/types/config.d.ts +315 -0
- package/types/constans/controls.d.ts +28 -0
- package/types/constans/debounce-timers.d.ts +1 -0
- package/types/constans/grid.d.ts +14 -0
- package/types/constans/index.d.ts +8 -0
- package/types/constans/interactives.d.ts +7 -0
- package/types/constans/keyboard.d.ts +50 -0
- package/types/constans/lang.d.ts +2 -0
- package/types/constans/storage-keys.d.ts +1 -0
- package/types/constans/subtitles.d.ts +1 -0
- package/types/constans/throttle-timers.d.ts +1 -0
- package/types/env.d.ts +2 -0
- package/types/index.d.ts +16 -68
- package/types/services/statistics.d.ts +17 -0
- package/types/store/composition.d.ts +32 -0
- package/types/store/index.d.ts +7 -0
- package/types/store/modules/fakeIsPlayingStore/fakeIsPlayingStore.module.d.ts +3 -0
- package/types/store/modules/fakeIsPlayingStore/fakeIsPlayingStore.store.d.ts +26 -0
- package/types/store/modules/fakeIsPlayingStore/fakeIsPlayingStore.token.d.ts +3 -0
- package/types/store/modules/fakeIsPlayingStore/index.d.ts +3 -0
- package/types/store/modules/graphIsOpenedStore/graphIsOpenedStore.module.d.ts +3 -0
- package/types/store/modules/graphIsOpenedStore/graphIsOpenedStore.store.d.ts +50 -0
- package/types/store/modules/graphIsOpenedStore/graphIsOpenedStore.token.d.ts +3 -0
- package/types/store/modules/graphIsOpenedStore/index.d.ts +3 -0
- package/types/store/modules/index.d.ts +20 -0
- package/types/store/modules/infrastructure/index.d.ts +3 -0
- package/types/store/modules/infrastructure/infrastructure.module.d.ts +21 -0
- package/types/store/modules/infrastructure/infrastructure.token.d.ts +26 -0
- package/types/store/modules/interactiveControlsOpacityStore/index.d.ts +3 -0
- package/types/store/modules/interactiveControlsOpacityStore/interactiveControlsOpacityStore.module.d.ts +3 -0
- package/types/store/modules/interactiveControlsOpacityStore/interactiveControlsOpacityStore.store.d.ts +34 -0
- package/types/store/modules/interactiveControlsOpacityStore/interactiveControlsOpacityStore.token.d.ts +3 -0
- package/types/store/modules/notificationsStore/index.d.ts +3 -0
- package/types/store/modules/notificationsStore/notificationsStore.module.d.ts +3 -0
- package/types/store/modules/notificationsStore/notificationsStore.store.d.ts +34 -0
- package/types/store/modules/notificationsStore/notificationsStore.token.d.ts +3 -0
- package/types/store/modules/pictureInPictureStore/index.d.ts +3 -0
- package/types/store/modules/pictureInPictureStore/pictureInPictureStore.module.d.ts +3 -0
- package/types/store/modules/pictureInPictureStore/pictureInPictureStore.store.d.ts +42 -0
- package/types/store/modules/pictureInPictureStore/pictureInPictureStore.token.d.ts +3 -0
- package/types/store/modules/qoeStore/index.d.ts +3 -0
- package/types/store/modules/qoeStore/qoeStore.module.d.ts +3 -0
- package/types/store/modules/qoeStore/qoeStore.store.d.ts +4 -0
- package/types/store/modules/qoeStore/qoeStore.token.d.ts +3 -0
- package/types/store/modules/qoeStore/types.d.ts +24 -0
- package/types/store/modules/seekToInteractiveDisabledTooltipStore/index.d.ts +3 -0
- package/types/store/modules/seekToInteractiveDisabledTooltipStore/seekToInteractiveDisabledTooltipStore.module.d.ts +3 -0
- package/types/store/modules/seekToInteractiveDisabledTooltipStore/seekToInteractiveDisabledTooltipStore.store.d.ts +26 -0
- package/types/store/modules/seekToInteractiveDisabledTooltipStore/seekToInteractiveDisabledTooltipStore.token.d.ts +3 -0
- package/types/store/modules/showInteractiveTimeIndicatorTooltipStore/index.d.ts +3 -0
- package/types/store/modules/showInteractiveTimeIndicatorTooltipStore/showInteractiveTimeIndicatorTooltipStore.module.d.ts +3 -0
- package/types/store/modules/showInteractiveTimeIndicatorTooltipStore/showInteractiveTimeIndicatorTooltipStore.store.d.ts +44 -0
- package/types/store/modules/showInteractiveTimeIndicatorTooltipStore/showInteractiveTimeIndicatorTooltipStore.token.d.ts +3 -0
- package/types/store/modules/utils.d.ts +6 -0
- package/types/store/types.d.ts +419 -0
- package/types/store/utils.d.ts +53 -0
- package/types/translation/index.d.ts +6 -0
- package/types/translation/labels.d.ts +3 -0
- package/types/translation/packs/en.d.ts +3 -0
- package/types/translation/packs/ru.d.ts +3 -0
- package/types/translation/types.d.ts +8 -0
- package/types/types/ads.d.ts +20 -0
- package/types/types/index.d.ts +634 -0
- package/types/types/qoe.d.ts +59 -0
- package/types/types/svg.d.d.ts +5 -0
- package/types/types/tmp.d.ts +1 -0
- package/types/utils/CaptionsPrepared.d.ts +17 -0
- package/types/utils/WebVttParser.d.ts +19 -0
- package/types/utils/attachments/defferedDisableByCondition.d.ts +4 -0
- package/types/utils/changeVolume.d.ts +9 -0
- package/{utils → types/utils}/clipboard.d.ts +1 -1
- package/{utils → types/utils}/dom.d.ts +3 -2
- package/types/utils/elementHelpers.d.ts +4 -0
- package/types/utils/fetchFile.d.ts +1 -0
- package/types/utils/findCurrentSubtltlePhrase.d.ts +2 -0
- package/{utils → types/utils}/formatSeconds.d.ts +1 -1
- package/types/utils/fullscreen.d.ts +29 -0
- package/types/utils/getActualEpisode.d.ts +10 -0
- package/types/utils/getControlInfo.d.ts +5 -0
- package/types/utils/getHotKeyMapData.d.ts +2 -0
- package/types/utils/grid.d.ts +6 -0
- package/types/utils/hooks/useIosSafariFullscreen.d.ts +6 -0
- package/types/utils/hooks/useIosSafariFullscreenSubtitles.d.ts +7 -0
- package/types/utils/keyboardHandleCases.d.ts +2 -0
- package/types/utils/landscapeUtils.d.ts +1 -0
- package/types/utils/notificationShowManager.d.ts +10 -0
- package/types/utils/roundFps.d.ts +1 -0
- package/types/utils/sanitizeHtml.d.ts +5 -0
- package/types/utils/sorts.d.ts +5 -0
- package/types/utils/stack/index.d.ts +9 -0
- package/types/utils/stack/node.d.ts +5 -0
- package/types/utils/subtitleLanguages.d.ts +3 -0
- package/types/utils/subtitles.d.ts +10 -0
- package/types/utils/timeout.d.ts +4 -0
- package/types/utils/updatePlayerControlBlocks.d.ts +3 -0
- package/types/utils/updatePlayerControlsInfo.d.ts +3 -0
- package/types/utils/userSettings.d.ts +58 -0
- package/types/utils/videoConfig.d.ts +6 -0
- package/types/utils/volumeChange.d.ts +5 -0
- package/types/utils/webAPI/annotationsApi/annotationsApi.d.ts +34 -0
- package/types/utils/webAPI/annotationsApi/errors.d.ts +7 -0
- package/types/utils/webAPI/focusLock.d.ts +34 -0
- package/types/utils/webAPI/focusManager.d.ts +17 -0
- package/types/utils/webAPI/language.d.ts +2 -0
- package/types/utils/webAPI/mediaSessionApi.d.ts +16 -0
- package/types/utils/webAPI/pictureInPictureApi/documentPictureInPictureApi.svelte.d.ts +47 -0
- package/types/utils/webAPI/pictureInPictureApi/factory.d.ts +3 -0
- package/types/utils/webAPI/pictureInPictureApi/index.d.ts +4 -0
- package/types/utils/webAPI/pictureInPictureApi/pictureInPictureApi.d.ts +49 -0
- package/types/utils/webAPI/pictureInPictureApi/types.d.ts +6 -0
- package/types/utils/webAPI/pictureInPictureApi/utils.d.ts +10 -0
- package/types/utils/webAPI/slotsApi.d.ts +53 -0
- package/VKVideoPlayer/index.d.ts +0 -38
- package/components/Ads/admanWrapper.d.ts +0 -71
- package/components/Ads/utils.d.ts +0 -1
- package/constans.d.ts +0 -31
- package/env.d.ts +0 -3
- package/es2015.cjs.js +0 -6
- package/es2018.cjs.js +0 -6
- package/es2018.esm.js +0 -6
- package/esnext.cjs.js +0 -6
- package/index.d.ts +0 -6
- package/store/index.d.ts +0 -110
- package/store/initStatistics.d.ts +0 -5
- package/store/utils.d.ts +0 -27
- package/utils/fullscreen.d.ts +0 -20
- package/utils/isios.d.ts +0 -1
- package/utils/roundFps.d.ts +0 -1
- package/utils/stack/index.d.ts +0 -9
- package/utils/stack/node.d.ts +0 -5
- package/utils/storage.d.ts +0 -5
- package/utils/volume.d.ts +0 -4
package/store/index.d.ts
DELETED
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
import type { Readable, Writable } from 'svelte/store';
|
|
2
|
-
import type { ILogger } from '@vkontakte/videoplayer-shared';
|
|
3
|
-
import type { IConfig } from '@vkontakte/videoplayer-core';
|
|
4
|
-
import { ChromecastState, PlaybackState, VideoQuality } from '@vkontakte/videoplayer-core';
|
|
5
|
-
import type { IVKVideoPlayerCallbacks, VideoQualityUI } from '../types';
|
|
6
|
-
import { PlayerPhase, AdsPlaybackState } from '../types';
|
|
7
|
-
import type { DebugData } from './utils';
|
|
8
|
-
import { AdmanWrapper } from '../components/Ads/admanWrapper';
|
|
9
|
-
import type { VideoQualityForRender } from '../types';
|
|
10
|
-
export interface IAdsState {
|
|
11
|
-
position: Writable<number>;
|
|
12
|
-
duration: Writable<number>;
|
|
13
|
-
playbackState: Writable<AdsPlaybackState>;
|
|
14
|
-
canSkip: Writable<boolean>;
|
|
15
|
-
secondsToWatchBeforeSkip: Writable<number>;
|
|
16
|
-
postrollPassed: Writable<boolean>;
|
|
17
|
-
}
|
|
18
|
-
export interface IUIState {
|
|
19
|
-
controlsVisible: Writable<boolean>;
|
|
20
|
-
isFullscreen: Writable<boolean>;
|
|
21
|
-
isAutoplay: Writable<boolean>;
|
|
22
|
-
contextMenuVisible: Writable<boolean>;
|
|
23
|
-
debugPanelVisible: Writable<boolean>;
|
|
24
|
-
playerSize: Writable<{
|
|
25
|
-
width: number;
|
|
26
|
-
height: number;
|
|
27
|
-
}>;
|
|
28
|
-
isMobile: Writable<boolean>;
|
|
29
|
-
mobileUnmuteButtonExpanded: Writable<boolean>;
|
|
30
|
-
mobileUnmuteButtonVisible: Writable<boolean>;
|
|
31
|
-
settingsMenuVisible: Writable<boolean>;
|
|
32
|
-
scrubbingInProgress: Writable<boolean>;
|
|
33
|
-
}
|
|
34
|
-
export interface IStore {
|
|
35
|
-
initVideo: (config: IConfig) => void;
|
|
36
|
-
playerPhase: Writable<PlayerPhase>;
|
|
37
|
-
state: {
|
|
38
|
-
positionExact$: Readable<number>;
|
|
39
|
-
positionWithScrubbing$: Readable<number>;
|
|
40
|
-
duration$: Readable<number>;
|
|
41
|
-
playbackState$: Readable<PlaybackState>;
|
|
42
|
-
isLoaderVisible: Readable<boolean>;
|
|
43
|
-
bufferedProgress$: Readable<number>;
|
|
44
|
-
isLive$: Readable<boolean | undefined>;
|
|
45
|
-
isActiveLive$: Readable<boolean>;
|
|
46
|
-
isEnded$: Readable<boolean>;
|
|
47
|
-
volume$: Readable<number>;
|
|
48
|
-
muted$: Readable<boolean>;
|
|
49
|
-
currentQuality$: Readable<VideoQuality | undefined>;
|
|
50
|
-
isAutoQualityEnabled$: Readable<boolean | undefined>;
|
|
51
|
-
availableQualities$: Readable<VideoQualityForRender[]>;
|
|
52
|
-
chromecastState$: Readable<ChromecastState>;
|
|
53
|
-
chromecastDeviceName$: Readable<string | undefined>;
|
|
54
|
-
chromecastConnected$: Readable<boolean>;
|
|
55
|
-
};
|
|
56
|
-
ui: IUIState;
|
|
57
|
-
ads: IAdsState;
|
|
58
|
-
actions: {
|
|
59
|
-
internal: {
|
|
60
|
-
firstStart: (showAds: boolean) => void;
|
|
61
|
-
pause: () => void;
|
|
62
|
-
togglePlay: () => void;
|
|
63
|
-
toggleMuted: () => void;
|
|
64
|
-
setVolume: (volume: number, preferredVolume?: number) => void;
|
|
65
|
-
setQuality: (quality: VideoQualityUI) => void;
|
|
66
|
-
startScrubbing: (progress: number) => void;
|
|
67
|
-
progressScrubbing: (progress: number) => void;
|
|
68
|
-
completeScrubbing: (progress: number) => void;
|
|
69
|
-
toggleChromecast: () => void;
|
|
70
|
-
seekTime: (time: number) => void;
|
|
71
|
-
switchToActiveLive: () => void;
|
|
72
|
-
switchFromAdsToVideo: (callPlay?: boolean) => void;
|
|
73
|
-
switchFromVideoToAds: () => void;
|
|
74
|
-
skipAd: () => void;
|
|
75
|
-
getDebugTextData: () => string;
|
|
76
|
-
getDebugPanelData: () => DebugData;
|
|
77
|
-
getVideoElement: () => HTMLVideoElement | null;
|
|
78
|
-
startLogging: () => void;
|
|
79
|
-
stopLogging: () => void;
|
|
80
|
-
};
|
|
81
|
-
external: {
|
|
82
|
-
firstStart: (showAds: boolean) => void;
|
|
83
|
-
play: () => void;
|
|
84
|
-
pause: () => void;
|
|
85
|
-
seekTime: (time: number) => void;
|
|
86
|
-
setMuted: (muted: boolean) => void;
|
|
87
|
-
setVolume: (volume: number) => void;
|
|
88
|
-
};
|
|
89
|
-
};
|
|
90
|
-
callbacks: IVKVideoPlayerCallbacks;
|
|
91
|
-
getAdmanWrapper: () => AdmanWrapper;
|
|
92
|
-
getLogger: () => ILogger;
|
|
93
|
-
destroy(): void;
|
|
94
|
-
}
|
|
95
|
-
interface IStoreParams {
|
|
96
|
-
videoId: number;
|
|
97
|
-
albumId?: string;
|
|
98
|
-
autoplay?: boolean;
|
|
99
|
-
statPlace?: string;
|
|
100
|
-
callbacks: IVKVideoPlayerCallbacks;
|
|
101
|
-
uiCallbacks: {
|
|
102
|
-
onStarted: (isMuted: boolean) => void;
|
|
103
|
-
};
|
|
104
|
-
}
|
|
105
|
-
/**
|
|
106
|
-
* Store приложения.
|
|
107
|
-
* Если будет слишком большим - можно разделить его на модули
|
|
108
|
-
*/
|
|
109
|
-
export declare const createStore: ({ videoId, albumId, autoplay, statPlace, callbacks, uiCallbacks, }: IStoreParams) => IStore;
|
|
110
|
-
export {};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { ISubscription } from '@vkontakte/videoplayer-shared';
|
|
2
|
-
import type { IOneStat } from '@vkontakte/videoplayer-statistics';
|
|
3
|
-
import type { IPlayer } from '@vkontakte/videoplayer-core';
|
|
4
|
-
import type { IAdEvents } from '../components/Ads/admanWrapper';
|
|
5
|
-
export declare const initStatistics: (player: IPlayer, adEvents: IAdEvents, oneStat: IOneStat) => ISubscription;
|
package/store/utils.d.ts
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import type { Readable } from 'svelte/store';
|
|
2
|
-
import type { IValueObservable } from '@vkontakte/videoplayer-shared';
|
|
3
|
-
import type { IPlayer, IConfig } from '@vkontakte/videoplayer-core';
|
|
4
|
-
import { VideoFormat, VideoQuality, HttpConnectionType as CoreConnectionType } from '@vkontakte/videoplayer-core';
|
|
5
|
-
import { ContentType, Quality, ConnectionType as StatisticsConnectionType } from '@vkontakte/videoplayer-statistics';
|
|
6
|
-
import type { IStore } from '.';
|
|
7
|
-
export declare const setStore: (store: IStore) => void;
|
|
8
|
-
export declare const getStore: () => IStore;
|
|
9
|
-
export declare const coreQualityToOneStatQuality: (coreQuality: VideoQuality | undefined) => Quality | undefined;
|
|
10
|
-
export declare const coreConnectionTypeToOneStatConnectionType: (coreType: CoreConnectionType | undefined) => StatisticsConnectionType | undefined;
|
|
11
|
-
export declare const videoFormatToContentType: (format: VideoFormat | undefined) => ContentType | undefined;
|
|
12
|
-
/**
|
|
13
|
-
* Создаёт readable store svelte'а из `IObservableValue` sdk
|
|
14
|
-
*/
|
|
15
|
-
export declare const storeFromObservable: <T>(observable$: IValueObservable<T>, onNewValueEmitted?: ((value: T) => void) | undefined) => Readable<T>;
|
|
16
|
-
export declare const constructDebugTextData: (player: IPlayer, config: IConfig, store: IStore) => string;
|
|
17
|
-
export declare type DebugData = {
|
|
18
|
-
version: string;
|
|
19
|
-
viewport: string;
|
|
20
|
-
provider?: string;
|
|
21
|
-
cdn?: string;
|
|
22
|
-
volume: number;
|
|
23
|
-
videoSize?: string;
|
|
24
|
-
buffer?: number;
|
|
25
|
-
speed?: number;
|
|
26
|
-
};
|
|
27
|
-
export declare const constructDebugPanelData: (player: IPlayer, config: IConfig, store: IStore) => DebugData;
|
package/utils/fullscreen.d.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
interface DocumentWithFullscreen extends HTMLDocument {
|
|
2
|
-
mozFullScreenElement?: Element;
|
|
3
|
-
msFullscreenElement?: Element;
|
|
4
|
-
webkitFullscreenElement?: Element;
|
|
5
|
-
msExitFullscreen?: () => Promise<void>;
|
|
6
|
-
mozCancelFullScreen?: () => Promise<void>;
|
|
7
|
-
webkitExitFullscreen?: () => Promise<void>;
|
|
8
|
-
}
|
|
9
|
-
interface DocumentElementWithFullscreen extends HTMLElement {
|
|
10
|
-
msRequestFullscreen?: () => Promise<void>;
|
|
11
|
-
mozRequestFullScreen?: () => Promise<void>;
|
|
12
|
-
webkitRequestFullscreen?: () => Promise<void>;
|
|
13
|
-
}
|
|
14
|
-
export declare const requestFullscreen: (element: DocumentElementWithFullscreen) => Promise<void>;
|
|
15
|
-
export declare const exitFullscreen: (doc: DocumentWithFullscreen) => Promise<void>;
|
|
16
|
-
export declare const exitIosSafariVideoElementFullscreen: (videoElement: HTMLVideoElement) => Promise<void>;
|
|
17
|
-
export declare const checkIsFullscreen: () => boolean;
|
|
18
|
-
export declare const registerFullscreenChangeEvent: (callback: () => void) => void;
|
|
19
|
-
export declare const removeFullscreenChangeEvent: (callback: () => void) => void;
|
|
20
|
-
export {};
|
package/utils/isios.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const isios: () => boolean;
|
package/utils/roundFps.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const roundFps: (fps: number) => "" | 50 | 60 | 120 | 240;
|
package/utils/stack/index.d.ts
DELETED
package/utils/stack/node.d.ts
DELETED
package/utils/storage.d.ts
DELETED
package/utils/volume.d.ts
DELETED