@eluvio/elv-player-js 2.0.7 → 2.0.9
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 +3 -6
- package/dist/.vite/manifest.json +18 -18
- package/dist/{Analytics-B84nIsJX.mjs → Analytics-Bgp5dTWZ.mjs} +1 -1
- package/dist/{Analytics-DSscOw1L.js → Analytics-D9BYYseM.js} +1 -1
- package/dist/{dash.all.min-B90T_UZz.mjs → dash.all.min-BokmrQMI.mjs} +1 -1
- package/dist/{dash.all.min-SWFWgsyT.js → dash.all.min-Dq_ZZMkT.js} +1 -1
- package/dist/elv-player-js.cjs.js +1 -1
- package/dist/elv-player-js.css +1 -1
- package/dist/elv-player-js.es.js +1 -1
- package/dist/hls-DHFAkcd1.mjs +16848 -0
- package/dist/hls-VH5py-kh.js +26 -0
- package/dist/index-Bv5wy2n4.js +375 -0
- package/dist/{index-CvpJ3Be3.mjs → index-BwEKfarP.mjs} +1 -1
- package/dist/{index-CS8bweI1.mjs → index-CUHcHn6D.mjs} +20877 -20812
- package/dist/{index-BrPAkRZj.js → index-DnHGnI-z.js} +1 -1
- package/lib/player/Player.js +36 -14
- package/lib/player/PlayerParameters.js +5 -2
- package/lib/static/stylesheets/common.module.scss +82 -40
- package/lib/static/stylesheets/controls-web.module.scss +18 -19
- package/lib/static/stylesheets/player.module.scss +6 -0
- package/lib/ui/Components.jsx +4 -4
- package/lib/ui/Observers.js +10 -6
- package/lib/ui/WebControls.jsx +12 -3
- package/package.json +4 -3
- package/dist/hls-B8WS8h-m.mjs +0 -15423
- package/dist/hls-agwebW2Y.js +0 -26
- package/dist/index-D7OJm9wP.js +0 -366
|
@@ -65,10 +65,10 @@
|
|
|
65
65
|
align-items: center;
|
|
66
66
|
color: var(--color-button);
|
|
67
67
|
display: flex;
|
|
68
|
-
height:
|
|
69
|
-
padding:
|
|
68
|
+
height: 30px;
|
|
69
|
+
padding: 4px;
|
|
70
70
|
transition: color 0.15s ease;
|
|
71
|
-
width:
|
|
71
|
+
width: 30px;
|
|
72
72
|
|
|
73
73
|
svg {
|
|
74
74
|
height: 100%;
|
|
@@ -167,6 +167,7 @@
|
|
|
167
167
|
|
|
168
168
|
.center-play-button {
|
|
169
169
|
height: 100px;
|
|
170
|
+
margin-bottom: 30px;
|
|
170
171
|
transition: opacity 0.5s ease;
|
|
171
172
|
width: 100px;
|
|
172
173
|
z-index: var(--layer-center-button);
|
|
@@ -226,11 +227,6 @@
|
|
|
226
227
|
.play-pause-button {
|
|
227
228
|
padding: 0;
|
|
228
229
|
}
|
|
229
|
-
|
|
230
|
-
.right-control-button {
|
|
231
|
-
height: 35px;
|
|
232
|
-
margin-bottom: 1px;
|
|
233
|
-
}
|
|
234
230
|
}
|
|
235
231
|
|
|
236
232
|
.time {
|
|
@@ -338,18 +334,12 @@
|
|
|
338
334
|
|
|
339
335
|
.icon-button {
|
|
340
336
|
border: 1px solid transparent;
|
|
341
|
-
|
|
337
|
+
padding: 0;
|
|
342
338
|
transition: background-color 0.25s ease, color 0.25s ease;
|
|
343
339
|
|
|
344
340
|
&-active,
|
|
345
341
|
&:focus-visible {
|
|
346
|
-
|
|
347
|
-
color: #000;
|
|
348
|
-
filter: drop-shadow(0 0 5px #FFF);
|
|
349
|
-
}
|
|
350
|
-
|
|
351
|
-
&:focus-visible {
|
|
352
|
-
border: 1px solid var(--color-highlight);
|
|
342
|
+
filter: drop-shadow(0 0 3px rgba(255, 255, 255, 50%));
|
|
353
343
|
}
|
|
354
344
|
}
|
|
355
345
|
}
|
|
@@ -393,14 +383,22 @@
|
|
|
393
383
|
--content-image-size: 65px;
|
|
394
384
|
}
|
|
395
385
|
|
|
386
|
+
.icon-button {
|
|
387
|
+
height: 25px;
|
|
388
|
+
min-width: 25px;
|
|
389
|
+
width: 25px;
|
|
390
|
+
}
|
|
391
|
+
|
|
396
392
|
.controls {
|
|
397
393
|
gap: 8px;
|
|
398
|
-
height:
|
|
394
|
+
height: max-content;
|
|
395
|
+
padding: 0 5px 5px;
|
|
399
396
|
}
|
|
400
397
|
|
|
401
398
|
.center-play-button {
|
|
402
|
-
height:
|
|
403
|
-
|
|
399
|
+
height: 50px;
|
|
400
|
+
margin-bottom: 15px;
|
|
401
|
+
width: 50px;
|
|
404
402
|
}
|
|
405
403
|
|
|
406
404
|
/* Position menus relative to whole player */
|
|
@@ -433,6 +431,7 @@
|
|
|
433
431
|
|
|
434
432
|
.time {
|
|
435
433
|
font-size: 10px;
|
|
434
|
+
min-width: max-content;
|
|
436
435
|
}
|
|
437
436
|
|
|
438
437
|
.collection-button-text {
|
package/lib/ui/Components.jsx
CHANGED
|
@@ -380,7 +380,7 @@ export const ContentVerificationMenu = ({player, Hide, className=""}) => {
|
|
|
380
380
|
content = (
|
|
381
381
|
<>
|
|
382
382
|
<div className={CommonStyles["verification-menu__group"]}>
|
|
383
|
-
<div dangerouslySetInnerHTML={{__html: Icons.ContentBadgeIcon}}
|
|
383
|
+
<div dangerouslySetInnerHTML={{__html: Icons.ContentBadgeIcon}} className={CommonStyles["verification-menu__group-icon"]} />
|
|
384
384
|
<div className={CommonStyles["verification-menu__group-text"]}>
|
|
385
385
|
<div className={CommonStyles["verification-menu__group-title"]}>
|
|
386
386
|
This content has been verified as authentic
|
|
@@ -391,7 +391,7 @@ export const ContentVerificationMenu = ({player, Hide, className=""}) => {
|
|
|
391
391
|
</div>
|
|
392
392
|
</div>
|
|
393
393
|
<div className={CommonStyles["verification-menu__group"]}>
|
|
394
|
-
<div dangerouslySetInnerHTML={{__html: Icons.ContentCredentialsIcon}}
|
|
394
|
+
<div dangerouslySetInnerHTML={{__html: Icons.ContentCredentialsIcon}} className={[CommonStyles["verification-menu__group-icon"], CommonStyles["verification-menu__group-icon--cc"]].join(" ")} />
|
|
395
395
|
<div className={CommonStyles["verification-menu__group-text"]}>
|
|
396
396
|
<button onClick={() => setShowDetails(true)} className={CommonStyles["verification-menu__group-title"]}>
|
|
397
397
|
View Content Credentials
|
|
@@ -405,7 +405,7 @@ export const ContentVerificationMenu = ({player, Hide, className=""}) => {
|
|
|
405
405
|
content = (
|
|
406
406
|
<>
|
|
407
407
|
<div className={CommonStyles["verification-menu__group"]}>
|
|
408
|
-
<div dangerouslySetInnerHTML={{__html: Icons.ContentBadgeIcon}}
|
|
408
|
+
<div dangerouslySetInnerHTML={{__html: Icons.ContentBadgeIcon}} className={CommonStyles["verification-menu__group-icon"]} />
|
|
409
409
|
<div className={CommonStyles["verification-menu__group-text"]}>
|
|
410
410
|
<div className={CommonStyles["verification-menu__group-title"]}>
|
|
411
411
|
This content has been verified as authentic
|
|
@@ -416,7 +416,7 @@ export const ContentVerificationMenu = ({player, Hide, className=""}) => {
|
|
|
416
416
|
</div>
|
|
417
417
|
</div>
|
|
418
418
|
<div className={CommonStyles["verification-menu__group"]}>
|
|
419
|
-
<div dangerouslySetInnerHTML={{__html: Icons.ContentCredentialsIcon}} className={CommonStyles["verification-menu__group-icon"]} />
|
|
419
|
+
<div dangerouslySetInnerHTML={{__html: Icons.ContentCredentialsIcon}} className={[CommonStyles["verification-menu__group-icon"], CommonStyles["verification-menu__group-icon--cc"]].join(" ")} />
|
|
420
420
|
<div className={CommonStyles["verification-menu__group-text"]}>
|
|
421
421
|
<button onClick={() => setShowDetails(true)} className={CommonStyles["verification-menu__group-title"]}>
|
|
422
422
|
Content Credentials
|
package/lib/ui/Observers.js
CHANGED
|
@@ -126,19 +126,20 @@ export const ObserveVideoTime = ({video, rate=10, setCurrentTime}) => {
|
|
|
126
126
|
|
|
127
127
|
export const ObserveResize = ({target, setSize, setOrientation, setDimensions}) => {
|
|
128
128
|
let dimensionsUpdateTimeout;
|
|
129
|
-
|
|
129
|
+
|
|
130
|
+
const ResizeUpdate = () => {
|
|
130
131
|
clearTimeout(dimensionsUpdateTimeout);
|
|
131
132
|
|
|
132
|
-
const dimensions =
|
|
133
|
+
const dimensions = target.getBoundingClientRect();
|
|
133
134
|
|
|
134
135
|
let size = "sm";
|
|
135
136
|
let orientation = "landscape";
|
|
136
137
|
// Use actual player size instead of media queries
|
|
137
|
-
if(dimensions.width > 1400) {
|
|
138
|
+
if(dimensions.width > 1400 && dimensions.height > 600) {
|
|
138
139
|
size = "xl";
|
|
139
|
-
} else if(dimensions.width > 1000) {
|
|
140
|
+
} else if(dimensions.width > 1000 && dimensions.height > 400) {
|
|
140
141
|
size = "lg";
|
|
141
|
-
} else if(dimensions.width > 650) {
|
|
142
|
+
} else if(dimensions.width > 650 && dimensions.height > 300) {
|
|
142
143
|
size = "md";
|
|
143
144
|
}
|
|
144
145
|
|
|
@@ -152,8 +153,11 @@ export const ObserveResize = ({target, setSize, setOrientation, setDimensions})
|
|
|
152
153
|
dimensionsUpdateTimeout = setTimeout(() => {
|
|
153
154
|
setDimensions({width: dimensions.width, height: dimensions.height});
|
|
154
155
|
}, 500);
|
|
155
|
-
}
|
|
156
|
+
};
|
|
157
|
+
|
|
158
|
+
ResizeUpdate();
|
|
156
159
|
|
|
160
|
+
const observer = new ResizeObserver(ResizeUpdate);
|
|
157
161
|
observer.observe(target);
|
|
158
162
|
|
|
159
163
|
return () => observer.disconnect();
|
package/lib/ui/WebControls.jsx
CHANGED
|
@@ -162,7 +162,9 @@ const ContentVerificationControls = ({player}) => {
|
|
|
162
162
|
|
|
163
163
|
UpdateVerification();
|
|
164
164
|
|
|
165
|
-
player.controls.RegisterSettingsListener(UpdateVerification);
|
|
165
|
+
const disposeSettingsListener = player.controls.RegisterSettingsListener(UpdateVerification);
|
|
166
|
+
|
|
167
|
+
return () => disposeSettingsListener && disposeSettingsListener();
|
|
166
168
|
}, []);
|
|
167
169
|
|
|
168
170
|
if(!contentVerified) {
|
|
@@ -188,13 +190,20 @@ const ContentVerificationControls = ({player}) => {
|
|
|
188
190
|
const WebControls = ({player, playbackStarted, canPlay, recentlyInteracted, setRecentUserAction, className=""}) => {
|
|
189
191
|
const [videoState, setVideoState] = useState(undefined);
|
|
190
192
|
const [playerClickHandler, setPlayerClickHandler] = useState(undefined);
|
|
193
|
+
const [menuVisible, setMenuVisible] = useState(player.controls.IsMenuVisible());
|
|
191
194
|
|
|
192
195
|
useEffect(() => {
|
|
193
196
|
setPlayerClickHandler(PlayerClick({player, setRecentUserAction}));
|
|
194
197
|
|
|
198
|
+
const UpdateMenuVisibility = () => setMenuVisible(player.controls.IsMenuVisible());
|
|
199
|
+
const disposeSettingsListener = player.controls.RegisterSettingsListener(UpdateMenuVisibility);
|
|
200
|
+
|
|
195
201
|
const disposeVideoObserver = ObserveVideo({target: player.target, video: player.video, setVideoState});
|
|
196
202
|
|
|
197
|
-
return () =>
|
|
203
|
+
return () => {
|
|
204
|
+
disposeSettingsListener && disposeSettingsListener();
|
|
205
|
+
disposeVideoObserver && disposeVideoObserver();
|
|
206
|
+
}
|
|
198
207
|
}, []);
|
|
199
208
|
|
|
200
209
|
if(!videoState) { return null; }
|
|
@@ -202,7 +211,7 @@ const WebControls = ({player, playbackStarted, canPlay, recentlyInteracted, setR
|
|
|
202
211
|
const collectionInfo = player.controls.GetCollectionInfo();
|
|
203
212
|
|
|
204
213
|
// Title autohide is not dependent on controls settings
|
|
205
|
-
const showUI = recentlyInteracted || !playbackStarted ||
|
|
214
|
+
const showUI = recentlyInteracted || !playbackStarted || menuVisible;
|
|
206
215
|
const hideControls = !showUI && player.playerOptions.controls === EluvioPlayerParameters.controls.AUTO_HIDE;
|
|
207
216
|
|
|
208
217
|
player.__SetControlsVisibility(!hideControls);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eluvio/elv-player-js",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.9",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"license": "MIT",
|
|
@@ -36,10 +36,10 @@
|
|
|
36
36
|
"package-lock.json"
|
|
37
37
|
],
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@eluvio/elv-client-js": "^4.0.
|
|
39
|
+
"@eluvio/elv-client-js": "^4.0.89",
|
|
40
40
|
"dashjs": "~4.7.0",
|
|
41
41
|
"focus-visible": "^5.2.0",
|
|
42
|
-
"hls.js": "~1.
|
|
42
|
+
"hls.js": "~1.5.12",
|
|
43
43
|
"mux-embed": "^4.30.0",
|
|
44
44
|
"react": "^18.2.0",
|
|
45
45
|
"react-dom": "^18.2.0",
|
|
@@ -56,6 +56,7 @@
|
|
|
56
56
|
"eslint-plugin-react-hooks": "^4.6.0",
|
|
57
57
|
"eslint-plugin-react-refresh": "^0.4.5",
|
|
58
58
|
"jsdoc": "^4.0.0",
|
|
59
|
+
"sass": "^1.77.6",
|
|
59
60
|
"stylelint": "^16.2.0",
|
|
60
61
|
"stylelint-config-standard": "^36.0.0",
|
|
61
62
|
"stylelint-order": "^6.0.4",
|