@latest-thinking/lt-player 1.2.0-d → 2.0.0-a
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/.editorconfig +1 -1
- package/.node-version +1 -0
- package/.nvmrc +1 -0
- package/README.md +162 -0
- package/dist/main.js +24375 -0
- package/package.json +31 -67
- package/tsconfig.json +2 -1
- package/vite-dev.config.mts +35 -0
- package/vite.config.mts +40 -0
- package/ README.md +0 -270
- package/.babelrc +0 -11
- package/.eslintrc.js +0 -6
- package/dist/css/lt-player-main.css +0 -3
- package/dist/css/lt-player-main.css.map +0 -1
- package/dist/fonts/0574e80a2483be7b033e.otf +0 -0
- package/dist/fonts/34274fbfb2f270b8d53b.otf +0 -0
- package/dist/fonts/80acced0ba3630ee652b.otf +0 -0
- package/dist/fonts/8ccea4947561e7008d19.otf +0 -0
- package/dist/fonts/d355445ed7d61b887e58.otf +0 -0
- package/dist/js/lt-player-main.js +0 -3
- package/dist/js/lt-player-main.js.LICENSE.txt +0 -9
- package/dist/js/lt-player-main.js.map +0 -1
- package/examples/basic.html +0 -35
- package/examples/lt-page-with-player.html +0 -3529
- package/examples/lt-page-with-player_files/Weiskopf_Coverphoto.jpg +0 -0
- package/examples/lt-page-with-player_files/ajax-progress.module.css +0 -49
- package/examples/lt-page-with-player_files/align.module.css +0 -32
- package/examples/lt-page-with-player_files/announce.js +0 -49
- package/examples/lt-page-with-player_files/autocomplete-loading.module.css +0 -22
- package/examples/lt-page-with-player_files/autocomplete.css +0 -16
- package/examples/lt-page-with-player_files/bootstrap.css +0 -22691
- package/examples/lt-page-with-player_files/clearfix.module.css +0 -15
- package/examples/lt-page-with-player_files/container-inline.module.css +0 -16
- package/examples/lt-page-with-player_files/cookiesjsr.min.css +0 -10
- package/examples/lt-page-with-player_files/core.css +0 -97
- package/examples/lt-page-with-player_files/details.module.css +0 -10
- package/examples/lt-page-with-player_files/fieldgroup.module.css +0 -9
- package/examples/lt-page-with-player_files/hidden.module.css +0 -53
- package/examples/lt-page-with-player_files/himme-alexander-beyond_0.jpg +0 -0
- package/examples/lt-page-with-player_files/item-list.module.css +0 -19
- package/examples/lt-page-with-player_files/js.module.css +0 -22
- package/examples/lt-page-with-player_files/latest_thinking.style.css +0 -6496
- package/examples/lt-page-with-player_files/logo-small.png +0 -0
- package/examples/lt-page-with-player_files/menu.css +0 -64
- package/examples/lt-page-with-player_files/nowrap.module.css +0 -8
- package/examples/lt-page-with-player_files/paragraphs.unpublished.css +0 -3
- package/examples/lt-page-with-player_files/position-container.module.css +0 -8
- package/examples/lt-page-with-player_files/progress.module.css +0 -51
- package/examples/lt-page-with-player_files/radix.style.css +0 -1
- package/examples/lt-page-with-player_files/reset-appearance.module.css +0 -15
- package/examples/lt-page-with-player_files/resize.module.css +0 -21
- package/examples/lt-page-with-player_files/search_api_autocomplete.css +0 -41
- package/examples/lt-page-with-player_files/sticky-header.module.css +0 -13
- package/examples/lt-page-with-player_files/system-status-counter.css +0 -30
- package/examples/lt-page-with-player_files/system-status-report-counters.css +0 -27
- package/examples/lt-page-with-player_files/system-status-report-general-info.css +0 -14
- package/examples/lt-page-with-player_files/tabledrag.module.css +0 -98
- package/examples/lt-page-with-player_files/tablesort.module.css +0 -19
- package/examples/lt-page-with-player_files/theme.css +0 -446
- package/examples/lt-page-with-player_files/thumbnail_MPI_CBS_Eingangsbereich.jpg +0 -0
- package/examples/lt-page-with-player_files/tree-child.module.css +0 -18
- package/examples/lt-page-with-player_files/widget-min.js +0 -10
- package/examples/lt-website.html +0 -76
- package/examples/portrait-with-subtitles.html +0 -81
- package/examples/samples/vtt/Pahl-Kerstin-Maria-MAIN-20230320.vtt +0 -765
- package/examples/samples/vtt/Sobolev-Anton-Subtitles-20230518_0.vtt +0 -352
- package/examples/samples/vtt/demo.vtt +0 -7
- package/src/assets/css/sample.css +0 -12
- package/src/assets/fonts/museo/MuseoSans-100.otf +0 -0
- package/src/assets/fonts/museo/MuseoSans-300.otf +0 -0
- package/src/assets/fonts/museo/MuseoSans-500.otf +0 -0
- package/src/assets/fonts/museo/MuseoSans-700.otf +0 -0
- package/src/assets/fonts/museo/MuseoSans-900.otf +0 -0
- package/src/assets/icons/arrow-down.svg +0 -8
- package/src/assets/icons/arrow-left.svg +0 -8
- package/src/assets/icons/chevron-down-full.svg +0 -7
- package/src/assets/icons/chevron-down.svg +0 -7
- package/src/assets/icons/chevron-up-full.svg +0 -7
- package/src/assets/icons/chevron-up.svg +0 -7
- package/src/assets/icons/close.svg +0 -8
- package/src/assets/icons/compass.svg +0 -8
- package/src/assets/icons/external-link.svg +0 -9
- package/src/assets/icons/facebook.svg +0 -7
- package/src/assets/icons/fast-backward.svg +0 -8
- package/src/assets/icons/fast-forward.svg +0 -8
- package/src/assets/icons/file-text.svg +0 -11
- package/src/assets/icons/home.svg +0 -8
- package/src/assets/icons/logo-big.png +0 -0
- package/src/assets/icons/logo.png +0 -0
- package/src/assets/icons/maximize.svg +0 -7
- package/src/assets/icons/mini-player.svg +0 -8
- package/src/assets/icons/minimize.svg +0 -7
- package/src/assets/icons/more-vertical.svg +0 -9
- package/src/assets/icons/mute.svg +0 -9
- package/src/assets/icons/pause.svg +0 -8
- package/src/assets/icons/play.svg +0 -8
- package/src/assets/icons/search.svg +0 -8
- package/src/assets/icons/settings.svg +0 -8
- package/src/assets/icons/share.svg +0 -11
- package/src/assets/icons/skip-backward.svg +0 -8
- package/src/assets/icons/skip-forward.svg +0 -8
- package/src/assets/icons/speed-1-5.svg +0 -7
- package/src/assets/icons/speed-1.svg +0 -7
- package/src/assets/icons/speed-2.svg +0 -7
- package/src/assets/icons/subtitles.svg +0 -7
- package/src/assets/icons/twitter.svg +0 -7
- package/src/assets/icons/university.svg +0 -9
- package/src/assets/icons/user.svg +0 -8
- package/src/assets/icons/volume-1.svg +0 -15
- package/src/assets/icons/volume-2.svg +0 -15
- package/src/assets/icons/volume-3.svg +0 -15
- package/src/assets/sass/abstracts/_mixins.scss +0 -145
- package/src/assets/sass/abstracts/_placeholders.scss +0 -112
- package/src/assets/sass/abstracts/_variables.scss +0 -68
- package/src/assets/sass/abstracts/all.scss +0 -4
- package/src/assets/sass/app.scss +0 -100
- package/src/assets/sass/components/_all.scss +0 -6
- package/src/assets/sass/components/_buttons.scss +0 -1
- package/src/assets/sass/components/_images.scss +0 -4
- package/src/assets/sass/components/_loader.scss +0 -187
- package/src/assets/sass/components/_modal.scss +0 -365
- package/src/assets/sass/components/_range.scss +0 -33
- package/src/assets/sass/core/_all.scss +0 -13
- package/src/assets/sass/core/_fonts.scss +0 -55
- package/src/assets/sass/core/_player.scss +0 -70
- package/src/assets/sass/core/_typography.scss +0 -13
- package/src/assets/sass/layout/_all.scss +0 -3
- package/src/assets/sass/layout/_grid.scss +0 -0
- package/src/assets/sass/sections/_additional-info.scss +0 -90
- package/src/assets/sass/sections/_all.scss +0 -6
- package/src/assets/sass/sections/_control.scss +0 -122
- package/src/assets/sass/sections/_poster.scss +0 -319
- package/src/assets/sass/sections/_settings.scss +0 -512
- package/src/assets/sass/sections/_share.scss +0 -250
- package/src/assets/sass/sections/_subtitles.scss +0 -85
- package/src/assets/sass/sections/controllers/_all.scss +0 -4
- package/src/assets/sass/sections/controllers/_botom.scss +0 -522
- package/src/assets/sass/sections/controllers/_mini-player.scss +0 -169
- package/src/assets/sass/sections/controllers/_notification-rewind-forward.scss +0 -260
- package/src/assets/sass/sections/controllers/_top.scss +0 -169
- package/src/components/LTPlayerDevMethode.ts +0 -192
- package/src/components/LTPlayerEventsManager.ts +0 -31
- package/src/components/LTPlayerHls.ts +0 -38
- package/src/components/LTPlayerManager.ts +0 -266
- package/src/components/LTPlayerSettingsManager.ts +0 -117
- package/src/components/LTPlayerSetup.ts +0 -286
- package/src/components/LTPlayerStatusFeedback.ts +0 -76
- package/src/components/LTPlayerStorage.ts +0 -58
- package/src/components/LTPlayerType.ts +0 -371
- package/src/components/LTPlayerUpdate.ts +0 -61
- package/src/components/addInfo/LTPLayerAddInfoResizeManager.ts +0 -15
- package/src/components/addInfo/LTPlayerAddInfoDesktop.ts +0 -127
- package/src/components/addInfo/LTPlayerAddInfoManager.ts +0 -230
- package/src/components/addInfo/LTPlayerAddInfoMobile.ts +0 -113
- package/src/components/captions/LTPlayerCaptions.ts +0 -80
- package/src/components/config/LTPlayerConfig.ts +0 -280
- package/src/components/config/LTPlayerConfigProcessor.ts +0 -604
- package/src/components/controls/LTPlayerChapters.ts +0 -285
- package/src/components/controls/LTPlayerControls.ts +0 -57
- package/src/components/controls/LTPlayerControlsEvents.ts +0 -943
- package/src/components/controls/LTPlayerMini.ts +0 -285
- package/src/components/controls/LTPlayerSettingsControlsManager.ts +0 -60
- package/src/components/controls/settings/LTPlayerCommonSettingsControllers.ts +0 -71
- package/src/components/controls/settings/LTPlayerDesktopSettingsControllers.ts +0 -135
- package/src/components/controls/settings/LTPlayerMobileSettingsControllers.ts +0 -211
- package/src/components/events/LTPlayer.ts +0 -194
- package/src/components/events/LTPlayerCommon.ts +0 -252
- package/src/components/events/LTPlayerDesktop.ts +0 -222
- package/src/components/events/LTPlayerMobile.ts +0 -243
- package/src/components/poster/LTPlayerPoster.ts +0 -78
- package/src/components/poster/LTPlayerPosterEvents.ts +0 -172
- package/src/components/poster/LTPlayerPosterManager.ts +0 -46
- package/src/components/poster/LTPlayerPosterPreload.ts +0 -51
- package/src/components/poster/LTPlayerPosterPreloadEvents.ts +0 -152
- package/src/components/share/LTPlayerShareDesktop.ts +0 -131
- package/src/components/share/LTPlayerShareEvents.ts +0 -64
- package/src/components/share/LTPlayerShareManager.ts +0 -58
- package/src/components/share/LTPlayerShareMobile.ts +0 -154
- package/src/components/video/LTPlayerVideo.ts +0 -49
- package/src/global/controllers/LTPlayerController.ts +0 -58
- package/src/global/interfaces/EventsInterfaces.ts +0 -11
- package/src/global/interfaces/SettingsControlsInterfaces.ts +0 -3
- package/src/global/interfaces/TypeInterface.ts +0 -9
- package/src/global/types/ModuleTypes.d.ts +0 -35
- package/src/global/types/ModuleViews.d.ts +0 -13
- package/src/global/types/ModuleWindow.d.ts +0 -12
- package/src/global/types/Modules.d.ts +0 -44
- package/src/index.ts +0 -10
- package/src/json-schema/player-config.json +0 -16
- package/src/services/Helper.ts +0 -147
- package/src/services/IconsService.ts +0 -124
- package/src/services/LTPlayerRotateDeviceService.ts +0 -15
- package/src/services/LoaderService.ts +0 -21
- package/src/services/ResizeService.ts +0 -352
- package/src/services/TemplateService.ts +0 -136
- package/src/services/ValidatorService.ts +0 -31
- package/src/views/additionalInfo.handlebars +0 -103
- package/src/views/background.handlebars +0 -5
- package/src/views/controls.handlebars +0 -390
- package/src/views/onloadPoster.handlebars +0 -1
- package/src/views/poster.handlebars +0 -69
- package/src/views/settings.handlebars +0 -31
- package/src/views/settings.mobile.handlebars +0 -22
- package/src/views/share.handlebars +0 -101
- package/src/views/template.handlebars +0 -15
package/package.json
CHANGED
|
@@ -1,69 +1,33 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
"
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
"
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
"eslint-webpack-plugin": "^3.1.1",
|
|
34
|
-
"fixed": "^0.3.1",
|
|
35
|
-
"hammerjs": "^2.0.8",
|
|
36
|
-
"handlebars": "^4.7.7",
|
|
37
|
-
"hls.js": "^1.4.1-0.canary.9078",
|
|
38
|
-
"html-loader": "^3.1.0",
|
|
39
|
-
"json-schema-library": "^7.4.4",
|
|
40
|
-
"mini-css-extract-plugin": "^2.5.1",
|
|
41
|
-
"mustache": "^4.2.0",
|
|
42
|
-
"plyr": "^3.7.3",
|
|
43
|
-
"postcss-loader": "^6.2.1",
|
|
44
|
-
"postcss-preset-env": "^7.2.3",
|
|
45
|
-
"rangetouch": "^2.0.1",
|
|
46
|
-
"raw-loader": "^4.0.2",
|
|
47
|
-
"resolve-url-loader": "^5.0.0",
|
|
48
|
-
"stylelint": "^14.2.0",
|
|
49
|
-
"stylelint-config-standard": "^24.0.0",
|
|
50
|
-
"stylelint-webpack-plugin": "^3.1.1",
|
|
51
|
-
"ts-loader": "^9.4.1",
|
|
52
|
-
"typescript": "^4.9.3",
|
|
53
|
-
"webpack-cli": "^4.9.1",
|
|
54
|
-
"webpack-dev-server": "^4.7.3",
|
|
55
|
-
"webpack-merge": "^5.8.0"
|
|
56
|
-
},
|
|
57
|
-
"devDependencies": {
|
|
58
|
-
"@types/webpack-env": "^1.18.0",
|
|
59
|
-
"@typescript-eslint/eslint-plugin": "^5.48.0",
|
|
60
|
-
"@typescript-eslint/parser": "^5.48.0",
|
|
61
|
-
"dotenv-webpack": "^8.0.1",
|
|
62
|
-
"eslint": "^8.31.0",
|
|
63
|
-
"eslint-webpack-plugin": "^3.1.1",
|
|
64
|
-
"plyr": "^3.7.3",
|
|
65
|
-
"sass": "^1.60.0",
|
|
66
|
-
"sass-loader": "^13.2.2",
|
|
67
|
-
"webpack": "^5.76.3"
|
|
68
|
-
}
|
|
2
|
+
"name": "@latest-thinking/lt-player",
|
|
3
|
+
"version": "2.0.0-a",
|
|
4
|
+
"description": "Latest Thinking Player",
|
|
5
|
+
"main": "dist/main.js",
|
|
6
|
+
"module": "dist/main.js",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"dev": "vite dev --host",
|
|
9
|
+
"build": "vite -c vite.config.mts build",
|
|
10
|
+
"preview": "vite -c vite-dev.config.mts build",
|
|
11
|
+
"test": "test"
|
|
12
|
+
},
|
|
13
|
+
"directories": {
|
|
14
|
+
"test": "tests"
|
|
15
|
+
},
|
|
16
|
+
"author": "Welink",
|
|
17
|
+
"license": "ISC",
|
|
18
|
+
"devDependencies": {
|
|
19
|
+
"eslint": "^8.56.0",
|
|
20
|
+
"jest": "^29.7.0",
|
|
21
|
+
"lil-gui": "^0.19.1",
|
|
22
|
+
"sass": "^1.70.0",
|
|
23
|
+
"vite": "^5.0.11",
|
|
24
|
+
"vite-plugin-handlebars": "^2.0.0"
|
|
25
|
+
},
|
|
26
|
+
"dependencies": {
|
|
27
|
+
"ajv": "^8.12.0",
|
|
28
|
+
"handlebars": "^4.7.8",
|
|
29
|
+
"media-icons": "^1.0.0",
|
|
30
|
+
"tslog": "^4.9.2",
|
|
31
|
+
"vidstack": "^1.10.9"
|
|
32
|
+
}
|
|
69
33
|
}
|
package/tsconfig.json
CHANGED
|
@@ -10,13 +10,14 @@
|
|
|
10
10
|
"moduleResolution": "node",
|
|
11
11
|
"resolveJsonModule": true,
|
|
12
12
|
"esModuleInterop": true,
|
|
13
|
+
"strictNullChecks": true,
|
|
13
14
|
"lib": [
|
|
14
15
|
"dom",
|
|
15
16
|
"es5",
|
|
16
17
|
"scripthost",
|
|
17
18
|
"webworker"
|
|
18
19
|
],
|
|
19
|
-
"typeRoots": ["./node_modules/@types", "./src/
|
|
20
|
+
"typeRoots": ["./node_modules/@types", "./src/types"],
|
|
20
21
|
"allowSyntheticDefaultImports": true
|
|
21
22
|
},
|
|
22
23
|
"include": [
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import {defineConfig} from 'vite'
|
|
2
|
+
import {resolve} from 'path';
|
|
3
|
+
// @ts-ignore
|
|
4
|
+
import handlebars from 'vite-plugin-handlebars';
|
|
5
|
+
|
|
6
|
+
export default defineConfig({
|
|
7
|
+
plugins: [handlebars({
|
|
8
|
+
partialDirectory: resolve(__dirname, 'templates'),
|
|
9
|
+
})],
|
|
10
|
+
publicDir: "public/",
|
|
11
|
+
css: {},
|
|
12
|
+
build: {
|
|
13
|
+
manifest: true,
|
|
14
|
+
minify: true,
|
|
15
|
+
reportCompressedSize: true,
|
|
16
|
+
lib: {
|
|
17
|
+
entry: resolve(__dirname, 'src/main.ts'),
|
|
18
|
+
name: "LT Player",
|
|
19
|
+
fileName: "main",
|
|
20
|
+
formats: ["es"]
|
|
21
|
+
},
|
|
22
|
+
rollupOptions: {
|
|
23
|
+
output: {
|
|
24
|
+
inlineDynamicImports: false,
|
|
25
|
+
entryFileNames: 'main.js',
|
|
26
|
+
manualChunks: () => 'main.mjs',
|
|
27
|
+
// Specify the file format to be .mjs
|
|
28
|
+
format: 'es',
|
|
29
|
+
// Since we're combining everything into one file,
|
|
30
|
+
// we don't need separate asset files.
|
|
31
|
+
assetFileNames: '[name].[ext]'
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
})
|
package/vite.config.mts
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import {defineConfig} from 'vite'
|
|
2
|
+
import {resolve} from 'path';
|
|
3
|
+
// @ts-ignore
|
|
4
|
+
import handlebars from 'vite-plugin-handlebars';
|
|
5
|
+
|
|
6
|
+
export default defineConfig({
|
|
7
|
+
plugins: [handlebars({
|
|
8
|
+
partialDirectory: resolve(__dirname, 'templates'),
|
|
9
|
+
})],
|
|
10
|
+
publicDir: false,
|
|
11
|
+
css: {},
|
|
12
|
+
build: {
|
|
13
|
+
manifest: false,
|
|
14
|
+
minify: true,
|
|
15
|
+
reportCompressedSize: true,
|
|
16
|
+
lib: {
|
|
17
|
+
entry: resolve(__dirname, 'src/main.ts'),
|
|
18
|
+
name: "LT Player",
|
|
19
|
+
fileName: "main",
|
|
20
|
+
formats: ["es"]
|
|
21
|
+
},
|
|
22
|
+
rollupOptions: {
|
|
23
|
+
external: ['vidstack', 'handlebars'],
|
|
24
|
+
output: {
|
|
25
|
+
globals: {
|
|
26
|
+
"vidstack": "vidstack",
|
|
27
|
+
"handlebars": "Handlebars"
|
|
28
|
+
},
|
|
29
|
+
inlineDynamicImports: false,
|
|
30
|
+
entryFileNames: 'main.js',
|
|
31
|
+
manualChunks: () => 'main.mjs',
|
|
32
|
+
// Specify the file format to be .mjs
|
|
33
|
+
format: 'es',
|
|
34
|
+
// Since we're combining everything into one file,
|
|
35
|
+
// we don't need separate asset files.
|
|
36
|
+
assetFileNames: '[name].[ext]'
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
})
|
package/ README.md
DELETED
|
@@ -1,270 +0,0 @@
|
|
|
1
|
-
# Title
|
|
2
|
-
____
|
|
3
|
-
# Features
|
|
4
|
-
|
|
5
|
-
# Quick setup
|
|
6
|
-
|
|
7
|
-
## HTML
|
|
8
|
-
|
|
9
|
-
Player extends upon the standard [HTML5 media element](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement) markup so that's all you need for those types.
|
|
10
|
-
|
|
11
|
-
### HTML5 Video
|
|
12
|
-
|
|
13
|
-
```html
|
|
14
|
-
<div class="lt-player"
|
|
15
|
-
data-lt-player-config='{config}'>
|
|
16
|
-
</div>
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
**Note**: It is mandatory to add the class with the name "lt-player", to be instantiated by the Player Manager and data-lt-player-config = {config object}
|
|
20
|
-
|
|
21
|
-
## JavaScript
|
|
22
|
-
|
|
23
|
-
```html
|
|
24
|
-
<div class="lt-player"
|
|
25
|
-
data-lt-player-config='{config}'>
|
|
26
|
-
</div>
|
|
27
|
-
<script>
|
|
28
|
-
window.addEventListener('load', () => {
|
|
29
|
-
const player = Player.initByClassOrID('lt-player').then(player => {
|
|
30
|
-
return player;
|
|
31
|
-
});
|
|
32
|
-
})
|
|
33
|
-
</script>
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
You can use initByClassOrID method, to instantiate player by string name. Mandatory data-lt-player-config={config object}
|
|
37
|
-
|
|
38
|
-
...OR...
|
|
39
|
-
|
|
40
|
-
You can use initBySelector method, to instantiate player by HTMLElement. Mandatory data-lt-player-config={config object}
|
|
41
|
-
|
|
42
|
-
```html
|
|
43
|
-
<div class="lt-player">
|
|
44
|
-
</div>
|
|
45
|
-
<script>
|
|
46
|
-
window.addEventListener('load', () => {
|
|
47
|
-
let selector = document.querySelector('lt-player');
|
|
48
|
-
|
|
49
|
-
const player = Player.initBySelector(selector).then(player => {
|
|
50
|
-
return player;
|
|
51
|
-
});
|
|
52
|
-
})
|
|
53
|
-
</script>
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
You can instantiate multiple player by HTMLElement. Mandatory data-lt-player-config={config object}
|
|
57
|
-
|
|
58
|
-
```html
|
|
59
|
-
<div class="lt-player">
|
|
60
|
-
</div>
|
|
61
|
-
<div class="lt-player">
|
|
62
|
-
</div>
|
|
63
|
-
<div class="lt-player">
|
|
64
|
-
</div>
|
|
65
|
-
<div class="lt-player">
|
|
66
|
-
</div>
|
|
67
|
-
<script>
|
|
68
|
-
window.addEventListener('load', () => {
|
|
69
|
-
let selectors = document.querySelectorAll('lt-player');
|
|
70
|
-
|
|
71
|
-
selectors.forEach(item => {
|
|
72
|
-
Player.initBySelector(item).then(player => {
|
|
73
|
-
console.log(player)
|
|
74
|
-
});
|
|
75
|
-
})
|
|
76
|
-
})
|
|
77
|
-
</script>
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
You can instantiate by javascript object config. See examples:
|
|
81
|
-
```html
|
|
82
|
-
<div class="lt-player">
|
|
83
|
-
</div>
|
|
84
|
-
<script>
|
|
85
|
-
window.addEventListener('load', () => {
|
|
86
|
-
|
|
87
|
-
const objectConfig =
|
|
88
|
-
{
|
|
89
|
-
version: "2",
|
|
90
|
-
body: {
|
|
91
|
-
playerContainer: 'lt-player' //mandatory
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
const player = Player.initPlayer(objectConfig).then(player => {
|
|
96
|
-
return player;
|
|
97
|
-
});
|
|
98
|
-
})
|
|
99
|
-
</script>
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
```html
|
|
103
|
-
<div class="lt-player">
|
|
104
|
-
</div>
|
|
105
|
-
<script>
|
|
106
|
-
window.addEventListener('load', () => {
|
|
107
|
-
|
|
108
|
-
const objectConfig =
|
|
109
|
-
{
|
|
110
|
-
version: "2",
|
|
111
|
-
body: {
|
|
112
|
-
playerContainer: 'lt-player' //mandatory
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
const selector = document.querySelector('lt-player');
|
|
116
|
-
|
|
117
|
-
const player = Player.initBySelector(selector, objectConfig).then(player => {
|
|
118
|
-
return player;
|
|
119
|
-
});
|
|
120
|
-
})
|
|
121
|
-
</script>
|
|
122
|
-
```
|
|
123
|
-
|
|
124
|
-
```html
|
|
125
|
-
<div class="lt-player">
|
|
126
|
-
</div>
|
|
127
|
-
<script>
|
|
128
|
-
window.addEventListener('load', () => {
|
|
129
|
-
|
|
130
|
-
const objectConfig =
|
|
131
|
-
{
|
|
132
|
-
version: "2",
|
|
133
|
-
body: {
|
|
134
|
-
playerContainer: 'lt-player' //mandatory
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
const player = Player.initByClassOrID('lt-player', objectConfig).then(player => {
|
|
139
|
-
return player;
|
|
140
|
-
});
|
|
141
|
-
})
|
|
142
|
-
</script>
|
|
143
|
-
```
|
|
144
|
-
# Multiple captions - support for multiple caption tracks
|
|
145
|
-
|
|
146
|
-
### HTML5 Video config
|
|
147
|
-
|
|
148
|
-
| Option | Type | Default | Description |
|
|
149
|
-
| -------------------- | -------------------------- |----------------------------------------------------------------------------------------------------------------------| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
150
|
-
| `captions` | Object | `{ active: true, language: 'auto', update: true, label="", url="" srclang="" default=boolean }` | `active`: Toggles if captions should be active by default. `language`: Sets the default language to load (if available). 'auto' uses the browser language. `update`: Listen to changes to tracks and update menu. This is needed for some streaming libraries, but can result in non-selectable language options). |
|
|
151
|
-
|
|
152
|
-
HTML5 only
|
|
153
|
-
|
|
154
|
-
### The `.source` setter
|
|
155
|
-
|
|
156
|
-
This allows changing the player source and type on the fly.
|
|
157
|
-
|
|
158
|
-
Video example:
|
|
159
|
-
|
|
160
|
-
```js
|
|
161
|
-
player.source = {
|
|
162
|
-
tracks: [
|
|
163
|
-
{
|
|
164
|
-
kind: 'captions',
|
|
165
|
-
label: 'English',
|
|
166
|
-
srclang: 'en',
|
|
167
|
-
src: '/path/to/captions.en.vtt',
|
|
168
|
-
default: true,
|
|
169
|
-
},
|
|
170
|
-
{
|
|
171
|
-
kind: 'captions',
|
|
172
|
-
label: 'French',
|
|
173
|
-
srclang: 'fr',
|
|
174
|
-
src: '/path/to/captions.fr.vtt',
|
|
175
|
-
},
|
|
176
|
-
],
|
|
177
|
-
};
|
|
178
|
-
```
|
|
179
|
-
## Methods
|
|
180
|
-
|
|
181
|
-
Example method use:
|
|
182
|
-
|
|
183
|
-
```js
|
|
184
|
-
player.toggleCaptions(toggle);
|
|
185
|
-
```
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
## Example player config
|
|
189
|
-
```json
|
|
190
|
-
{
|
|
191
|
-
"version": 2,
|
|
192
|
-
"body": {
|
|
193
|
-
"pinText" : true,
|
|
194
|
-
"pinSeekBar" : false,
|
|
195
|
-
"pinControls" : false,
|
|
196
|
-
"embed": false,
|
|
197
|
-
"playerType": "portrait",
|
|
198
|
-
"chapters": [
|
|
199
|
-
{
|
|
200
|
-
"name": "Capitol 1",
|
|
201
|
-
"timestamp": "10"
|
|
202
|
-
},
|
|
203
|
-
{
|
|
204
|
-
"name": "Capitol 2",
|
|
205
|
-
"timestamp": "15"
|
|
206
|
-
},
|
|
207
|
-
{
|
|
208
|
-
"name": "Capitol 3",
|
|
209
|
-
"timestamp": "17"
|
|
210
|
-
}
|
|
211
|
-
],
|
|
212
|
-
"defaultConfig": {
|
|
213
|
-
"captions": {
|
|
214
|
-
"active": false,
|
|
215
|
-
"language": "en",
|
|
216
|
-
"update": true,
|
|
217
|
-
"label": "asdfasdfasdf",
|
|
218
|
-
"url": "/lt-player/examples/samples/vtt/Pahl-Kerstin-Maria-MAIN-20230320.vtt",
|
|
219
|
-
"srclang": "en"
|
|
220
|
-
}
|
|
221
|
-
},
|
|
222
|
-
"captionsEnabled": false,
|
|
223
|
-
"videoTitle": "Maja Adena",
|
|
224
|
-
"posterImage": "https://web.lt.dev.welink.sh/sites/default/files/2023-09/Video%201.00_00_00_00.Standbild001.jpg",
|
|
225
|
-
"videoParagraph": "What Are Some Unintended Consequences of Pension Reform?",
|
|
226
|
-
"videoUrl": "https://player.vimeo.com/external/837554695.m3u8?s=0c690ee7961cdfabf925774a536d2376e155d7fe",
|
|
227
|
-
"tracks": "https://web.lt.dev.welink.sh/sites/default/files/video-short/subtitles/Pahl-Kerstin-Maria-MAIN-20230320.vtt",
|
|
228
|
-
"fullscreenDisabled": true,
|
|
229
|
-
"share": {
|
|
230
|
-
"canonicalUrl": "http://stg.lt.org/publication/what-are-economic-consequences-international-migration",
|
|
231
|
-
"embedUrl": "https://stg.lt.org/embed/2892",
|
|
232
|
-
"title": "What Are the Economic Consequences of International Migration?"
|
|
233
|
-
},
|
|
234
|
-
"additionalInfo": {
|
|
235
|
-
"bio": {
|
|
236
|
-
"title": "Bio",
|
|
237
|
-
"description": "Maja Adena is a Postdoctoral Researcher in economics. She received her PhD from the Free University Berlin, where she worked as a research fellow until 2012. Ever since, Adena worked with the Social Science Research Centre Berlin (WZB), where she acts not only as a researcher, but also as a member of the academic council. \n\nAdena’s research interests reach from applied microeconomics to political economy and behavioural economics with a more specific interest in the economy of non-profit and charitable organisations."
|
|
238
|
-
},
|
|
239
|
-
"institution": {
|
|
240
|
-
"title": "Institution",
|
|
241
|
-
"institutionName": "Florida State University",
|
|
242
|
-
"image": "https://web.lt.dev.welink.sh/sites/default/files/institution/florida-state-university_cover.jpg",
|
|
243
|
-
"description": "Florida State University preserves, expands, and disseminates knowledge in the sciences, technology, arts, humanities, and professions, while embracing a philosophy of learning strongly rooted in the traditions of the liberal arts. The university is dedicated to excellence in teaching, research, creative endeavors, and service. The university strives to instill the strength, skill, and character essential for lifelong learning, personal responsibility, and sustained achievement within a community that fosters free inquiry and embraces diversity."
|
|
244
|
-
}
|
|
245
|
-
},
|
|
246
|
-
"playerContainer": "PLAYER1",
|
|
247
|
-
"preload": {
|
|
248
|
-
"start": 5,
|
|
249
|
-
"stop": 10,
|
|
250
|
-
"autoType": true,
|
|
251
|
-
"isActive": true
|
|
252
|
-
},
|
|
253
|
-
"autoPlay": true,
|
|
254
|
-
"fullscreenDisabled": true,
|
|
255
|
-
"vimeo": {
|
|
256
|
-
"controls": false,
|
|
257
|
-
"active": false,
|
|
258
|
-
"gesture": "media",
|
|
259
|
-
"transparent": true,
|
|
260
|
-
"speed": true,
|
|
261
|
-
"portrait": true,
|
|
262
|
-
"keyboard": false,
|
|
263
|
-
"title": false,
|
|
264
|
-
"byline": false,
|
|
265
|
-
"playsinline": true,
|
|
266
|
-
"background": true
|
|
267
|
-
}
|
|
268
|
-
}
|
|
269
|
-
}
|
|
270
|
-
```
|
package/.babelrc
DELETED