@eluvio/elv-player-js 2.0.4 → 2.0.6
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/dist/.vite/manifest.json +17 -17
- package/dist/{Analytics-CYJLgx_a.js → Analytics-BBSXEwS9.js} +1 -1
- package/dist/{Analytics-SL78DnFJ.mjs → Analytics-CTh8ex_T.mjs} +1 -1
- package/dist/{dash.all.min-Csr27tOz.js → dash.all.min-BvOABBaR.js} +1 -1
- package/dist/{dash.all.min-dlsJq_zB.mjs → dash.all.min-VhfS9TH7.mjs} +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/{index-DiL5zcI4.mjs → index-BNdC97NO.mjs} +6200 -6148
- package/dist/{index-CTZLSJgI.js → index-DjtnBiEN.js} +72 -72
- package/dist/{index-CO5vQxYj.mjs → index-Dm3yOJL4.mjs} +1 -1
- package/dist/{index-DXZS88KZ.js → index-nb3SLpgf.js} +1 -1
- package/lib/player/Controls.js +1 -1
- package/lib/player/Player.js +78 -12
- package/lib/static/icons/Icons.js +1 -1
- package/lib/static/stylesheets/common.module.scss +14 -2
- package/lib/static/stylesheets/controls-web.module.scss +5 -0
- package/lib/ui/BuildIcons.cjs +1 -1
- package/lib/ui/Components.jsx +37 -12
- package/lib/ui/PlayerUI.jsx +2 -2
- package/lib/ui/TVControls.jsx +1 -1
- package/lib/ui/WebControls.jsx +5 -3
- package/package.json +2 -2
- /package/lib/static/icons/svgs/{shield.svg → content-badge.svg} +0 -0
package/lib/ui/Components.jsx
CHANGED
|
@@ -324,6 +324,8 @@ export const CopyButton = ({label, value, className=""}) => {
|
|
|
324
324
|
};
|
|
325
325
|
|
|
326
326
|
const ContentDetail = ({label, value, copyable}) => {
|
|
327
|
+
if(!value) { return null; }
|
|
328
|
+
|
|
327
329
|
return (
|
|
328
330
|
<div className={CommonStyles["verification-menu__detail"]}>
|
|
329
331
|
<label className={CommonStyles["verification-menu__detail-label"]}>{label}:</label>
|
|
@@ -344,9 +346,13 @@ export const ContentVerificationMenu = ({player, Hide, className=""}) => {
|
|
|
344
346
|
const menuRef = createRef();
|
|
345
347
|
const [audit, setAudit] = useState();
|
|
346
348
|
const [showDetails, setShowDetails] = useState(false);
|
|
349
|
+
const [_, setLoaded] = useState(false);
|
|
347
350
|
|
|
348
351
|
useEffect(() => {
|
|
349
|
-
|
|
352
|
+
player.__LoadVerificationDetails()
|
|
353
|
+
.then(() => setLoaded(true));
|
|
354
|
+
|
|
355
|
+
const UpdateSettings = () => setAudit(player.controls.GetContentVerificationDetails());
|
|
350
356
|
|
|
351
357
|
UpdateSettings();
|
|
352
358
|
|
|
@@ -374,7 +380,7 @@ export const ContentVerificationMenu = ({player, Hide, className=""}) => {
|
|
|
374
380
|
content = (
|
|
375
381
|
<>
|
|
376
382
|
<div className={CommonStyles["verification-menu__group"]}>
|
|
377
|
-
<div dangerouslySetInnerHTML={{__html: Icons.
|
|
383
|
+
<div dangerouslySetInnerHTML={{__html: Icons.ContentBadgeIcon}} style={{width: 35, height: 35}} className={CommonStyles["verification-menu__group-icon"]} />
|
|
378
384
|
<div className={CommonStyles["verification-menu__group-text"]}>
|
|
379
385
|
<div className={CommonStyles["verification-menu__group-title"]}>
|
|
380
386
|
This content has been verified as authentic
|
|
@@ -385,7 +391,7 @@ export const ContentVerificationMenu = ({player, Hide, className=""}) => {
|
|
|
385
391
|
</div>
|
|
386
392
|
</div>
|
|
387
393
|
<div className={CommonStyles["verification-menu__group"]}>
|
|
388
|
-
<div dangerouslySetInnerHTML={{__html: Icons.ContentCredentialsIcon}} className={CommonStyles["verification-menu__group-icon"]} />
|
|
394
|
+
<div dangerouslySetInnerHTML={{__html: Icons.ContentCredentialsIcon}} style={{height: 30, maxWidth: 30}} className={CommonStyles["verification-menu__group-icon"]} />
|
|
389
395
|
<div className={CommonStyles["verification-menu__group-text"]}>
|
|
390
396
|
<button onClick={() => setShowDetails(true)} className={CommonStyles["verification-menu__group-title"]}>
|
|
391
397
|
View Content Credentials
|
|
@@ -399,7 +405,7 @@ export const ContentVerificationMenu = ({player, Hide, className=""}) => {
|
|
|
399
405
|
content = (
|
|
400
406
|
<>
|
|
401
407
|
<div className={CommonStyles["verification-menu__group"]}>
|
|
402
|
-
<div dangerouslySetInnerHTML={{__html: Icons.
|
|
408
|
+
<div dangerouslySetInnerHTML={{__html: Icons.ContentBadgeIcon}} style={{width: 50, height: 50}} className={CommonStyles["verification-menu__group-icon"]} />
|
|
403
409
|
<div className={CommonStyles["verification-menu__group-text"]}>
|
|
404
410
|
<div className={CommonStyles["verification-menu__group-title"]}>
|
|
405
411
|
This content has been verified as authentic
|
|
@@ -423,27 +429,46 @@ export const ContentVerificationMenu = ({player, Hide, className=""}) => {
|
|
|
423
429
|
</div>
|
|
424
430
|
</div>
|
|
425
431
|
</div>
|
|
426
|
-
<div className={CommonStyles["verification-menu__details"]}>
|
|
432
|
+
<div className={CommonStyles["verification-menu__details"]} key={`details-${audit.details._state}`}>
|
|
427
433
|
<ContentDetail label="Content Fabric Object ID" value={audit.details.objectId} copyable />
|
|
428
434
|
<ContentDetail label="Organization Address" value={audit.details.tenantAddress} copyable />
|
|
429
|
-
{
|
|
430
|
-
!audit.details.tenantName ? null :
|
|
431
|
-
<ContentDetail label="Organization Name" value={audit.details.tenantName} />
|
|
432
|
-
}
|
|
435
|
+
<ContentDetail label="Organization Name" value={audit.details.tenantName && audit.details.tenantName.toString()} />
|
|
433
436
|
<ContentDetail label="Owner Address" value={audit.details.ownerAddress} copyable />
|
|
434
|
-
<ContentDetail
|
|
437
|
+
<ContentDetail
|
|
438
|
+
label="Content Object Contract Address"
|
|
439
|
+
value={
|
|
440
|
+
audit.details.explorerUrl ?
|
|
441
|
+
<a href={audit.details.explorerUrl} target="_blank" rel="noreferrer">
|
|
442
|
+
{audit.details.address}
|
|
443
|
+
</a> :
|
|
444
|
+
audit.details.address
|
|
445
|
+
}
|
|
446
|
+
copyable
|
|
447
|
+
/>
|
|
448
|
+
<ContentDetail label="Versions" value={audit.details.versionCount} />
|
|
435
449
|
<ContentDetail label="Content Version Hash" value={audit.details.versionHash} copyable />
|
|
436
450
|
{
|
|
437
451
|
!audit.details.lastCommittedAt ? null :
|
|
438
|
-
<ContentDetail label="
|
|
452
|
+
<ContentDetail label="Latest Commit" value={new Date(audit.details.lastCommittedAt).toLocaleTimeString(navigator.language || "en-us", {year: "numeric", "month": "long", day: "numeric"})} />
|
|
439
453
|
}
|
|
454
|
+
<ContentDetail label="Latest Version Hash" value={audit.details.latestVersionHash} copyable />
|
|
455
|
+
<ContentDetail
|
|
456
|
+
label="Latest Transaction"
|
|
457
|
+
value={
|
|
458
|
+
audit.details._state !== "full" ?
|
|
459
|
+
<Spinner className={CommonStyles["verification-menu__loader"]} /> :
|
|
460
|
+
audit.details.latestTransactionHashUrl ?
|
|
461
|
+
<a href={audit.details.latestTransactionHashUrl} target="_blank" rel="noreferrer">
|
|
462
|
+
{ audit.details.latestTransactionHash && audit.details.latestTransactionHash.toString() }
|
|
463
|
+
</a> : undefined
|
|
464
|
+
}
|
|
465
|
+
/>
|
|
440
466
|
<ContentDetail label="Signature Algorithm" value={audit.details.signatureMethod} />
|
|
441
467
|
</div>
|
|
442
468
|
</>
|
|
443
469
|
);
|
|
444
470
|
}
|
|
445
471
|
|
|
446
|
-
|
|
447
472
|
return (
|
|
448
473
|
<div ref={menuRef}>
|
|
449
474
|
<div key="menu" role="menu" className={`${CommonStyles["menu"]} ${CommonStyles["verification-menu"]} ${showDetails ? CommonStyles["verification-menu--details"] : ""} ${className}`}>
|
package/lib/ui/PlayerUI.jsx
CHANGED
|
@@ -199,8 +199,8 @@ const PlayerUI = ({target, parameters, InitCallback, ErrorCallback, Unmount, Res
|
|
|
199
199
|
tabIndex={0}
|
|
200
200
|
style={{
|
|
201
201
|
backgroundColor: parameters.playerOptions.backgroundColor || "transparent",
|
|
202
|
-
"--portal-width": `${dimensions.width}px`,
|
|
203
|
-
"--portal-height": `${dimensions.height}px`
|
|
202
|
+
"--portal-width": `${shouldRotate ? dimensions.height : dimensions.width}px`,
|
|
203
|
+
"--portal-height": `${shouldRotate ? dimensions.width : dimensions.height}px`
|
|
204
204
|
}}
|
|
205
205
|
className={[PlayerStyles["player-container"], shouldRotate ? PlayerStyles["player-container--rotated"] : "", `__eluvio-player--size-${size}`, `__eluvio-player--orientation-${orientation}`].join(" ")}
|
|
206
206
|
>
|
package/lib/ui/TVControls.jsx
CHANGED
|
@@ -229,7 +229,7 @@ const ContentVerificationControls = ({player, setMenuActive}) => {
|
|
|
229
229
|
return (
|
|
230
230
|
<MenuButton
|
|
231
231
|
label="Content Verification Menu"
|
|
232
|
-
icon={Icons.
|
|
232
|
+
icon={Icons.ContentBadgeIcon}
|
|
233
233
|
player={player}
|
|
234
234
|
setMenuActive={setMenuActive}
|
|
235
235
|
MenuComponent={ContentVerificationMenu}
|
package/lib/ui/WebControls.jsx
CHANGED
|
@@ -11,9 +11,9 @@ import EluvioPlayerParameters from "../player/PlayerParameters.js";
|
|
|
11
11
|
import EluvioLogo from "../static/images/Logo.png";
|
|
12
12
|
import {CollectionMenu, ContentVerificationMenu, SeekBar, SettingsMenu, VolumeControls} from "./Components.jsx";
|
|
13
13
|
|
|
14
|
-
export const IconButton = ({icon, ...props}) => {
|
|
14
|
+
export const IconButton = ({icon, className="", ...props}) => {
|
|
15
15
|
return (
|
|
16
|
-
<button {...props} className={`${ControlStyles["icon-button"]} ${
|
|
16
|
+
<button {...props} className={`${ControlStyles["icon-button"]} ${className}`} dangerouslySetInnerHTML={{__html: icon}} />
|
|
17
17
|
);
|
|
18
18
|
};
|
|
19
19
|
|
|
@@ -176,7 +176,7 @@ const ContentVerificationControls = ({player, setMenuActive}) => {
|
|
|
176
176
|
</div>
|
|
177
177
|
<MenuButton
|
|
178
178
|
label="Content Verification Menu"
|
|
179
|
-
icon={Icons.
|
|
179
|
+
icon={Icons.ContentBadgeIcon}
|
|
180
180
|
player={player}
|
|
181
181
|
setMenuActive={setMenuActive}
|
|
182
182
|
MenuComponent={ContentVerificationMenu}
|
|
@@ -279,6 +279,7 @@ const WebControls = ({player, playbackStarted, canPlay, recentlyInteracted, setR
|
|
|
279
279
|
aria-label="Rotate Video"
|
|
280
280
|
icon={Icons.RotateIcon}
|
|
281
281
|
onClick={() => player.controls.SetAllowRotation(!player.controls.AllowRotation())}
|
|
282
|
+
className={ControlStyles["right-control-button"]}
|
|
282
283
|
/>
|
|
283
284
|
}
|
|
284
285
|
{
|
|
@@ -295,6 +296,7 @@ const WebControls = ({player, playbackStarted, canPlay, recentlyInteracted, setR
|
|
|
295
296
|
aria-label={videoState.fullscreen ? "Exit Fullscreen" : "Fullscreen"}
|
|
296
297
|
icon={videoState.fullscreen ? Icons.ExitFullscreenIcon : Icons.FullscreenIcon}
|
|
297
298
|
onClick={() => player.controls.ToggleFullscreen()}
|
|
299
|
+
className={ControlStyles["right-control-button"]}
|
|
298
300
|
/>
|
|
299
301
|
</div>
|
|
300
302
|
</div>
|
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.6",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"license": "MIT",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"package-lock.json"
|
|
37
37
|
],
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@eluvio/elv-client-js": "^4.0.
|
|
39
|
+
"@eluvio/elv-client-js": "^4.0.88",
|
|
40
40
|
"dashjs": "~4.7.0",
|
|
41
41
|
"focus-visible": "^5.2.0",
|
|
42
42
|
"hls.js": "~1.4.12",
|
|
File without changes
|