@latest-thinking/lt-player 2.0.0-q → 3.0.0-beta.2
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/LICENSE.md +121 -0
- package/README.md +40 -140
- package/THIRD-PARTY-NOTICES.md +448 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +17690 -0
- package/dist/styles.css +2 -0
- package/package.json +89 -29
- package/.editorconfig +0 -18
- package/.eslintrc +0 -18
- package/.node-version +0 -1
- package/.nvmrc +0 -1
- package/dist/main.js +0 -28514
- package/tsconfig.json +0 -26
- package/vite-dev.config.mts +0 -35
- package/vite.config.mts +0 -40
package/LICENSE.md
ADDED
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
# LT Player License Agreement
|
|
2
|
+
|
|
3
|
+
Copyright (c) Latest Thinking GmbH. All rights reserved.
|
|
4
|
+
|
|
5
|
+
This LT Player License Agreement (the "Agreement") governs the use of version 3 and later of
|
|
6
|
+
the `@latest-thinking/lt-player` software package and its compiled files (the "Software"). The
|
|
7
|
+
licensor is Latest Thinking GmbH, Am Feenteich 4, 22085 Hamburg, Germany (the "Licensor").
|
|
8
|
+
|
|
9
|
+
This Agreement is a proprietary software license. It is not an open-source license. Installing,
|
|
10
|
+
copying, or using the Software constitutes acceptance of this Agreement. If you do not accept
|
|
11
|
+
these terms, do not install or use the Software.
|
|
12
|
+
|
|
13
|
+
## 1. License grant
|
|
14
|
+
|
|
15
|
+
Subject to this Agreement, the Licensor grants you a non-exclusive, worldwide, royalty-free,
|
|
16
|
+
revocable, and non-transferable license to:
|
|
17
|
+
|
|
18
|
+
1. install and use the Software in its compiled form;
|
|
19
|
+
2. bundle the Software into applications and websites, including internal, commercial, and
|
|
20
|
+
client projects; and
|
|
21
|
+
3. distribute the Software only as an embedded part of such an application or website bundle,
|
|
22
|
+
provided that the Software is not offered as a standalone package or reusable component.
|
|
23
|
+
|
|
24
|
+
You may perform minification, tree-shaking, transpilation, module concatenation, and comparable
|
|
25
|
+
automated transformations only when they are incidental to bundling the Software into an
|
|
26
|
+
application or website. These transformations do not permit functional changes to the Software.
|
|
27
|
+
|
|
28
|
+
## 2. Restrictions
|
|
29
|
+
|
|
30
|
+
Except where applicable law expressly provides otherwise and does not permit contractual
|
|
31
|
+
restriction, you must not:
|
|
32
|
+
|
|
33
|
+
1. modify the Software, change its functionality, or create derivative works from it;
|
|
34
|
+
2. reverse engineer, decompile, disassemble, or otherwise attempt to discover its source code or
|
|
35
|
+
internal design;
|
|
36
|
+
3. redistribute, publish, sublicense, sell, rent, lease, or otherwise make the Software available
|
|
37
|
+
as a standalone package, library, component, download, or service;
|
|
38
|
+
4. use the Software to create or distribute a competing standalone video-player package;
|
|
39
|
+
5. remove, obscure, or alter any copyright, trademark, attribution, license, or proprietary notice;
|
|
40
|
+
or
|
|
41
|
+
6. remove, obscure, or alter Latest Thinking branding included in the Software, except where the
|
|
42
|
+
Licensor has expressly authorized that removal in writing.
|
|
43
|
+
|
|
44
|
+
You may not transfer this Agreement or the rights it grants without the Licensor's prior written
|
|
45
|
+
consent. Contractors working on your behalf may use the Software only for your licensed project,
|
|
46
|
+
under confidentiality and use restrictions at least as protective as this Agreement. You remain
|
|
47
|
+
responsible for their compliance.
|
|
48
|
+
|
|
49
|
+
## 3. Ownership and trademarks
|
|
50
|
+
|
|
51
|
+
The Software is licensed, not sold. The Licensor and its suppliers retain all rights, title, and
|
|
52
|
+
interest in and to the Software, including all intellectual property rights. No rights are granted
|
|
53
|
+
except those expressly stated in this Agreement.
|
|
54
|
+
|
|
55
|
+
This Agreement does not grant permission to use the Licensor's names, logos, trademarks, or
|
|
56
|
+
service marks except as they appear in an authorized, unmodified use of the Software. Third-party
|
|
57
|
+
names and trademarks remain the property of their respective owners.
|
|
58
|
+
|
|
59
|
+
## 4. Third-party software
|
|
60
|
+
|
|
61
|
+
The Software contains third-party components governed by their own license terms. Those terms
|
|
62
|
+
apply only to the corresponding third-party components and are reproduced in
|
|
63
|
+
`THIRD-PARTY-NOTICES.md`. Nothing in this Agreement limits rights granted by a third-party license
|
|
64
|
+
or imposes this Agreement on third-party software.
|
|
65
|
+
|
|
66
|
+
## 5. Updates and support
|
|
67
|
+
|
|
68
|
+
The Licensor may provide updates at its discretion. Unless separate written terms state otherwise,
|
|
69
|
+
updates are governed by the version of this Agreement supplied with them. This Agreement does not
|
|
70
|
+
obligate the Licensor to provide maintenance, support, updates, or continued availability.
|
|
71
|
+
|
|
72
|
+
## 6. Disclaimer of warranties
|
|
73
|
+
|
|
74
|
+
To the maximum extent permitted by applicable law, the Software is provided "as is" and "as
|
|
75
|
+
available," without warranties or conditions of any kind, whether express, implied, or statutory.
|
|
76
|
+
The Licensor disclaims all implied warranties and conditions, including merchantability, fitness
|
|
77
|
+
for a particular purpose, title, non-infringement, accuracy, and uninterrupted or error-free
|
|
78
|
+
operation. You are responsible for evaluating whether the Software is suitable for your use.
|
|
79
|
+
|
|
80
|
+
Nothing in this Agreement excludes a warranty or remedy that applicable law does not permit the
|
|
81
|
+
parties to exclude.
|
|
82
|
+
|
|
83
|
+
## 7. Limitation of liability
|
|
84
|
+
|
|
85
|
+
To the maximum extent permitted by applicable law, the Licensor is not liable for indirect,
|
|
86
|
+
incidental, special, exemplary, punitive, or consequential damages, or for loss of profits,
|
|
87
|
+
revenue, data, goodwill, business opportunities, or business interruption, arising from or related
|
|
88
|
+
to the Software or this Agreement, even if advised that such damages are possible.
|
|
89
|
+
|
|
90
|
+
The limitations in this section do not apply to liability that cannot lawfully be limited or
|
|
91
|
+
excluded, including liability for intent, gross negligence, death, personal injury, or mandatory
|
|
92
|
+
product liability where applicable.
|
|
93
|
+
|
|
94
|
+
## 8. Termination
|
|
95
|
+
|
|
96
|
+
This Agreement terminates automatically if you materially breach it. Upon termination, you must
|
|
97
|
+
stop using and distributing the Software and remove standalone copies under your control. Existing
|
|
98
|
+
application or website bundles supplied to end users before termination may remain in use only to
|
|
99
|
+
the extent required by mandatory law or expressly authorized by the Licensor in writing.
|
|
100
|
+
|
|
101
|
+
Sections concerning restrictions, ownership, third-party software, warranties, liability,
|
|
102
|
+
termination, and general terms survive termination to the extent necessary to give them effect.
|
|
103
|
+
|
|
104
|
+
## 9. General terms
|
|
105
|
+
|
|
106
|
+
This Agreement is the entire agreement concerning the Software unless you and the Licensor have
|
|
107
|
+
signed a separate agreement that expressly supersedes it. If any provision is unenforceable, it
|
|
108
|
+
will be limited to the minimum extent necessary, and the remaining provisions will remain in
|
|
109
|
+
effect. A failure to enforce a provision is not a waiver.
|
|
110
|
+
|
|
111
|
+
This Agreement is governed by the laws of the Federal Republic of Germany, excluding its conflict
|
|
112
|
+
of laws rules and the United Nations Convention on Contracts for the International Sale of Goods.
|
|
113
|
+
Where legally permitted, the exclusive place of jurisdiction is Hamburg, Germany. Mandatory
|
|
114
|
+
consumer-protection and jurisdiction rules remain unaffected.
|
|
115
|
+
|
|
116
|
+
Questions about this Agreement may be sent to `info@lt.org`.
|
|
117
|
+
|
|
118
|
+
## Legal review status
|
|
119
|
+
|
|
120
|
+
This license has been prepared for team review. External legal review is required before the
|
|
121
|
+
stable v3.0.0 release is published.
|
package/README.md
CHANGED
|
@@ -1,164 +1,64 @@
|
|
|
1
1
|
# LT Player
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
`@latest-thinking/lt-player` is the Latest Thinking video player package. Version 3 is currently
|
|
4
|
+
available as a beta and provides the stock Video.js React player foundation for browser
|
|
5
|
+
applications.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
The package is ESM-only and bundles its runtime dependencies. Consumers need Node.js 20 or newer
|
|
8
|
+
for package tooling and a modern browser for playback.
|
|
8
9
|
|
|
9
|
-
|
|
10
|
-
purposes.
|
|
10
|
+
## Install the beta
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
- Node.js (LTS version recommended)
|
|
15
|
-
- npm
|
|
16
|
-
|
|
17
|
-
### Installation
|
|
18
|
-
|
|
19
|
-
1. Clone the repository:
|
|
12
|
+
Install the version published on the npm `next` channel:
|
|
20
13
|
|
|
21
14
|
```bash
|
|
22
|
-
|
|
15
|
+
npm install @latest-thinking/lt-player@next
|
|
23
16
|
```
|
|
24
17
|
|
|
25
|
-
|
|
18
|
+
Beta interfaces may change before the stable v3 release.
|
|
26
19
|
|
|
27
|
-
|
|
28
|
-
cd player
|
|
29
|
-
```
|
|
20
|
+
## Use the player
|
|
30
21
|
|
|
31
|
-
|
|
22
|
+
Import both the package entry and its required stylesheet from your application:
|
|
32
23
|
|
|
33
|
-
```
|
|
34
|
-
|
|
24
|
+
```js
|
|
25
|
+
import '@latest-thinking/lt-player/styles.css';
|
|
26
|
+
import '@latest-thinking/lt-player';
|
|
35
27
|
```
|
|
36
28
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
To start the development server:
|
|
29
|
+
Add an `lt-player` host element to the document. The optional `data-src` attribute supplies a
|
|
30
|
+
browser-supported media URL:
|
|
40
31
|
|
|
41
|
-
```
|
|
42
|
-
|
|
32
|
+
```html
|
|
33
|
+
<lt-player data-src="https://example.com/video.mp4"></lt-player>
|
|
43
34
|
```
|
|
44
35
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
### Building
|
|
36
|
+
The package scans for `lt-player` elements when it loads and mounts one player in each host. Load
|
|
37
|
+
the package after creating dynamically inserted hosts, because this foundation release does not
|
|
38
|
+
observe later DOM changes. A host without `data-src` receives an empty player.
|
|
49
39
|
|
|
50
|
-
|
|
40
|
+
The stylesheet contains the stock player skin and gives the host block layout. Width and aspect
|
|
41
|
+
ratio remain application layout decisions. The stock skin uses the `videojs-default` CSS cascade
|
|
42
|
+
layer, so unlayered application reset rules can take precedence over it.
|
|
51
43
|
|
|
52
|
-
|
|
53
|
-
npm run build
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
### Previewing
|
|
44
|
+
## Package exports
|
|
57
45
|
|
|
58
|
-
|
|
46
|
+
| Export | Purpose |
|
|
47
|
+
| ----------------------------------------- | --------------------------- |
|
|
48
|
+
| `@latest-thinking/lt-player` | Effectful ESM package entry |
|
|
49
|
+
| `@latest-thinking/lt-player/styles.css` | Bundled player stylesheet |
|
|
50
|
+
| `@latest-thinking/lt-player/package.json` | Published package metadata |
|
|
59
51
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
```
|
|
52
|
+
The baseline player supports formats the browser can play natively. Streaming media engines are
|
|
53
|
+
not included in this foundation release.
|
|
63
54
|
|
|
64
|
-
##
|
|
55
|
+
## License
|
|
65
56
|
|
|
66
|
-
|
|
57
|
+
LT Player v3 is proprietary software, not open-source software. The license permits installing,
|
|
58
|
+
using, and bundling the compiled package into applications and websites, including client
|
|
59
|
+
projects. It prohibits functional modification, reverse engineering, standalone redistribution,
|
|
60
|
+
and removal of legal notices or Latest Thinking branding, subject to applicable law.
|
|
67
61
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
## Versioning
|
|
73
|
-
|
|
74
|
-
We use [SemVer](http://semver.org/) for versioning. For the versions available, see
|
|
75
|
-
the [tags on this repository](https://git.welink.ro/project/external/lt/player/-/tags).
|
|
76
|
-
|
|
77
|
-
## Authors
|
|
78
|
-
|
|
79
|
-
**Welink**
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
## Acknowledgments
|
|
83
|
-
|
|
84
|
-
- Vidstack for the core video player framework.
|
|
85
|
-
|
|
86
|
-
## Player config
|
|
87
|
-
|
|
88
|
-
The JSON below is an example configuration that should be provided by any client who wants to initialize a LT Player:
|
|
89
|
-
|
|
90
|
-
```json
|
|
91
|
-
{
|
|
92
|
-
"version": 3,
|
|
93
|
-
"body": {
|
|
94
|
-
"title": "Video Title",
|
|
95
|
-
"author": "Author Name",
|
|
96
|
-
"sources": [
|
|
97
|
-
{
|
|
98
|
-
"src": "http://www.example.com/path/to/video.m3u8",
|
|
99
|
-
"type": "application/x-mpegURL"
|
|
100
|
-
},
|
|
101
|
-
{
|
|
102
|
-
"src": "http://www.example.com/path/to/video.mp4",
|
|
103
|
-
"type": "video/mp4"
|
|
104
|
-
}
|
|
105
|
-
],
|
|
106
|
-
"duration": 320.37,
|
|
107
|
-
"poster": "http://www.example.com/path/to/poster.jpg",
|
|
108
|
-
"chapters": [
|
|
109
|
-
{
|
|
110
|
-
"timestamp": 7.205,
|
|
111
|
-
"name": "Question"
|
|
112
|
-
},
|
|
113
|
-
{
|
|
114
|
-
"timestamp": 77.205,
|
|
115
|
-
"name": "Method"
|
|
116
|
-
}
|
|
117
|
-
],
|
|
118
|
-
"tracks": [
|
|
119
|
-
{
|
|
120
|
-
"kind": "subtitles",
|
|
121
|
-
"label": "English",
|
|
122
|
-
"srclang": "en",
|
|
123
|
-
"src": "http://www.example.com/path/to/subtitles.vtt",
|
|
124
|
-
"default": true
|
|
125
|
-
},
|
|
126
|
-
{
|
|
127
|
-
"kind": "subtitles",
|
|
128
|
-
"label": "Romanian",
|
|
129
|
-
"srclang": "ro",
|
|
130
|
-
"src": "http://www.example.com/path/to/romanian-subtitles.vtt"
|
|
131
|
-
},
|
|
132
|
-
{
|
|
133
|
-
"kind": "subtitles",
|
|
134
|
-
"label": "German",
|
|
135
|
-
"srclang": "de",
|
|
136
|
-
"src": "http://www.example.com/path/to/german-subtitles.vtt"
|
|
137
|
-
}
|
|
138
|
-
],
|
|
139
|
-
"share": {
|
|
140
|
-
"canonicalUrl": "http://www.example.com/path/to/video",
|
|
141
|
-
"embedUrl": "http://www.example.com/embed/path/to/video"
|
|
142
|
-
},
|
|
143
|
-
"metadata": {
|
|
144
|
-
"bio": {
|
|
145
|
-
"title": "Author Name",
|
|
146
|
-
"description": "Author description"
|
|
147
|
-
},
|
|
148
|
-
"abstract": {
|
|
149
|
-
"title": "Modal Title",
|
|
150
|
-
"description": "Video description"
|
|
151
|
-
},
|
|
152
|
-
"institution": {
|
|
153
|
-
"title": "Institution Name",
|
|
154
|
-
"description": "Institution description"
|
|
155
|
-
}
|
|
156
|
-
},
|
|
157
|
-
"type": "full|main|beyond|expert|short",
|
|
158
|
-
"showLogo": true,
|
|
159
|
-
"isEmbedded": true,
|
|
160
|
-
"theme": "light|dark",
|
|
161
|
-
"background": true
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
```
|
|
62
|
+
Read the complete [LT Player License Agreement](LICENSE.md) before using the package. Licenses and
|
|
63
|
+
attributions for bundled open-source components are listed in
|
|
64
|
+
[Third-Party Notices](THIRD-PARTY-NOTICES.md).
|