Use react lazy to break js files into smaller chunks & remove videojs in favor of hls.js (#10431)

* Use dynamic imports to reduce initial load times

Remove videojs

* Convert to using hls.js instead of videojs

* Improve mobile controls experience

* Cleanup

* Ensure playback rate stays teh same when source changes

* Use webp for latest camera image

* Switch to hls.js on error

* Don't rerun error if hls already tried

* Fix error checking

* also check for media decode error to fallback to HLS

---------

Co-authored-by: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com>
This commit is contained in:
Nicolas Mowen
2024-03-13 14:24:24 -06:00
committed by GitHub
parent 0e8350ea7f
commit f9ed082e35
12 changed files with 737 additions and 1029 deletions

View File

@@ -39,6 +39,7 @@
"clsx": "^2.1.0",
"copy-to-clipboard": "^3.3.3",
"date-fns": "^2.30.0",
"hls.js": "^1.5.7",
"idb-keyval": "^6.2.1",
"immer": "^10.0.3",
"lucide-react": "^0.294.0",
@@ -65,8 +66,6 @@
"tailwind-merge": "^2.1.0",
"tailwindcss-animate": "^1.0.7",
"vaul": "^0.8.0",
"video.js": "^8.6.1",
"videojs-playlist": "^5.1.0",
"vite-plugin-monaco-editor": "^1.1.0",
"zod": "^3.22.4"
},