itube-specs 0.0.195
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/README.md +121 -0
- package/components/cards/f-video-mini-card.vue +49 -0
- package/components/grids/f-grid-categories.vue +20 -0
- package/components/grids/f-grid-channels.vue +23 -0
- package/components/grids/f-grid-models.vue +25 -0
- package/components/grids/f-grid-playlists.vue +21 -0
- package/components/grids/f-grid-videos.vue +33 -0
- package/components/page-components/f-breadcrumbs.vue +44 -0
- package/components/page-components/f-chips-panel.vue +101 -0
- package/components/page-components/f-pagination.vue +206 -0
- package/components/page-components/f-report.vue +221 -0
- package/components/page-components/f-share.vue +96 -0
- package/components/page-components/f-sort.vue +57 -0
- package/components/page-components/f-videos-title.vue +20 -0
- package/components/ui/f-button.vue +50 -0
- package/components/ui/f-checkbox.vue +55 -0
- package/components/ui/f-chips.vue +116 -0
- package/components/ui/f-count.vue +12 -0
- package/components/ui/f-country.vue +26 -0
- package/components/ui/f-dropdown.vue +122 -0
- package/components/ui/f-icon.vue +19 -0
- package/components/ui/f-img.vue +46 -0
- package/components/ui/f-input.vue +162 -0
- package/components/ui/f-label.vue +20 -0
- package/components/ui/f-link.vue +33 -0
- package/components/ui/f-model-tag.vue +28 -0
- package/components/ui/f-notification.vue +77 -0
- package/components/ui/f-popup.vue +136 -0
- package/components/ui/f-radio.vue +56 -0
- package/components/ui/f-select.vue +88 -0
- package/components/ui/f-slider.vue +55 -0
- package/components/ui/f-snackbar.vue +47 -0
- package/components/ui/f-timestamp.vue +51 -0
- package/components/ui/f-toggle.vue +29 -0
- package/composables/use-antiadblock-domains.ts +20 -0
- package/composables/use-auth-popup.ts +25 -0
- package/composables/use-convert-query-categories.ts +7 -0
- package/composables/use-generate-link.ts +30 -0
- package/composables/use-get-pure-route-name.ts +5 -0
- package/composables/use-get-videos-filter-request.ts +30 -0
- package/composables/use-meta.ts +42 -0
- package/composables/use-playlist-edit.ts +36 -0
- package/composables/use-report-popup.ts +21 -0
- package/composables/use-seo-links.ts +87 -0
- package/composables/use-share-popup.ts +23 -0
- package/composables/use-snackbar.ts +52 -0
- package/composables/use-test-composable.ts +3 -0
- package/lib/alphabet-items.ts +2 -0
- package/lib/contact-forms-scheme.ts +98 -0
- package/lib/contacts/report-issue-items.ts +5 -0
- package/lib/contacts/report-malware-items.ts +6 -0
- package/lib/contacts/report-reasons-items.ts +12 -0
- package/lib/contacts/report-wrong-items.ts +6 -0
- package/lib/index.ts +7 -0
- package/lib/report-forms-scheme.ts +205 -0
- package/nuxt.config.ts +20 -0
- package/package.json +53 -0
- package/runtime/enums/async-data.ts +48 -0
- package/runtime/enums/auth-step.ts +5 -0
- package/runtime/enums/contacts-subjects.ts +7 -0
- package/runtime/enums/languages.ts +9 -0
- package/runtime/enums/niche.ts +6 -0
- package/runtime/enums/playlist-step.ts +5 -0
- package/runtime/enums/playlist-type.ts +4 -0
- package/runtime/enums/report-forms-subjects.ts +7 -0
- package/runtime/index.ts +51 -0
- package/runtime/utils/cleaners/clean-category-card.ts +9 -0
- package/runtime/utils/cleaners/clean-category-info.ts +9 -0
- package/runtime/utils/cleaners/clean-channel-card.ts +12 -0
- package/runtime/utils/cleaners/clean-channel-info.ts +13 -0
- package/runtime/utils/cleaners/clean-model-card.ts +9 -0
- package/runtime/utils/cleaners/clean-model-info.ts +11 -0
- package/runtime/utils/cleaners/clean-playlist-card.ts +16 -0
- package/runtime/utils/cleaners/clean-playlist-data.ts +15 -0
- package/runtime/utils/cleaners/clean-playlist-video.ts +12 -0
- package/runtime/utils/cleaners/clean-profile-data.ts +11 -0
- package/runtime/utils/cleaners/clean-user-playlists-card.ts +11 -0
- package/runtime/utils/cleaners/clean-video-card.ts +19 -0
- package/runtime/utils/cleaners/clean-video-data.ts +27 -0
- package/runtime/utils/compress-image.ts +27 -0
- package/runtime/utils/converters/convert-categories-to-chips.ts +13 -0
- package/runtime/utils/converters/convert-categories-to-footer.ts +11 -0
- package/runtime/utils/converters/convert-date-to-timestamp.ts +37 -0
- package/runtime/utils/converters/convert-model-card-to-chips.ts +13 -0
- package/runtime/utils/converters/convert-string.ts +56 -0
- package/runtime/utils/converters/group-categories-by-first-letter.ts +24 -0
- package/runtime/utils/converters/group-objects-by-first-letter.ts +16 -0
- package/runtime/utils/format-date.ts +12 -0
- package/runtime/utils/format-number.ts +12 -0
- package/runtime/utils/format-time-ago.ts +21 -0
- package/runtime/utils/get-duration.ts +17 -0
- package/runtime/utils/get-month.ts +22 -0
- package/runtime/utils/get-multiple-query.ts +26 -0
- package/runtime/utils/get-selected-query.ts +6 -0
- package/runtime/utils/is-mobile.ts +15 -0
- package/runtime/utils/normalize-url.ts +43 -0
- package/runtime/utils/on-backdrop-click.ts +5 -0
- package/runtime/utils/scroll-lock.ts +28 -0
- package/runtime/utils/server/abort-controller.ts +14 -0
- package/runtime/utils/server/api-helper.ts +41 -0
- package/runtime/utils/server/get-url-with-proxied-params.ts +6 -0
- package/runtime/utils/server/parse-api-error.ts +14 -0
- package/runtime/utils/server/server-api-helper.ts +28 -0
- package/runtime/utils/validate-email.ts +4 -0
- package/runtime/utils/validate-password.ts +3 -0
- package/runtime/utils/validate-phone.ts +4 -0
- package/runtime/utils/validate-username.ts +4 -0
- package/runtime/utils/video-data-add-model-icon.ts +20 -0
- package/runtime/utils/vtt-helper.ts +86 -0
- package/types/authorization-forms.d.ts +16 -0
- package/types/breadcrumb-item.d.ts +4 -0
- package/types/button-sizes.d.ts +1 -0
- package/types/button-themes.d.ts +1 -0
- package/types/card-info.d.ts +22 -0
- package/types/category-card.d.ts +8 -0
- package/types/change-email-form.d.ts +3 -0
- package/types/change-password-form.d.ts +4 -0
- package/types/channel-card.d.ts +10 -0
- package/types/chips-item.d.ts +8 -0
- package/types/contacts-form.d.ts +10 -0
- package/types/contacts-scheme.d.ts +14 -0
- package/types/country.d.ts +5 -0
- package/types/css-breakpoints.d.ts +1 -0
- package/types/filter-scheme.d.ts +37 -0
- package/types/fluid-player.d.ts +226 -0
- package/types/gender.d.ts +5 -0
- package/types/group-categories.d.ts +15 -0
- package/types/index.d.ts +59 -0
- package/types/input-types.d.ts +1 -0
- package/types/link-item.d.ts +6 -0
- package/types/model-card.d.ts +7 -0
- package/types/model-filter-payload.d.ts +4 -0
- package/types/model-filter.d.ts +15 -0
- package/types/model-group.d.ts +5 -0
- package/types/model-tag.d.ts +5 -0
- package/types/multi-suggest.d.ts +105 -0
- package/types/navigation-items.d.ts +10 -0
- package/types/paginated-response.d.ts +8 -0
- package/types/parameter-model.d.ts +14 -0
- package/types/playlist-card.d.ts +16 -0
- package/types/playlist-data.d.ts +15 -0
- package/types/playlist-info-type.d.ts +28 -0
- package/types/playlist-video-form.d.ts +9 -0
- package/types/profile-data.d.ts +9 -0
- package/types/raw/raw-category-card.d.ts +23 -0
- package/types/raw/raw-category-info.d.ts +23 -0
- package/types/raw/raw-channel-card.d.ts +29 -0
- package/types/raw/raw-channel-info.d.ts +29 -0
- package/types/raw/raw-model-card.d.ts +53 -0
- package/types/raw/raw-model-info.d.ts +54 -0
- package/types/raw/raw-playlist-card.d.ts +27 -0
- package/types/raw/raw-playlist-data.d.ts +29 -0
- package/types/raw/raw-playlist-user.d.ts +24 -0
- package/types/raw/raw-playlist-video.d.ts +18 -0
- package/types/raw/raw-profile-data.d.ts +22 -0
- package/types/raw/raw-video-card.d.ts +78 -0
- package/types/raw/raw-video-data.d.ts +53 -0
- package/types/recovery-password-form.d.ts +4 -0
- package/types/related-phrases.d.ts +6 -0
- package/types/report-form.d.ts +9 -0
- package/types/report-scheme.d.ts +21 -0
- package/types/request-filters.d.ts +13 -0
- package/types/request-pagination.d.ts +5 -0
- package/types/search-top-models.d.ts +6 -0
- package/types/select-item.d.ts +10 -0
- package/types/tab-item.d.ts +6 -0
- package/types/thumbs-urls.d.ts +13 -0
- package/types/video-card.d.ts +18 -0
- package/types/video-data.d.ts +36 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { IRawModelCard, IRawVideoData } from '../../types';
|
|
2
|
+
|
|
3
|
+
export function videoDataAddModelIcon(videoData: IRawVideoData, modelsData: Array<IRawModelCard>): IRawVideoData {
|
|
4
|
+
const transformedData = { ...videoData };
|
|
5
|
+
|
|
6
|
+
transformedData.models = transformedData.models?.map((model) => {
|
|
7
|
+
const modelData = modelsData.find((item) => item.guid === model.guid);
|
|
8
|
+
|
|
9
|
+
if (modelData) {
|
|
10
|
+
return {
|
|
11
|
+
...model,
|
|
12
|
+
icon: modelData.primary_image_url,
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
return model;
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
return transformedData;
|
|
20
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
export interface IVttItem {
|
|
2
|
+
start: number;
|
|
3
|
+
end: number;
|
|
4
|
+
coords: { x: number; y: number; w: number; h: number };
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export class VttHelper {
|
|
8
|
+
private readonly vttUrl: string;
|
|
9
|
+
public hasInited: boolean;
|
|
10
|
+
private vttData: Array<IVttItem> | null;
|
|
11
|
+
|
|
12
|
+
constructor(vttUrl: string) {
|
|
13
|
+
this.vttUrl = vttUrl;
|
|
14
|
+
this.hasInited = false;
|
|
15
|
+
this.vttData = null;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
async init(): Promise<void> {
|
|
19
|
+
const vttContent: Response = await fetch(this.vttUrl);
|
|
20
|
+
|
|
21
|
+
if (vttContent.body) {
|
|
22
|
+
const reader: ReadableStreamDefaultReader<string> = vttContent.body
|
|
23
|
+
.pipeThrough(new TextDecoderStream())
|
|
24
|
+
.getReader();
|
|
25
|
+
const vtt: ReadableStreamReadResult<string> = await reader.read();
|
|
26
|
+
this.vttData = this.parseVTT(vtt);
|
|
27
|
+
this.hasInited = true;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
private parseCoords(coordsString: string): { x: number; y: number; w: number; h: number } {
|
|
32
|
+
const [x, y, w, h] = coordsString.split(',').map(Number);
|
|
33
|
+
return { x, y, w, h };
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
private parseVTT(vttContent: ReadableStreamReadResult<string>): Array<IVttItem> {
|
|
37
|
+
if (!vttContent.value) {
|
|
38
|
+
return [];
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
const lines: Array<string> = vttContent.value.split('\n');
|
|
42
|
+
const result: Array<IVttItem> = [];
|
|
43
|
+
let item: Partial<IVttItem> = {};
|
|
44
|
+
|
|
45
|
+
for (let i = 0; i < lines.length; i++) {
|
|
46
|
+
const line: string = lines[i].trim();
|
|
47
|
+
|
|
48
|
+
if (line.includes('-->')) {
|
|
49
|
+
const parts: Array<string> = line.split(' ');
|
|
50
|
+
item.start = this.timeToSeconds(parts[0]);
|
|
51
|
+
item.end = this.timeToSeconds(parts[2]);
|
|
52
|
+
} else if (line.includes('#xywh=')) {
|
|
53
|
+
item.coords = this.parseCoords(line.split('#xywh=')[1]);
|
|
54
|
+
} else if (line.includes('Img')) {
|
|
55
|
+
if (Object.values(item).length && item.start !== undefined && item.end !== undefined && item.coords) {
|
|
56
|
+
result.push(item as IVttItem);
|
|
57
|
+
}
|
|
58
|
+
item = {};
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
return result;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
private timeToSeconds(time: string): number {
|
|
66
|
+
const parts: Array<string> = time.split(':');
|
|
67
|
+
const hh: number = parseInt(parts[0], 10);
|
|
68
|
+
const mm: number = parseInt(parts[1], 10);
|
|
69
|
+
const ss: number = parseFloat(parts[2].replace(',', '.'));
|
|
70
|
+
|
|
71
|
+
return hh * 3600 + mm * 60 + ss;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
getCoordsByTime(time: number, vttData: Array<IVttItem> | null = this.vttData):
|
|
75
|
+
{ x: number; y: number; w: number; h: number } | string {
|
|
76
|
+
if (!this.hasInited || !vttData) {
|
|
77
|
+
return 'No preview';
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
return (
|
|
81
|
+
vttData.find((item: IVttItem) => {
|
|
82
|
+
return time >= item.start && time <= item.end;
|
|
83
|
+
}) || vttData[0]
|
|
84
|
+
).coords;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export interface IRegistrateForm {
|
|
2
|
+
email: string
|
|
3
|
+
password_hash: string
|
|
4
|
+
token: string
|
|
5
|
+
username: string
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export interface ILoginForm {
|
|
9
|
+
username: string
|
|
10
|
+
password_hash: string
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export interface IPasswordForm {
|
|
14
|
+
email: string
|
|
15
|
+
token: string
|
|
16
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type ButtonSizes = 's' | 'm' | undefined
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type ButtonThemes = 'primary' | 'secondary' | 'ghost' | 'bordered' | 'tab' | undefined
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { IParameterModel } from './parameter-model';
|
|
2
|
+
|
|
3
|
+
export interface ICardInfo {
|
|
4
|
+
title: string;
|
|
5
|
+
description: string;
|
|
6
|
+
videosCount: number;
|
|
7
|
+
thumbUrl: string;
|
|
8
|
+
|
|
9
|
+
guid?: string;
|
|
10
|
+
// Fields specific to Channel
|
|
11
|
+
url?: string;
|
|
12
|
+
isNetwork?: boolean;
|
|
13
|
+
updated?: number;
|
|
14
|
+
avatarUrl?: string;
|
|
15
|
+
|
|
16
|
+
// Fields specific to Model
|
|
17
|
+
orientation?: string;
|
|
18
|
+
social?: {
|
|
19
|
+
[key: string]: string | undefined;
|
|
20
|
+
};
|
|
21
|
+
parameters?: IParameterModel[]
|
|
22
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { EContactsSubjects } from '../runtime/enums/contacts-subjects';
|
|
2
|
+
import type { InputTypes } from '../types';
|
|
3
|
+
|
|
4
|
+
export interface IContactScheme {
|
|
5
|
+
subject: EContactsSubjects
|
|
6
|
+
items?: {
|
|
7
|
+
type: InputTypes | string
|
|
8
|
+
value: string
|
|
9
|
+
label?: string
|
|
10
|
+
required?: boolean
|
|
11
|
+
wide?: boolean
|
|
12
|
+
text?: string
|
|
13
|
+
}[]
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type CssBreakpoints = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { ISelectItem, ITabItem } from '../types';
|
|
2
|
+
|
|
3
|
+
export type FilterSchemeItemType =
|
|
4
|
+
| 'select'
|
|
5
|
+
| 'input'
|
|
6
|
+
| 'tabs'
|
|
7
|
+
|
|
8
|
+
interface IFilterSchemeItemBase {
|
|
9
|
+
type: FilterSchemeItemType
|
|
10
|
+
title: string
|
|
11
|
+
className?: string
|
|
12
|
+
label?: string
|
|
13
|
+
wide?: boolean
|
|
14
|
+
fixed?: boolean
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
interface IFilterSchemeItemSelect extends IFilterSchemeItemBase {
|
|
18
|
+
type: 'select'
|
|
19
|
+
items: ISelectItem[]
|
|
20
|
+
placeholder: string
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
interface IFilterSchemeItemTabs extends IFilterSchemeItemBase {
|
|
24
|
+
type: 'tabs'
|
|
25
|
+
items: ITabItem[]
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
interface IFilterSchemeItemInput extends IFilterSchemeItemBase {
|
|
29
|
+
type: 'input'
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export type FilterSchemeItem =
|
|
33
|
+
| IFilterSchemeItemSelect
|
|
34
|
+
| IFilterSchemeItemInput
|
|
35
|
+
| IFilterSchemeItemTabs
|
|
36
|
+
|
|
37
|
+
export type FilterSchemeType = FilterSchemeItem[]
|
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
declare function fluidPlayer(
|
|
2
|
+
target: HTMLVideoElement | string,
|
|
3
|
+
options?: Partial<FluidPlayerOptions>
|
|
4
|
+
): FluidPlayerInstance;
|
|
5
|
+
|
|
6
|
+
declare type AdditionalEventInfo = { mediaSourceType: 'source' | 'preRoll' | 'midRoll' | 'postRoll' };
|
|
7
|
+
declare type OnPlay = (event: 'play', callback: (additionalInfo: AdditionalEventInfo) => void) => void;
|
|
8
|
+
declare type OnPlaying =
|
|
9
|
+
(event: 'playing', callback: (event: Event, additionalInfo: AdditionalEventInfo) => void) => void;
|
|
10
|
+
declare type OnPause = (event: 'pause', callback: (additionalInfo: AdditionalEventInfo) => void) => void;
|
|
11
|
+
declare type OnEnded = (event: 'ended', callback: (additionalInfo: AdditionalEventInfo) => void) => void;
|
|
12
|
+
declare type OnSeeked = (event: 'seeked', callback: (additionalInfo: AdditionalEventInfo) => void) => void;
|
|
13
|
+
declare type OnTheaterModeOn =
|
|
14
|
+
(event: 'theatreModeOn', callback: (event: Event, additionalInfo: AdditionalEventInfo) => void) => void;
|
|
15
|
+
declare type OnTheaterModeOff =
|
|
16
|
+
(event: 'theatreModeOff', callback: (event: Event, additionalInfo: AdditionalEventInfo) => void) => void;
|
|
17
|
+
declare type OnTimeUpdate =
|
|
18
|
+
(event: 'timeupdate', callback: (time: number, additionalInfo: AdditionalEventInfo) => void) => void;
|
|
19
|
+
declare type OnMiniPlayerToggle =
|
|
20
|
+
(event: 'miniPlayerToggle', callback: (event: CustomEvent<{
|
|
21
|
+
isToggledOn: boolean
|
|
22
|
+
}>, additionalInfo: AdditionalEventInfo) => void) => void;
|
|
23
|
+
|
|
24
|
+
declare interface FluidPlayerInstance {
|
|
25
|
+
play: () => void;
|
|
26
|
+
pause: () => void;
|
|
27
|
+
skipTo: (seconds: number) => void;
|
|
28
|
+
setPlaybackSpeed: (speed: number) => void;
|
|
29
|
+
setVolume: (volume: number) => void;
|
|
30
|
+
toggleControlBar: (shouldToggle: boolean) => void;
|
|
31
|
+
toggleFullScreen: (shouldToggle: boolean) => void;
|
|
32
|
+
toggleMiniPlayer: (shouldToggle: boolean) => void;
|
|
33
|
+
setHtmlOnPauseBlock: (pauseBlock: { html: string; width: number; height: number; }) => void;
|
|
34
|
+
destroy: () => void;
|
|
35
|
+
dashInstance: () => any | null;
|
|
36
|
+
hlsInstance: () => any | null;
|
|
37
|
+
on: OnPlay & OnPlaying & OnPause & OnEnded & OnSeeked & OnTheaterModeOn & OnTheaterModeOff & OnTimeUpdate &
|
|
38
|
+
OnMiniPlayerToggle;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
declare interface LayoutControls {
|
|
42
|
+
primaryColor: false | string;
|
|
43
|
+
posterImage: false | string;
|
|
44
|
+
posterImageSize: 'auto' | 'cover' | 'contain';
|
|
45
|
+
playButtonShowing: boolean;
|
|
46
|
+
playPauseAnimation: boolean;
|
|
47
|
+
fillToContainer: boolean;
|
|
48
|
+
autoPlay: boolean;
|
|
49
|
+
preload: 'none' | 'metadata' | 'auto' | string;
|
|
50
|
+
mute: boolean;
|
|
51
|
+
doubleclickFullscreen: boolean;
|
|
52
|
+
subtitlesEnabled: boolean;
|
|
53
|
+
keyboardControl: boolean;
|
|
54
|
+
title: string;
|
|
55
|
+
loop: boolean;
|
|
56
|
+
logo: Partial<{
|
|
57
|
+
imageUrl: string | null;
|
|
58
|
+
position: 'top right' | 'top left' | 'bottom right' | 'bottom left';
|
|
59
|
+
clickUrl: string | null;
|
|
60
|
+
opacity: number;
|
|
61
|
+
mouseOverImageUrl: string | null;
|
|
62
|
+
imageMargin: string;
|
|
63
|
+
hideWithControls: boolean;
|
|
64
|
+
showOverAds: boolean;
|
|
65
|
+
}>;
|
|
66
|
+
controlBar: Partial<{
|
|
67
|
+
autoHide: boolean;
|
|
68
|
+
autoHideTimeout: number;
|
|
69
|
+
animated: boolean;
|
|
70
|
+
}>;
|
|
71
|
+
timelinePreview: VTTPreviewOptions | StaticPreviewOptions;
|
|
72
|
+
htmlOnPauseBlock: Partial<{
|
|
73
|
+
html: string | null;
|
|
74
|
+
height: number | null;
|
|
75
|
+
width: number | null;
|
|
76
|
+
}>;
|
|
77
|
+
layout: 'default' | string;
|
|
78
|
+
allowDownload: boolean;
|
|
79
|
+
playbackRateEnabled: boolean;
|
|
80
|
+
allowTheatre: boolean;
|
|
81
|
+
theatreAdvanced: Partial<{
|
|
82
|
+
theatreElement: string;
|
|
83
|
+
classToApply: string;
|
|
84
|
+
}>;
|
|
85
|
+
theatreSettings: Partial<{
|
|
86
|
+
width: string;
|
|
87
|
+
height: string;
|
|
88
|
+
marginTop: number;
|
|
89
|
+
horizontalAlign: 'center' | 'left' | 'right';
|
|
90
|
+
}>;
|
|
91
|
+
playerInitCallback: () => void;
|
|
92
|
+
persistentSettings: Partial<{
|
|
93
|
+
volume: boolean;
|
|
94
|
+
quality: boolean;
|
|
95
|
+
speed: boolean;
|
|
96
|
+
theatre: boolean;
|
|
97
|
+
}>;
|
|
98
|
+
controlForwardBackward: Partial<{
|
|
99
|
+
show: boolean;
|
|
100
|
+
doubleTapMobile: boolean;
|
|
101
|
+
}>;
|
|
102
|
+
contextMenu: Partial<{
|
|
103
|
+
controls: boolean;
|
|
104
|
+
links: Array<{
|
|
105
|
+
href: string;
|
|
106
|
+
label: string;
|
|
107
|
+
}>;
|
|
108
|
+
}>;
|
|
109
|
+
miniPlayer: Partial<{
|
|
110
|
+
enabled: boolean;
|
|
111
|
+
width: number;
|
|
112
|
+
height: number;
|
|
113
|
+
widthMobile: number;
|
|
114
|
+
placeholderText: string;
|
|
115
|
+
position: 'top right' | 'top left' | 'bottom right' | 'bottom left';
|
|
116
|
+
autoToggle: boolean;
|
|
117
|
+
}>;
|
|
118
|
+
showCardBoardView: boolean;
|
|
119
|
+
showCardBoardJoystick: boolean;
|
|
120
|
+
roundedCorners: number;
|
|
121
|
+
autoRotateFullScreen: boolean;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
declare interface VTTPreviewOptions {
|
|
125
|
+
file: string;
|
|
126
|
+
type: 'VTT';
|
|
127
|
+
spriteRelativePath?: boolean;
|
|
128
|
+
sprite?: string;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
declare interface StaticPreviewOptions {
|
|
132
|
+
type: 'static';
|
|
133
|
+
frames: Array<{
|
|
134
|
+
startTime: number;
|
|
135
|
+
endTime: number;
|
|
136
|
+
image: string;
|
|
137
|
+
x: number;
|
|
138
|
+
y: number;
|
|
139
|
+
w: number;
|
|
140
|
+
h: number;
|
|
141
|
+
}>
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
declare interface VastOptions {
|
|
145
|
+
adList: Array<PreRollAdOptions | MidRollAdOptions | PostRollAdOptions | OnPauseRollAdOptions>;
|
|
146
|
+
skipButtonCaption: string;
|
|
147
|
+
skipButtonClickCaption: string;
|
|
148
|
+
adText: string;
|
|
149
|
+
adTextPosition: 'top right' | 'top left' | 'bottom right' | 'bottom left';
|
|
150
|
+
adCTAText: string | boolean;
|
|
151
|
+
adCTATextPosition: 'top right' | 'top left' | 'bottom right' | 'bottom left';
|
|
152
|
+
adCTATextVast: boolean;
|
|
153
|
+
vastTimeout: number;
|
|
154
|
+
showPlayButton: boolean;
|
|
155
|
+
maxAllowedVastTagRedirects: number;
|
|
156
|
+
showProgressbarMarkers: boolean;
|
|
157
|
+
adClickable: boolean;
|
|
158
|
+
allowVPAID: boolean;
|
|
159
|
+
vastAdvanced: Partial<{
|
|
160
|
+
vastLoadedCallback: () => void;
|
|
161
|
+
noVastVideoCallback: () => void;
|
|
162
|
+
vastVideoSkippedCallback: () => void;
|
|
163
|
+
vastVideoEndedCallback: () => void;
|
|
164
|
+
}>;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
declare interface AdOptions {
|
|
168
|
+
vastTag: string;
|
|
169
|
+
roll: string;
|
|
170
|
+
fallbackVastTags?: Array<string>;
|
|
171
|
+
adText?: string;
|
|
172
|
+
adTextPosition?: 'top right' | 'top left' | 'bottom right' | 'bottom left';
|
|
173
|
+
adClickable?: boolean;
|
|
174
|
+
vAlign?: 'top' | 'middle' | 'bottom';
|
|
175
|
+
nonLinearDuration?: number;
|
|
176
|
+
size?: '468x60' | '300x250' | '728x90';
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
declare interface PreRollAdOptions extends AdOptions {
|
|
180
|
+
roll: 'preRoll';
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
declare interface MidRollAdOptions extends AdOptions {
|
|
184
|
+
roll: 'midRoll';
|
|
185
|
+
timer: number | string;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
declare interface PostRollAdOptions extends AdOptions {
|
|
189
|
+
roll: 'postRoll';
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
declare interface OnPauseRollAdOptions extends AdOptions {
|
|
193
|
+
roll: 'onPauseRoll';
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
declare interface ModulesOptions {
|
|
197
|
+
configureHls: (options: any) => any;
|
|
198
|
+
onBeforeInitHls: (hls: any) => void;
|
|
199
|
+
onAfterInitHls: (hls: any) => void;
|
|
200
|
+
configureDash: (options: any) => any;
|
|
201
|
+
onBeforeInitDash: (dash: any) => void;
|
|
202
|
+
onAfterInitDash: (dash: any) => void;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
declare interface FluidPlayerOptions {
|
|
206
|
+
layoutControls: Partial<LayoutControls>;
|
|
207
|
+
vastOptions: Partial<VastOptions>;
|
|
208
|
+
modules: Partial<ModulesOptions>;
|
|
209
|
+
onBeforeXMLHttpRequestOpen?: (request: XMLHttpRequest) => void;
|
|
210
|
+
onBeforeXMLHttpRequest?: (request: XMLHttpRequest) => void;
|
|
211
|
+
debug?: boolean;
|
|
212
|
+
captions: Partial<{
|
|
213
|
+
play: string;
|
|
214
|
+
pause: string;
|
|
215
|
+
mute: string;
|
|
216
|
+
unmute: string;
|
|
217
|
+
fullscreen: string;
|
|
218
|
+
exitFullscreen: string;
|
|
219
|
+
}>;
|
|
220
|
+
suggestedVideos?: {
|
|
221
|
+
configUrl: string | null;
|
|
222
|
+
};
|
|
223
|
+
hls?: {
|
|
224
|
+
overrideNative: boolean;
|
|
225
|
+
};
|
|
226
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ICategoryCard, IRawCategoryCard } from '../types/index.d.ts';
|
|
2
|
+
|
|
3
|
+
export interface IGroupCategories {
|
|
4
|
+
categories: ICategoryCard[],
|
|
5
|
+
name: string,
|
|
6
|
+
title: string,
|
|
7
|
+
weight: number
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export interface IRawGroupCategories {
|
|
11
|
+
categories: IRawCategoryCard[],
|
|
12
|
+
name: string,
|
|
13
|
+
title: string,
|
|
14
|
+
weight: number
|
|
15
|
+
}
|
package/types/index.d.ts
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
export * from './video-data.d.ts';
|
|
2
|
+
export * from './video-card.d.ts';
|
|
3
|
+
export * from './thumbs-urls.d.ts';
|
|
4
|
+
export * from './raw/raw-category-info.d.ts';
|
|
5
|
+
export * from './raw/raw-category-card.d.ts';
|
|
6
|
+
export * from './raw/raw-channel-card.d.ts';
|
|
7
|
+
export * from './raw/raw-channel-info.d.ts';
|
|
8
|
+
export * from './raw/raw-model-card.d.ts';
|
|
9
|
+
export * from './raw/raw-model-info.d.ts';
|
|
10
|
+
export * from './raw/raw-playlist-card.d.ts';
|
|
11
|
+
export * from './raw/raw-playlist-data.d.ts';
|
|
12
|
+
export * from './raw/raw-playlist-user.d.ts';
|
|
13
|
+
export * from './raw/raw-playlist-video.d.ts';
|
|
14
|
+
export * from './raw/raw-profile-data.d.ts';
|
|
15
|
+
export * from './raw/raw-video-data.d.ts';
|
|
16
|
+
export * from './raw/raw-video-card.d.ts';
|
|
17
|
+
export * from './card-info.d.ts';
|
|
18
|
+
export * from './parameter-model.d.ts';
|
|
19
|
+
export * from './breadcrumb-item.d.ts';
|
|
20
|
+
export * from './change-password-form.d.ts';
|
|
21
|
+
export * from './channel-card.d.ts';
|
|
22
|
+
export * from './country.d.ts';
|
|
23
|
+
export * from './category-card.d.ts';
|
|
24
|
+
export * from './contacts-form.d.ts';
|
|
25
|
+
export * from './input-types.d.ts';
|
|
26
|
+
export * from './contacts-scheme.d.ts';
|
|
27
|
+
export * from './authorization-forms.d.ts';
|
|
28
|
+
export * from './gender.d.ts';
|
|
29
|
+
export * from './group-categories.d.ts';
|
|
30
|
+
export * from './model-card.d.ts';
|
|
31
|
+
export * from './model-tag.d.ts';
|
|
32
|
+
export * from './playlist-card.d.ts';
|
|
33
|
+
export * from './playlist-data.d.ts';
|
|
34
|
+
export * from './playlist-info-type.d.ts';
|
|
35
|
+
export * from './playlist-video-form.d.ts';
|
|
36
|
+
export * from './profile-data.d.ts';
|
|
37
|
+
export * from './recovery-password-form.d.ts';
|
|
38
|
+
export * from './related-phrases.d.ts';
|
|
39
|
+
export * from './report-form.d.ts';
|
|
40
|
+
export * from './report-scheme.d.ts';
|
|
41
|
+
export * from './request-filters.d.ts';
|
|
42
|
+
export * from './model-filter.d.ts';
|
|
43
|
+
export * from './model-filter-payload.d.ts';
|
|
44
|
+
export * from './multi-suggest.d.ts';
|
|
45
|
+
export * from './navigation-items.d.ts';
|
|
46
|
+
export * from './link-item.d.ts';
|
|
47
|
+
export * from './fluid-player.d.ts';
|
|
48
|
+
export * from './chips-item.d.ts';
|
|
49
|
+
export * from './paginated-response.d.ts';
|
|
50
|
+
export * from './request-pagination.d.ts';
|
|
51
|
+
export * from './tab-item.d.ts';
|
|
52
|
+
export * from './filter-scheme.d.ts';
|
|
53
|
+
export * from './search-top-models.d.ts';
|
|
54
|
+
export * from './select-item.d.ts';
|
|
55
|
+
export * from './model-group.d.ts';
|
|
56
|
+
export * from './change-email-form.d.ts';
|
|
57
|
+
export * from './css-breakpoints.d.ts';
|
|
58
|
+
export * from './button-sizes.d.ts';
|
|
59
|
+
export * from './button-themes.d.ts';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type InputTypes = 'text' | 'number' | 'email' | 'password' | 'textarea' | 'date' | 'tel';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { IModelGroup } from '~/types/model-group';
|
|
2
|
+
|
|
3
|
+
export interface IModelFilterOptions {
|
|
4
|
+
name: string
|
|
5
|
+
title: string
|
|
6
|
+
quantity: number
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export interface IModelFilter {
|
|
10
|
+
kind: string
|
|
11
|
+
name: string
|
|
12
|
+
title: string
|
|
13
|
+
options: IModelFilterOptions[]
|
|
14
|
+
group: IModelGroup
|
|
15
|
+
}
|