@eluvio/elv-player-js 2.1.9 → 2.1.11
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 +16 -16
- package/dist/{dash.all.min-PTL9WKVC.js → dash.all.min-CTjILL9u.js} +1 -1
- package/dist/{dash.all.min-Bdm0E2XJ.mjs → dash.all.min-CWtC9vY7.mjs} +1 -1
- package/dist/elv-player-js.cjs.js +1 -1
- package/dist/elv-player-js.es.js +1 -1
- package/dist/{hls-DhmD3Age.mjs → hls-BJ_UTP2O.mjs} +3084 -3292
- package/dist/hls-BOKzkrp5.js +40 -0
- package/dist/{index-BXgAxQ7u.js → index-9mSabEIv.js} +1 -1
- package/dist/{index-0lALTpqI.mjs → index-Bp6gUmWS.mjs} +1 -1
- package/dist/{index-yCdCsZOJ.js → index-D7AUl6NP.js} +40 -40
- package/dist/{index-CUuHVVgb.mjs → index-DwyBjycW.mjs} +635 -634
- package/lib/player/ThumbnailHandler.js +3 -4
- package/lib/ui/Components.jsx +5 -5
- package/package.json +2 -2
- package/dist/hls-BSI-ecIH.js +0 -40
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {Utils} from "@eluvio/elv-client-js";
|
|
2
2
|
import UrlJoin from "url-join";
|
|
3
|
-
import
|
|
3
|
+
import IntervalTree from "node-interval-tree";
|
|
4
4
|
|
|
5
5
|
let _tagId = 1;
|
|
6
6
|
export const Cue = ({tagType, tagId, label, startTime, endTime, text, tag, ...extra}) => {
|
|
@@ -96,7 +96,7 @@ export const CreateTrackIntervalTree = (tags, label) => {
|
|
|
96
96
|
|
|
97
97
|
Object.values(tags).forEach(tag => {
|
|
98
98
|
try {
|
|
99
|
-
intervalTree.insert(
|
|
99
|
+
intervalTree.insert(tag.startTime, tag.startTime + 1, tag.tagId);
|
|
100
100
|
} catch(error) {
|
|
101
101
|
// eslint-disable-next-line no-console
|
|
102
102
|
console.warn(`Invalid tag in track '${label}'`);
|
|
@@ -183,8 +183,7 @@ class ThumbnailHandler {
|
|
|
183
183
|
ThumbnailImage(startTime) {
|
|
184
184
|
if(!this.intervalTree) { return; }
|
|
185
185
|
|
|
186
|
-
|
|
187
|
-
let thumbnailIndex = record && record.name;
|
|
186
|
+
const thumbnailIndex = (this.intervalTree.search(startTime, startTime + this.maxInterval))[0];
|
|
188
187
|
|
|
189
188
|
if(!thumbnailIndex) { return; }
|
|
190
189
|
|
package/lib/ui/Components.jsx
CHANGED
|
@@ -74,7 +74,7 @@ export const UserActionIndicator = ({action}) => {
|
|
|
74
74
|
);
|
|
75
75
|
};
|
|
76
76
|
|
|
77
|
-
const Thumbnail = ({player, time, progress,
|
|
77
|
+
const Thumbnail = ({player, time, progress, duration, visible}) => {
|
|
78
78
|
const [ref, setRef] = useState(null);
|
|
79
79
|
|
|
80
80
|
if(!player.thumbnailsLoaded) {
|
|
@@ -82,10 +82,10 @@ const Thumbnail = ({player, time, progress, videoState, visible}) => {
|
|
|
82
82
|
}
|
|
83
83
|
|
|
84
84
|
time = typeof time !== "undefined" ? time :
|
|
85
|
-
progress *
|
|
85
|
+
progress * duration;
|
|
86
86
|
|
|
87
87
|
progress = typeof progress !== "undefined" ? progress :
|
|
88
|
-
time /
|
|
88
|
+
time / duration;
|
|
89
89
|
|
|
90
90
|
let maxPercent = 100;
|
|
91
91
|
if(ref) {
|
|
@@ -105,7 +105,7 @@ const Thumbnail = ({player, time, progress, videoState, visible}) => {
|
|
|
105
105
|
>
|
|
106
106
|
<img src={thumbnailImage} alt="Thumbnail" className={CommonStyles["thumbnail__image"]} />
|
|
107
107
|
<div className={CommonStyles["thumbnail__time"]}>
|
|
108
|
-
{ Time(time,
|
|
108
|
+
{ Time(time, duration) }
|
|
109
109
|
</div>
|
|
110
110
|
</div>
|
|
111
111
|
);
|
|
@@ -192,7 +192,7 @@ export const SeekBar = ({player, videoState, setRecentUserAction, className=""})
|
|
|
192
192
|
<Thumbnail
|
|
193
193
|
player={player}
|
|
194
194
|
progress={focused ? currentTime / videoState.duration : hoverPosition}
|
|
195
|
-
|
|
195
|
+
duration={videoState.duration}
|
|
196
196
|
visible={hovering || focused}
|
|
197
197
|
/>
|
|
198
198
|
</div>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eluvio/elv-player-js",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.11",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/elv-player-js.es.js",
|
|
6
6
|
"license": "MIT",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"@eluvio/elv-client-js": "^4.2.5",
|
|
40
40
|
"dashjs": "git+https://github.com/elv-zenia/dash.js.git#text-track-fix",
|
|
41
41
|
"focus-visible": "^5.2.0",
|
|
42
|
-
"hls.js": "1.6.
|
|
42
|
+
"hls.js": "1.6.11",
|
|
43
43
|
"mux-embed": "^5.9.0",
|
|
44
44
|
"node-interval-tree": "^2.1.2",
|
|
45
45
|
"react": "^18.2.0",
|