Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

hls.js + hls-video-element

Manav Rathif0b23a495c79
diff --git a/web/docs/dependencies.md b/web/docs/dependencies.md
index 5ee9472ebb..3218b63608 100644
--- a/web/docs/dependencies.md
+++ b/web/docs/dependencies.md
@@ -226,8 +226,16 @@ via [@fontsource-variable/inter](https://fontsource.org/fonts/inter/install).
- [PhotoSwipe](https://photoswipe.com) provides the base image viewer on top of
which we've built our file viewer.
-- [hls.js](https://github.com/video-dev/hls.js/) is used for HLS playback (we
- provide a HLS playlist to the browser for streaming videos).
+- [hls-video-element](https://github.com/muxinc/media-elements/tree/main/packages/hls-video-element)
+ provides a custom web component element for HLS playback with custom video
+ controls.
+
+ > Internally, it uses [media-chrome](https://github.com/muxinc/media-chrome)
+ > to provide video controls (we use custom controls to provide a standardized
+ > UX across browsers, but really the main reason is that Safari's default
+ > video control are on the verge of unusable), and
+ > [hls.js](https://github.com/video-dev/hls.js/) for HLS playback (Chrome and
+ > Firefox do not have native support for HLS playlists).
- [react-dropzone](https://github.com/react-dropzone/react-dropzone/) is a React
hook to create a drag-and-drop input zone. Note that we pin to the last
diff --git a/web/packages/gallery/package.json b/web/packages/gallery/package.json
index 7e88dc32e3..238bd65bc6 100644
--- a/web/packages/gallery/package.json
+++ b/web/packages/gallery/package.json
@@ -8,7 +8,7 @@
"@ffmpeg/ffmpeg": "^0.12.10",
"bs58": "^6.0.0",
"exifreader": "^4.26.2",
- "hls.js": "^1.5.20",
+ "hls-video-element": "^1.5.0",
"leaflet": "^1.9.4",
"leaflet-defaulticon-compatibility": "^0.1.2",
"photoswipe": "^5.4.4",
diff --git a/web/yarn.lock b/web/yarn.lock
index 0deb47ec29..0886a7bc3a 100644
--- a/web/yarn.lock
+++ b/web/yarn.lock
@@ -1619,6 +1619,11 @@ csstype@^3.0.2, csstype@^3.1.3:
resolved "https://registry.yarnpkg.com/csstype/-/csstype-3.1.3.tgz#d80ff294d114fb0e6ac500fbf85b60137d7eff81"
integrity sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==
+custom-media-element@^1.4.2:
+ version "1.4.2"
+ resolved "https://registry.yarnpkg.com/custom-media-element/-/custom-media-element-1.4.2.tgz#5d70d357b7605deadce72341b7c0b97a447908d4"
+ integrity sha512-AM6FRWqJyW7pWTvXb4uJj6yvHE7C6UutdhJ5o3XO5NEl5aWFcfnpz8/TuW8qr1+/wfbj50wRvdArnSNjTmjmVw==
+
data-view-buffer@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/data-view-buffer/-/data-view-buffer-1.0.2.tgz#211a03ba95ecaf7798a8c7198d79536211f88570"
@@ -2369,7 +2374,16 @@ heic-decode@^2.0.0:
dependencies:
libheif-js "^1.17.1"
-hls.js@^1.5.20:
+hls-video-element@^1.5.0:
+ version "1.5.0"
+ resolved "https://registry.yarnpkg.com/hls-video-element/-/hls-video-element-1.5.0.tgz#99d444ecc0a20520b7071f8d673dc5a47f3d07b3"
+ integrity sha512-ghFzkmd9kmeUjmHuZ/aw55V/n1OQCTy05U7yrs8oN5vmmd/pue+MxbQBXl2oXV7VupLB+LnxzZHycireLUy0VQ==
+ dependencies:
+ custom-media-element "^1.4.2"
+ hls.js "^1.5.11"
+ media-tracks "^0.3.3"
+
+hls.js@^1.5.11:
version "1.5.20"
resolved "https://registry.yarnpkg.com/hls.js/-/hls.js-1.5.20.tgz#7eb23bb5e2595311d4e2761038ca6882673de7e2"
integrity sha512-uu0VXUK52JhihhnN/MVVo1lvqNNuhoxkonqgO3IpjvQiGpJBdIXMGkofjQb/j9zvV7a1SW8U9g1FslWx/1HOiQ==
@@ -2865,6 +2879,11 @@ math-intrinsics@^1.1.0:
resolved "https://registry.yarnpkg.com/math-intrinsics/-/math-intrinsics-1.1.0.tgz#a0dd74be81e2aa5c2f27e65ce283605ee4e2b7f9"
integrity sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==
+media-tracks@^0.3.3:
+ version "0.3.3"
+ resolved "https://registry.yarnpkg.com/media-tracks/-/media-tracks-0.3.3.tgz#cca72bd791dcb76cd6427dfa6b2baa25601ea192"
+ integrity sha512-9P2FuUHnZZ3iji+2RQk7Zkh5AmZTnOG5fODACnjhCVveX1McY3jmCRHofIEI+yTBqplz7LXy48c7fQ3Uigp88w==
+
mem@^8.0.0:
version "8.1.1"
resolved "https://registry.yarnpkg.com/mem/-/mem-8.1.1.tgz#cf118b357c65ab7b7e0817bdf00c8062297c0122"