@yaneart/yaneplayer 0.0.0-stage → 0.1.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/GUIDE.md +710 -0
- package/LICENSE +21 -0
- package/README.md +62 -2
- package/THIRD_PARTY_NOTICES.md +46 -0
- package/assets/player-preview.jpg +0 -0
- package/dist/ass-renderer-BnMSusia.js +84 -0
- package/dist/auto-captions/assets.js +9 -0
- package/dist/auto-captions/audio.js +42 -0
- package/dist/auto-captions/ort-wasm-simd-threaded.asyncify.mjs +124 -0
- package/dist/auto-captions/ort-wasm-simd-threaded.asyncify.wasm +0 -0
- package/dist/auto-captions/translation-worker.js +49 -0
- package/dist/auto-captions/worker.js +51 -0
- package/dist/core/ass-renderer.d.ts +5 -0
- package/dist/core/async.d.ts +5 -0
- package/dist/core/auto-caption-assets.d.ts +7 -0
- package/dist/core/auto-captions.d.ts +14 -0
- package/dist/core/caption-publication.d.ts +22 -0
- package/dist/core/commands.d.ts +10 -0
- package/dist/core/errors.d.ts +7 -0
- package/dist/core/hls.d.ts +4 -0
- package/dist/core/index.d.ts +6 -0
- package/dist/core/platform.d.ts +22 -0
- package/dist/core/preferences.d.ts +10 -0
- package/dist/core/runtime.d.ts +3 -0
- package/dist/core/source.d.ts +6 -0
- package/dist/core/subtitle-assets.d.ts +6 -0
- package/dist/core/subtitle-data.d.ts +11 -0
- package/dist/core/subtitles.d.ts +22 -0
- package/dist/core/tracks.d.ts +7 -0
- package/dist/core/translation-model.d.ts +6 -0
- package/dist/core/transport.d.ts +15 -0
- package/dist/core/types.d.ts +331 -0
- package/dist/core-DSvEY8F-.js +3347 -0
- package/dist/core.js +1 -0
- package/dist/element.d.ts +89 -0
- package/dist/hls-Cll783tL.js +20700 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +4771 -0
- package/dist/licenses/@fontsource-variable-manrope.txt +93 -0
- package/dist/licenses/@huggingface-jinja.txt +21 -0
- package/dist/licenses/@huggingface-tokenizers.txt +201 -0
- package/dist/licenses/@huggingface-transformers.txt +202 -0
- package/dist/licenses/@mingcute-icons.txt +202 -0
- package/dist/licenses/@videojs-core.txt +20 -0
- package/dist/licenses/@videojs-element.txt +20 -0
- package/dist/licenses/@videojs-hlsjs-video.txt +20 -0
- package/dist/licenses/@videojs-html.txt +20 -0
- package/dist/licenses/@videojs-media.txt +20 -0
- package/dist/licenses/@videojs-native-hls-video.txt +20 -0
- package/dist/licenses/@videojs-spf.txt +20 -0
- package/dist/licenses/@videojs-store.txt +20 -0
- package/dist/licenses/@videojs-utils.txt +20 -0
- package/dist/licenses/flatbuffers.txt +202 -0
- package/dist/licenses/hls.js.txt +28 -0
- package/dist/licenses/jassub.txt +22 -0
- package/dist/licenses/long.txt +202 -0
- package/dist/licenses/platform.txt +21 -0
- package/dist/licenses/protobufjs.txt +39 -0
- package/dist/licenses/third-party.txt +7941 -0
- package/dist/react.d.ts +56 -0
- package/dist/subtitles/assets.js +7 -0
- package/dist/subtitles/default.woff2 +0 -0
- package/dist/subtitles/jassub.js +1 -0
- package/dist/subtitles/wasm/jassub-worker-modern.wasm +0 -0
- package/dist/subtitles/wasm/jassub-worker.wasm +0 -0
- package/dist/subtitles/worker/worker.js +144 -0
- package/dist/ui/auto-captions.d.ts +6 -0
- package/dist/ui/captions.d.ts +6 -0
- package/dist/ui/controls.d.ts +28 -0
- package/dist/ui/fonts.d.ts +2 -0
- package/dist/ui/generated-captions.d.ts +7 -0
- package/dist/ui/icons.d.ts +24 -0
- package/dist/ui/labels.d.ts +74 -0
- package/dist/ui/rolling-captions.d.ts +10 -0
- package/dist/ui/settings.d.ts +17 -0
- package/dist/ui/speed.d.ts +9 -0
- package/dist/ui/subtitle-settings.d.ts +5 -0
- package/dist/ui/tooltips.d.ts +5 -0
- package/dist/ui/touch.d.ts +5 -0
- package/dist/ui/types.d.ts +1 -0
- package/package.json +77 -4
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
export declare function labels(language: string): {
|
|
2
|
+
play: string;
|
|
3
|
+
pause: string;
|
|
4
|
+
replay: string;
|
|
5
|
+
back: string;
|
|
6
|
+
forward: string;
|
|
7
|
+
mute: string;
|
|
8
|
+
unmute: string;
|
|
9
|
+
volume: string;
|
|
10
|
+
position: string;
|
|
11
|
+
settings: string;
|
|
12
|
+
helpTitle: string;
|
|
13
|
+
noOptions: string;
|
|
14
|
+
defaultTrack: string;
|
|
15
|
+
unavailableTrack: string;
|
|
16
|
+
lock: string;
|
|
17
|
+
unlock: string;
|
|
18
|
+
help: string;
|
|
19
|
+
speed: string;
|
|
20
|
+
speedTitle: string;
|
|
21
|
+
slower: string;
|
|
22
|
+
faster: string;
|
|
23
|
+
theater: string;
|
|
24
|
+
fullscreen: string;
|
|
25
|
+
exitFullscreen: string;
|
|
26
|
+
pip: string;
|
|
27
|
+
exitPip: string;
|
|
28
|
+
chapters: string;
|
|
29
|
+
platformError: string;
|
|
30
|
+
wakeError: string;
|
|
31
|
+
orientationError: string;
|
|
32
|
+
mediaSessionError: string;
|
|
33
|
+
preferenceError: string;
|
|
34
|
+
retry: string;
|
|
35
|
+
dismiss: string;
|
|
36
|
+
idle: string;
|
|
37
|
+
loading: string;
|
|
38
|
+
buffering: string;
|
|
39
|
+
pending: string;
|
|
40
|
+
seek: string;
|
|
41
|
+
error: string;
|
|
42
|
+
commandError: string;
|
|
43
|
+
blocked: string;
|
|
44
|
+
fullscreenError: string;
|
|
45
|
+
live: string;
|
|
46
|
+
unavailable: string;
|
|
47
|
+
preview: string;
|
|
48
|
+
normal: string;
|
|
49
|
+
previous: string;
|
|
50
|
+
next: string;
|
|
51
|
+
quality: string;
|
|
52
|
+
tracks: string;
|
|
53
|
+
audio: string;
|
|
54
|
+
subtitles: string;
|
|
55
|
+
captionSettings: string;
|
|
56
|
+
captionAppearance: string;
|
|
57
|
+
captionContour: string;
|
|
58
|
+
captionBackdrop: string;
|
|
59
|
+
captionSync: string;
|
|
60
|
+
resetCaptionDelay: string;
|
|
61
|
+
captionDelay: string;
|
|
62
|
+
seconds: string;
|
|
63
|
+
earlier: string;
|
|
64
|
+
later: string;
|
|
65
|
+
captionAssStyle: string;
|
|
66
|
+
captionHostRendered: string;
|
|
67
|
+
captionVideoOnly: string;
|
|
68
|
+
off: string;
|
|
69
|
+
auto: string;
|
|
70
|
+
noQuality: string;
|
|
71
|
+
noAudio: string;
|
|
72
|
+
noSubtitles: string;
|
|
73
|
+
};
|
|
74
|
+
export declare function time(seconds: number | null): string;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { CaptionStyle } from "../core/types.js";
|
|
2
|
+
/** Bounded published words; recognition and the video clock belong to the player. */
|
|
3
|
+
export declare function createRollingCaptions(video: HTMLVideoElement, dock: HTMLElement): {
|
|
4
|
+
layer: HTMLDivElement;
|
|
5
|
+
enqueue: (value: string, sentence: string) => boolean;
|
|
6
|
+
tick: (now: number, captionStyle: CaptionStyle, hidden: boolean) => void;
|
|
7
|
+
clear: () => void;
|
|
8
|
+
readonly pendingWords: number;
|
|
9
|
+
dispose(): void;
|
|
10
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import "@videojs/html/ui/menu-item";
|
|
2
|
+
import type { PlayerRuntime, PlayerSnapshot } from "../core/types.js";
|
|
3
|
+
import type { createGeneratedCaptions } from "./generated-captions.js";
|
|
4
|
+
type Menu = HTMLElement & {
|
|
5
|
+
open: boolean;
|
|
6
|
+
close(): void;
|
|
7
|
+
};
|
|
8
|
+
export declare function createSettings(region: HTMLElement, dock: HTMLElement, runtime: PlayerRuntime, run: (operation: () => Promise<void>) => void, signal: AbortSignal, generatedCaptions: ReturnType<typeof createGeneratedCaptions>): {
|
|
9
|
+
menus: Menu[];
|
|
10
|
+
sheet: HTMLDialogElement;
|
|
11
|
+
message(value: string): void;
|
|
12
|
+
open: (trigger: HTMLElement) => void;
|
|
13
|
+
update: (snapshot: PlayerSnapshot, language: string, available: boolean, height: number) => void;
|
|
14
|
+
close: (includeSheet?: boolean) => void;
|
|
15
|
+
dispose: () => void;
|
|
16
|
+
};
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import "@videojs/html/ui/popover";
|
|
2
|
+
import type { PlayerRuntime, PlayerSnapshot } from "../core/types.js";
|
|
3
|
+
export declare function createSpeed(document: Document, trigger: HTMLElement, runtime: PlayerRuntime, run: (operation: () => Promise<void>) => void, signal: AbortSignal, openChapters: () => void): {
|
|
4
|
+
popup: HTMLElement & {
|
|
5
|
+
open: boolean;
|
|
6
|
+
close(): void;
|
|
7
|
+
};
|
|
8
|
+
update(snapshot: PlayerSnapshot, language: string, available: boolean): void;
|
|
9
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { PlayerRuntime, PlayerSnapshot } from "../core/types.js";
|
|
2
|
+
export declare function createSubtitleSettings(document: Document, runtime: PlayerRuntime, run: (operation: () => Promise<void>) => void, signal: AbortSignal): {
|
|
3
|
+
element: HTMLDivElement;
|
|
4
|
+
update(snapshot: PlayerSnapshot, language: string, available: boolean): void;
|
|
5
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/** Touch gestures affect presentation; playback stays with the runtime callbacks. */
|
|
2
|
+
export declare function createTouch(region: HTMLElement, video: HTMLVideoElement, wake: () => void, togglePlay: () => void, seekBy: (seconds: number) => void, signal: AbortSignal): {
|
|
3
|
+
cancel: () => void;
|
|
4
|
+
suppressClick: () => boolean;
|
|
5
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { PlayerNavigation } from "../core/types.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,79 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yaneart/yaneplayer",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Universal video player Web Component with a TypeScript core",
|
|
5
|
+
"publishConfig": {
|
|
6
|
+
"access": "public"
|
|
7
|
+
},
|
|
8
|
+
"type": "module",
|
|
9
|
+
"license": "MIT",
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "https://github.com/Yaneart/yanePlayer.git"
|
|
13
|
+
},
|
|
14
|
+
"engines": {
|
|
15
|
+
"node": ">=24.18.0 <25"
|
|
16
|
+
},
|
|
17
|
+
"packageManager": "npm@11.16.0",
|
|
18
|
+
"main": "./dist/index.js",
|
|
19
|
+
"types": "./dist/index.d.ts",
|
|
20
|
+
"exports": {
|
|
21
|
+
".": {
|
|
22
|
+
"types": "./dist/index.d.ts",
|
|
23
|
+
"import": "./dist/index.js"
|
|
24
|
+
},
|
|
25
|
+
"./core": {
|
|
26
|
+
"types": "./dist/core/index.d.ts",
|
|
27
|
+
"import": "./dist/core.js"
|
|
28
|
+
},
|
|
29
|
+
"./react": {
|
|
30
|
+
"types": "./dist/react.d.ts"
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"files": [
|
|
34
|
+
"dist",
|
|
35
|
+
"README.md",
|
|
36
|
+
"GUIDE.md",
|
|
37
|
+
"assets/player-preview.jpg",
|
|
38
|
+
"LICENSE",
|
|
39
|
+
"THIRD_PARTY_NOTICES.md"
|
|
40
|
+
],
|
|
41
|
+
"sideEffects": [
|
|
42
|
+
"./dist/index.js"
|
|
43
|
+
],
|
|
44
|
+
"scripts": {
|
|
45
|
+
"format": "prettier --write .",
|
|
46
|
+
"format:check": "prettier --check .",
|
|
47
|
+
"build": "vite build && tsc -p tsconfig.build.json && node scripts/copy-assets.mjs",
|
|
48
|
+
"check:package": "node tests/package.mjs",
|
|
49
|
+
"check:runtime": "node --test tests/commands.mjs",
|
|
50
|
+
"check:touch": "node tests/touch.mjs",
|
|
51
|
+
"check:tracks": "node --test tests/tracks.mjs tests/commands.mjs && node tests/selections.mjs",
|
|
52
|
+
"check:subtitles": "node --test tests/subtitle-data.mjs && node tests/subtitles.mjs",
|
|
53
|
+
"check:auto-captions": "node tests/auto-captions.mjs",
|
|
54
|
+
"check:platform": "node --test tests/preferences.mjs && node tests/platform.mjs",
|
|
55
|
+
"prepack": "npm run build",
|
|
56
|
+
"check:caption-publication": "node tests/caption-publication.mjs",
|
|
57
|
+
"check:caption-presentation": "node tests/caption-reading.mjs && node tests/caption-stability.mjs && node tests/caption-feedback.mjs",
|
|
58
|
+
"check:caption-package": "node tests/caption-package.mjs"
|
|
59
|
+
},
|
|
60
|
+
"devDependencies": {
|
|
61
|
+
"@fontsource-variable/manrope": "5.3.0",
|
|
62
|
+
"@huggingface/transformers": "4.3.1",
|
|
63
|
+
"@mingcute/icons": "3.0.2",
|
|
64
|
+
"@types/react": "19.3.0",
|
|
65
|
+
"@types/react-dom": "19.3.0",
|
|
66
|
+
"@videojs/core": "10.2.0",
|
|
67
|
+
"@videojs/hlsjs-video": "10.2.0",
|
|
68
|
+
"@videojs/html": "10.2.0",
|
|
69
|
+
"@videojs/store": "10.2.0",
|
|
70
|
+
"jassub": "2.5.23",
|
|
71
|
+
"playwright": "1.61.1",
|
|
72
|
+
"prettier": "3.9.10",
|
|
73
|
+
"react": "19.3.1",
|
|
74
|
+
"react-dom": "19.3.1",
|
|
75
|
+
"rolldown": "1.2.15",
|
|
76
|
+
"typescript": "7.0.2",
|
|
77
|
+
"vite": "8.3.5"
|
|
78
|
+
}
|
|
79
|
+
}
|