@eluvio/elv-player-js 2.0.13 → 2.0.14
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-C2aNIlgB.mjs → Analytics-ChS8E6U3.mjs} +1 -1
- package/dist/{Analytics-BpQvXFBN.js → Analytics-DwGlTvGC.js} +1 -1
- package/dist/{dash.all.min-CvyuA1qu.js → dash.all.min-9S5GuYl5.js} +1 -1
- package/dist/{dash.all.min-4KPdfQy9.mjs → dash.all.min-B6vTtJvV.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-BbdUj9ed.mjs → index-BI8OZHVA.mjs} +1 -1
- package/dist/{index-cfJzxx0E.js → index-Bq7QBx28.js} +29 -29
- package/dist/{index-DpcTzcxF.js → index-BtlPau_Q.js} +1 -1
- package/dist/{index-vNV4wecA.mjs → index-D3xGWtl3.mjs} +744 -738
- package/lib/player/Player.js +7 -0
- package/lib/player/PlayerParameters.js +5 -0
- package/lib/static/stylesheets/controls-web.module.scss +7 -6
- package/lib/ui/Components.jsx +1 -1
- package/lib/ui/PlayerProfileForm.jsx +1 -1
- package/lib/ui/TVControls.jsx +8 -4
- package/lib/ui/WebControls.jsx +7 -1
- package/package.json +1 -1
package/lib/player/Player.js
CHANGED
|
@@ -118,6 +118,10 @@ export class EluvioPlayer {
|
|
|
118
118
|
options.ignore_trimming = playoutParameters.ignoreTrimming;
|
|
119
119
|
options.resolve = playoutParameters.resolve;
|
|
120
120
|
|
|
121
|
+
if(this.dvrEnabled) {
|
|
122
|
+
options.dvr = 1;
|
|
123
|
+
}
|
|
124
|
+
|
|
121
125
|
if(playoutParameters.offering || playoutParameters.directLink || (playoutParameters.offerings || []).length > 0) {
|
|
122
126
|
let availableOfferings = (await client.AvailableOfferings({
|
|
123
127
|
objectId: playoutParameters.objectId,
|
|
@@ -289,6 +293,7 @@ export class EluvioPlayer {
|
|
|
289
293
|
}
|
|
290
294
|
|
|
291
295
|
this.isLive = parameters.sourceOptions.contentInfo.type === EluvioPlayerParameters.type.LIVE;
|
|
296
|
+
this.dvrEnabled = parameters.sourceOptions.contentInfo.liveDVR === EluvioPlayerParameters.liveDVR.ON;
|
|
292
297
|
|
|
293
298
|
this.errors = 0;
|
|
294
299
|
|
|
@@ -968,6 +973,8 @@ export class EluvioPlayer {
|
|
|
968
973
|
this.player = undefined;
|
|
969
974
|
this.initTimeLogged = false;
|
|
970
975
|
this.canPlay = false;
|
|
976
|
+
this.isLive = false;
|
|
977
|
+
this.dvrEnabled = false;
|
|
971
978
|
}
|
|
972
979
|
|
|
973
980
|
async __HardReload(error, delay=6000) {
|
|
@@ -88,6 +88,10 @@ export const PlayerParameters = {
|
|
|
88
88
|
verifyContent: {
|
|
89
89
|
OFF: false,
|
|
90
90
|
ON: true
|
|
91
|
+
},
|
|
92
|
+
liveDVR: {
|
|
93
|
+
OFF: false,
|
|
94
|
+
ON: true
|
|
91
95
|
}
|
|
92
96
|
};
|
|
93
97
|
|
|
@@ -124,6 +128,7 @@ export const DefaultParameters = {
|
|
|
124
128
|
image: undefined,
|
|
125
129
|
posterImage: undefined,
|
|
126
130
|
type: PlayerParameters.type.VOD,
|
|
131
|
+
liveDVR: PlayerParameters.liveDVR.OFF,
|
|
127
132
|
headers: []
|
|
128
133
|
},
|
|
129
134
|
mediaCollectionOptions: {
|
|
@@ -65,9 +65,9 @@
|
|
|
65
65
|
align-items: center;
|
|
66
66
|
color: var(--color-button);
|
|
67
67
|
display: flex;
|
|
68
|
+
height: 30px;
|
|
68
69
|
padding: 4px;
|
|
69
70
|
transition: color 0.15s ease;
|
|
70
|
-
height: 30px;
|
|
71
71
|
width: 30px;
|
|
72
72
|
|
|
73
73
|
svg {
|
|
@@ -167,8 +167,8 @@
|
|
|
167
167
|
|
|
168
168
|
.center-play-button {
|
|
169
169
|
height: 100px;
|
|
170
|
-
transition: opacity 0.5s ease;
|
|
171
170
|
margin-bottom: 30px;
|
|
171
|
+
transition: opacity 0.5s ease;
|
|
172
172
|
width: 100px;
|
|
173
173
|
z-index: var(--layer-center-button);
|
|
174
174
|
|
|
@@ -233,6 +233,7 @@
|
|
|
233
233
|
align-items: center;
|
|
234
234
|
display: flex;
|
|
235
235
|
font-size: 14px;
|
|
236
|
+
gap: 10px;
|
|
236
237
|
min-width: 100px;
|
|
237
238
|
user-select: none;
|
|
238
239
|
white-space: nowrap;
|
|
@@ -334,12 +335,12 @@
|
|
|
334
335
|
|
|
335
336
|
.icon-button {
|
|
336
337
|
border: 1px solid transparent;
|
|
337
|
-
transition: background-color 0.25s ease, color 0.25s ease;
|
|
338
338
|
padding: 0;
|
|
339
|
+
transition: background-color 0.25s ease, color 0.25s ease;
|
|
339
340
|
|
|
340
341
|
&-active,
|
|
341
342
|
&:focus-visible {
|
|
342
|
-
filter: drop-shadow(0 0 3px rgba(255, 255, 255,
|
|
343
|
+
filter: drop-shadow(0 0 3px rgba(255, 255, 255, 50%));
|
|
343
344
|
}
|
|
344
345
|
}
|
|
345
346
|
}
|
|
@@ -385,8 +386,8 @@
|
|
|
385
386
|
|
|
386
387
|
.icon-button {
|
|
387
388
|
height: 25px;
|
|
388
|
-
width: 25px;
|
|
389
389
|
min-width: 25px;
|
|
390
|
+
width: 25px;
|
|
390
391
|
}
|
|
391
392
|
|
|
392
393
|
.controls {
|
|
@@ -397,8 +398,8 @@
|
|
|
397
398
|
|
|
398
399
|
.center-play-button {
|
|
399
400
|
height: 50px;
|
|
400
|
-
width: 50px;
|
|
401
401
|
margin-bottom: 15px;
|
|
402
|
+
width: 50px;
|
|
402
403
|
}
|
|
403
404
|
|
|
404
405
|
/* Position menus relative to whole player */
|
package/lib/ui/Components.jsx
CHANGED
|
@@ -25,7 +25,7 @@ const PlayerProfileForm = ({player, Close}) => {
|
|
|
25
25
|
|
|
26
26
|
try {
|
|
27
27
|
setSubmitting(true);
|
|
28
|
-
await player.controls.SetPlayerProfile({profile: "custom",
|
|
28
|
+
await player.controls.SetPlayerProfile({profile: "custom", customOptions: JSON.parse(playerOptions)});
|
|
29
29
|
|
|
30
30
|
Close();
|
|
31
31
|
} catch(error) {
|
package/lib/ui/TVControls.jsx
CHANGED
|
@@ -26,7 +26,7 @@ const TimeIndicator = ({player, videoState}) => {
|
|
|
26
26
|
return () => disposeVideoTimeObserver && disposeVideoTimeObserver();
|
|
27
27
|
}, []);
|
|
28
28
|
|
|
29
|
-
if(player.isLive) {
|
|
29
|
+
if(player.isLive && !player.dvrEnabled) {
|
|
30
30
|
return null;
|
|
31
31
|
}
|
|
32
32
|
|
|
@@ -306,9 +306,13 @@ const TVControls = ({player, playbackStarted, canPlay, recentlyInteracted, setRe
|
|
|
306
306
|
<div className={ControlStyles["spacer"]}/>
|
|
307
307
|
{
|
|
308
308
|
!player.isLive ? null :
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
309
|
+
player.dvrEnabled ?
|
|
310
|
+
<button onClick={() => player.controls.Seek({time: player.controls.GetDuration() - 2})} className={ControlStyles["live-indicator"]}>
|
|
311
|
+
Live
|
|
312
|
+
</button> :
|
|
313
|
+
<div className={ControlStyles["live-indicator"]}>
|
|
314
|
+
Live
|
|
315
|
+
</div>
|
|
312
316
|
}
|
|
313
317
|
{
|
|
314
318
|
!collectionInfo ? null :
|
package/lib/ui/WebControls.jsx
CHANGED
|
@@ -26,7 +26,7 @@ const TimeIndicator = ({player, videoState}) => {
|
|
|
26
26
|
return () => disposeVideoTimeObserver && disposeVideoTimeObserver();
|
|
27
27
|
}, []);
|
|
28
28
|
|
|
29
|
-
if(player.isLive) {
|
|
29
|
+
if(player.isLive && !player.dvrEnabled) {
|
|
30
30
|
return (
|
|
31
31
|
<div className={ControlStyles["live-indicator"]}>
|
|
32
32
|
Live
|
|
@@ -36,6 +36,12 @@ const TimeIndicator = ({player, videoState}) => {
|
|
|
36
36
|
|
|
37
37
|
return (
|
|
38
38
|
<div className={ControlStyles["time"]}>
|
|
39
|
+
{
|
|
40
|
+
!player.isLive ? null :
|
|
41
|
+
<button onClick={() => player.controls.Seek({time: player.controls.GetDuration() - 2})} className={ControlStyles["live-indicator"]}>
|
|
42
|
+
Live
|
|
43
|
+
</button>
|
|
44
|
+
}
|
|
39
45
|
{ Time(currentTime, videoState.duration) } / { Time(videoState.duration, videoState.duration) }
|
|
40
46
|
</div>
|
|
41
47
|
);
|