@eluvio/elv-player-js 1.0.140 → 2.0.1
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 +35 -6
- package/dist/.vite/manifest.json +67 -0
- package/dist/Analytics-HWXR7tWt.mjs +2028 -0
- package/dist/Analytics-IUVysdzU.js +29 -0
- package/dist/dash.all.min-1QS9Xbir.js +25 -0
- package/dist/dash.all.min-9V1xYBRv.mjs +19428 -0
- package/dist/elv-player-js.cjs.js +1 -0
- package/dist/elv-player-js.css +1 -0
- package/dist/elv-player-js.es.js +5 -0
- package/dist/hls-1eCRapWm.mjs +15461 -0
- package/dist/hls-6O5SV1FQ.js +26 -0
- package/dist/index-6cMQneJf.mjs +2273 -0
- package/dist/index-C8mwW09z.js +23 -0
- package/dist/index-J4QpmTkA.js +367 -0
- package/dist/index-hvQzQ6UX.mjs +67432 -0
- package/lib/index.js +7 -0
- package/{src → lib/player}/Analytics.js +9 -8
- package/lib/player/Controls.js +913 -0
- package/{src → lib/player}/FairPlay.js +2 -0
- package/lib/player/Player.js +881 -0
- package/lib/player/PlayerParameters.js +173 -0
- package/lib/static/icons/Icons.js +29 -0
- package/lib/static/icons/svgs/backward-circle.svg +5 -0
- package/lib/static/icons/svgs/backward.svg +4 -0
- package/lib/static/icons/svgs/captions-off.svg +7 -0
- package/lib/static/icons/svgs/captions.svg +6 -0
- package/lib/static/icons/svgs/check.svg +1 -0
- package/lib/static/icons/svgs/chevron-left.svg +1 -0
- package/lib/static/icons/svgs/chevron-right.svg +1 -0
- package/lib/static/icons/svgs/forward-circle.svg +5 -0
- package/lib/static/icons/svgs/forward.svg +4 -0
- package/{src/static/icons/media/Full Screen icon.svg → lib/static/icons/svgs/full-screen.svg} +1 -1
- package/lib/static/icons/svgs/large-play-circle.svg +4 -0
- package/lib/static/icons/svgs/list.svg +1 -0
- package/{src/static/icons → lib/static/icons/svgs}/minimize.svg +1 -1
- package/{src/static/icons/media/Pause icon.svg → lib/static/icons/svgs/pause-circle.svg} +3 -3
- package/lib/static/icons/svgs/pause.svg +1 -0
- package/{src/static/icons/media/Play icon.svg → lib/static/icons/svgs/play-circle.svg} +1 -1
- package/lib/static/icons/svgs/play.svg +1 -0
- package/lib/static/icons/svgs/rotate-cw.svg +1 -0
- package/lib/static/icons/svgs/settings.svg +11 -0
- package/{src/static/icons/media/skip back icon.svg → lib/static/icons/svgs/skip-backward.svg} +2 -3
- package/{src/static/icons/media/Skip forward icon.svg → lib/static/icons/svgs/skip-forward.svg} +2 -3
- package/{src/static/icons/media/Volume icon.svg → lib/static/icons/svgs/volume-high.svg} +3 -3
- package/lib/static/icons/svgs/volume-low.svg +10 -0
- package/{src/static/icons/media/low volume icon.svg → lib/static/icons/svgs/volume-medium.svg} +2 -2
- package/{src/static/icons/media/no volume icon.svg → lib/static/icons/svgs/volume-off.svg} +3 -3
- package/lib/static/stylesheets/common.module.scss +486 -0
- package/lib/static/stylesheets/controls-tv.module.scss +488 -0
- package/lib/static/stylesheets/controls-web.module.scss +422 -0
- package/lib/static/stylesheets/player-profile-form.module.scss +141 -0
- package/lib/static/stylesheets/player.module.scss +92 -0
- package/lib/static/stylesheets/reset.module.scss +79 -0
- package/lib/static/stylesheets/ticket-form.module.scss +123 -0
- package/lib/ui/BuildIcons.cjs +44 -0
- package/lib/ui/Common.js +210 -0
- package/lib/ui/Components.jsx +342 -0
- package/lib/ui/Observers.js +449 -0
- package/lib/ui/PlayerProfileForm.jsx +106 -0
- package/lib/ui/PlayerUI.jsx +317 -0
- package/lib/ui/TVControls.jsx +337 -0
- package/lib/ui/TicketForm.jsx +147 -0
- package/lib/ui/WebControls.jsx +290 -0
- package/package.json +35 -47
- package/dist/index.js +0 -2
- package/dist/index.js.LICENSE.txt +0 -80
- package/src/BuildIcons.js +0 -27
- package/src/PlayerControls.js +0 -1478
- package/src/index.js +0 -1417
- package/src/static/icons/Icons.js +0 -15
- package/src/static/icons/Settings icon.svg +0 -4
- package/src/static/icons/chat icon collapse.svg +0 -1
- package/src/static/icons/chat icon.svg +0 -11
- package/src/static/icons/chat send.svg +0 -1
- package/src/static/icons/full screen.svg +0 -1
- package/src/static/icons/media/LargePlayIcon.svg +0 -4
- package/src/static/icons/media/Settings icon.svg +0 -4
- package/src/static/icons/media/Skip backward icon.svg +0 -4
- package/src/static/icons/media/list.svg +0 -1
- package/src/static/icons/media/loop icon.svg +0 -12
- package/src/static/icons/media/shuffle icon.svg +0 -13
- package/src/static/icons/muted.svg +0 -11
- package/src/static/icons/pause.svg +0 -1
- package/src/static/icons/play circle.svg +0 -1
- package/src/static/icons/play.svg +0 -1
- package/src/static/icons/settings.svg +0 -1
- package/src/static/icons/slider circle.svg +0 -1
- package/src/static/icons/unmuted.svg +0 -10
- package/src/static/images/ELUV.IO logo embed player.png +0 -0
- package/src/static/images/ELUV.IO logo embed player.svg +0 -1
- package/src/static/images/ELUV.IO white 20 px V2.png +0 -0
- package/src/static/images/ELUVIO white.svg +0 -26
- package/src/static/images/Logo.png +0 -0
- package/src/static/stylesheets/player.scss +0 -1065
- package/webpack.config.js +0 -152
- /package/{src/static/icons → lib/static/icons/svgs}/arrow-left.svg +0 -0
- /package/{src/static/icons/live icon.svg → lib/static/icons/svgs/live.svg} +0 -0
- /package/{src/static/icons → lib/static/icons/svgs}/multiview.svg +0 -0
- /package/{src/static/icons/media → lib/static/icons/svgs}/next.svg +0 -0
- /package/{src/static/icons/media → lib/static/icons/svgs}/previous.svg +0 -0
- /package/{src/static/icons → lib/static/icons/svgs}/x.svg +0 -0
- /package/{dist/5897e28fa3e8ac0a2fae.png → lib/static/images/Logo.png} +0 -0
package/README.md
CHANGED
|
@@ -11,14 +11,18 @@ npm install --save @eluvio/elv-player-js
|
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
Import the library and load the player:
|
|
14
|
+
|
|
14
15
|
```javascript
|
|
15
|
-
import
|
|
16
|
+
import InitializeEluvioPlayer, {EluvioPlayerParameters} from "@eluvio/elv-player-js";
|
|
16
17
|
|
|
17
|
-
const player =
|
|
18
|
+
const player = await InitializeEluvioPlayer(
|
|
18
19
|
targetContainerElement,
|
|
19
20
|
{
|
|
20
21
|
clientOptions: {
|
|
22
|
+
// Specify the fabric network
|
|
21
23
|
network: EluvioPlayerParameters.network.main,
|
|
24
|
+
// or if you already have an instance of ElvClient, just pass it in
|
|
25
|
+
client: myElvClient
|
|
22
26
|
},
|
|
23
27
|
sourceOptions: {
|
|
24
28
|
playoutParameters: {
|
|
@@ -32,6 +36,11 @@ const player = new EluvioPlayer(
|
|
|
32
36
|
);
|
|
33
37
|
```
|
|
34
38
|
|
|
39
|
+
Destroy the player when you're done with it
|
|
40
|
+
```javascript
|
|
41
|
+
player.Destroy();
|
|
42
|
+
```
|
|
43
|
+
|
|
35
44
|
## Options
|
|
36
45
|
|
|
37
46
|
The player library has a number of options to configure what content should be played and how it's authorized, display options for the player, and callbacks for events.
|
|
@@ -83,6 +92,18 @@ The library includes a helpful collection of configuration options in `EluvioPla
|
|
|
83
92
|
authorizationToken: undefined,
|
|
84
93
|
clipStart: undefined,
|
|
85
94
|
clipEnd: undefined
|
|
95
|
+
},
|
|
96
|
+
contentInfo: {
|
|
97
|
+
title: undefined,
|
|
98
|
+
description: undefined,
|
|
99
|
+
image: undefined,
|
|
100
|
+
posterImage: undefined,
|
|
101
|
+
headers: []
|
|
102
|
+
},
|
|
103
|
+
mediaCollectionOptions: {
|
|
104
|
+
mediaCatalogObjectId: undefined,
|
|
105
|
+
mediaCatalogVersionHash: undefined,
|
|
106
|
+
collectionId: undefined
|
|
86
107
|
}
|
|
87
108
|
},
|
|
88
109
|
```
|
|
@@ -92,12 +113,16 @@ The library includes a helpful collection of configuration options in `EluvioPla
|
|
|
92
113
|
- `drms` - The DRMs options you want the player to use
|
|
93
114
|
- `playoutOptions` - If you already have the results of `client.PlayoutOptions`, you can provide it
|
|
94
115
|
- `playoutParameters` - These parameters directly correspond to what is provided to the [PlayoutOptions](https://eluv-io.github.io/elv-client-js/module-ElvClient_ContentAccess.html#.PlayoutOptions) method in @eluvio/elv-client-js. Typically you will only need to specify a versionHash or object ID
|
|
116
|
+
- `contentInfo`: Specify information about the content, such as title, description, icon and poster images, and header text such as ratings, release year, etc.
|
|
117
|
+
- `mediaCollectionOptions`: To play a collection, specify the media catalog object by ID or version hash, as well as the collection to play
|
|
95
118
|
|
|
96
119
|
### Player Options
|
|
97
120
|
|
|
98
121
|
```javascript
|
|
99
122
|
// All player options and their defaults
|
|
100
123
|
playerOptions: {
|
|
124
|
+
ui: EluvioPlayerParameters.ui.WEB,
|
|
125
|
+
backgroundColor: undefined,
|
|
101
126
|
controls: EluvioPlayerParameters.controls.AUTO_HIDE,
|
|
102
127
|
autoplay: EluvioPlayerParameters.autoplay.OFF,
|
|
103
128
|
muted: EluvioPlayerParameters.muted.OFF,
|
|
@@ -106,8 +131,6 @@ The library includes a helpful collection of configuration options in `EluvioPla
|
|
|
106
131
|
capLevelToPlayerSize: EluvioPlayerParameters.capLevelToPlayerSize.OFF,
|
|
107
132
|
collectVideoAnalytics: EluvioPlayerParameters.collectVideoAnalytics.ON,
|
|
108
133
|
posterUrl: undefined,
|
|
109
|
-
className: undefined,
|
|
110
|
-
controlsClassName: undefined,
|
|
111
134
|
hlsjsOptions: undefined,
|
|
112
135
|
dashjsOptions: undefined,
|
|
113
136
|
maxBitrate: undefined,
|
|
@@ -118,6 +141,9 @@ The library includes a helpful collection of configuration options in `EluvioPla
|
|
|
118
141
|
```
|
|
119
142
|
|
|
120
143
|
##### Values
|
|
144
|
+
* `ui` - Switch between the default web UI and the TV optimized UI
|
|
145
|
+
* `WEB (default)` - The default browser style player
|
|
146
|
+
* `TV` - A player UI optimized for usage on TVs and similar devices
|
|
121
147
|
* `controls` - How the controls should be displayed
|
|
122
148
|
* `AUTOHIDE (default)`: Player controls will be shown. Will automatically hide when not in use
|
|
123
149
|
* `ON`: Player controls will be shown
|
|
@@ -136,6 +162,10 @@ The library includes a helpful collection of configuration options in `EluvioPla
|
|
|
136
162
|
* `loop` - Whether or not the video will loop.
|
|
137
163
|
* `OFF (default)` - Video will not loop
|
|
138
164
|
* `ON` - Video will loop
|
|
165
|
+
* `keyboardControls` - Whether or not the player's keyboard controls will be active
|
|
166
|
+
* `ON (default)` - Keyboard controls active
|
|
167
|
+
* `OFF` - Keyboard controls disabled
|
|
168
|
+
* `ARROW_KEYS_DISABLED` - Keyboard controls active except for arrow keys (useful if supporting directional navigation)
|
|
139
169
|
* `watermark`: Whether or not the Eluvio watermark will be shown.
|
|
140
170
|
* `ON (default)` - Watermark will be shown
|
|
141
171
|
* `OFF` - Watermark will not be shown
|
|
@@ -146,10 +176,9 @@ The library includes a helpful collection of configuration options in `EluvioPla
|
|
|
146
176
|
* `ON (default)` - Player performance analytics will be collected
|
|
147
177
|
* `DISABLE_COOKIES`- Player performance analytics will be collected, but browser cookies will not be used
|
|
148
178
|
* `OFF` - Player performance analytics will not be collected
|
|
179
|
+
* `backgroundColor` - Specify the background color of the player. Must be a valid option for css `background-color`
|
|
149
180
|
* `maxBitrate` - Maximum bitrate that the player will automatically use, in bits/second.
|
|
150
181
|
* `posterUrl` - Specify a URL for the poster image for the player
|
|
151
|
-
* `className` - HTML class to be added to the player
|
|
152
|
-
* `controlsClassName` - HTML class to be added to the player controls container
|
|
153
182
|
* `hlsjsOptions` - Additional options to provide to hls.js on initialization
|
|
154
183
|
* `dashjsOptions` - Additional options to provide to dashjs on initialization
|
|
155
184
|
* `playerCallback` - Callback function invoked after initialization has completed. Returns references to the player, the html video element, the dashjs or hls.js player instance, and the URL of the poster image
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_dash.all.min-1QS9Xbir.js": {
|
|
3
|
+
"file": "dash.all.min-1QS9Xbir.js",
|
|
4
|
+
"imports": [
|
|
5
|
+
"_index-J4QpmTkA.js"
|
|
6
|
+
],
|
|
7
|
+
"isDynamicEntry": true
|
|
8
|
+
},
|
|
9
|
+
"_dash.all.min-9V1xYBRv.mjs": {
|
|
10
|
+
"file": "dash.all.min-9V1xYBRv.mjs",
|
|
11
|
+
"imports": [
|
|
12
|
+
"_index-hvQzQ6UX.mjs"
|
|
13
|
+
],
|
|
14
|
+
"isDynamicEntry": true
|
|
15
|
+
},
|
|
16
|
+
"_index-J4QpmTkA.js": {
|
|
17
|
+
"dynamicImports": [
|
|
18
|
+
"node_modules/@eluvio/crypto/src/index.js",
|
|
19
|
+
"lib/player/Analytics.js",
|
|
20
|
+
"node_modules/hls.js/dist/hls.mjs",
|
|
21
|
+
"_dash.all.min-1QS9Xbir.js"
|
|
22
|
+
],
|
|
23
|
+
"file": "index-J4QpmTkA.js"
|
|
24
|
+
},
|
|
25
|
+
"_index-hvQzQ6UX.mjs": {
|
|
26
|
+
"dynamicImports": [
|
|
27
|
+
"node_modules/@eluvio/crypto/src/index.js",
|
|
28
|
+
"lib/player/Analytics.js",
|
|
29
|
+
"node_modules/hls.js/dist/hls.mjs",
|
|
30
|
+
"_dash.all.min-9V1xYBRv.mjs"
|
|
31
|
+
],
|
|
32
|
+
"file": "index-hvQzQ6UX.mjs"
|
|
33
|
+
},
|
|
34
|
+
"lib/index.js": {
|
|
35
|
+
"file": "elv-player-js.cjs.js",
|
|
36
|
+
"imports": [
|
|
37
|
+
"_index-J4QpmTkA.js"
|
|
38
|
+
],
|
|
39
|
+
"isEntry": true,
|
|
40
|
+
"src": "lib/index.js"
|
|
41
|
+
},
|
|
42
|
+
"lib/player/Analytics.js": {
|
|
43
|
+
"file": "Analytics-IUVysdzU.js",
|
|
44
|
+
"imports": [
|
|
45
|
+
"_index-J4QpmTkA.js"
|
|
46
|
+
],
|
|
47
|
+
"isDynamicEntry": true,
|
|
48
|
+
"src": "lib/player/Analytics.js"
|
|
49
|
+
},
|
|
50
|
+
"node_modules/@eluvio/crypto/src/index.js": {
|
|
51
|
+
"file": "index-C8mwW09z.js",
|
|
52
|
+
"imports": [
|
|
53
|
+
"_index-J4QpmTkA.js"
|
|
54
|
+
],
|
|
55
|
+
"isDynamicEntry": true,
|
|
56
|
+
"src": "node_modules/@eluvio/crypto/src/index.js"
|
|
57
|
+
},
|
|
58
|
+
"node_modules/hls.js/dist/hls.mjs": {
|
|
59
|
+
"file": "hls-6O5SV1FQ.js",
|
|
60
|
+
"isDynamicEntry": true,
|
|
61
|
+
"src": "node_modules/hls.js/dist/hls.mjs"
|
|
62
|
+
},
|
|
63
|
+
"style.css": {
|
|
64
|
+
"file": "elv-player-js.css",
|
|
65
|
+
"src": "style.css"
|
|
66
|
+
}
|
|
67
|
+
}
|