diff --git a/web/package-lock.json b/web/package-lock.json index d38e5a36c..9a5952935 100644 --- a/web/package-lock.json +++ b/web/package-lock.json @@ -22,9 +22,8 @@ "react-dom": "npm:@preact/compat@^17.1.2", "strftime": "^0.10.1", "swr": "^1.3.0", - "video.js": "^7.21.4", + "video.js": "^8.3.0", "videojs-playlist": "^5.1.0", - "videojs-seek-buttons": "^3.0.1", "vite-plugin-monaco-editor": "^1.1.0" }, "devDependencies": { @@ -33,7 +32,6 @@ "@testing-library/jest-dom": "^5.16.5", "@testing-library/preact": "^3.2.3", "@testing-library/user-event": "^14.4.3", - "@types/video.js": "^7.3.51", "@typescript-eslint/eslint-plugin": "^5.58.0", "@typescript-eslint/parser": "^5.58.0", "@vitest/coverage-c8": "^0.30.1", @@ -1761,12 +1759,6 @@ "@types/jest": "*" } }, - "node_modules/@types/video.js": { - "version": "7.3.51", - "resolved": "https://registry.npmjs.org/@types/video.js/-/video.js-7.3.51.tgz", - "integrity": "sha512-xLlt/ZfCuWYBvG2MRn018RvaEplcK6dI63aOiVUeeAWFyjx3Br1hL749ndFgbrvNdY4m9FoHG1FQ/PB6IpfSAQ==", - "dev": true - }, "node_modules/@types/yargs": { "version": "17.0.13", "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.13.tgz", @@ -2405,31 +2397,31 @@ } }, "node_modules/@videojs/http-streaming": { - "version": "2.16.2", - "resolved": "https://registry.npmjs.org/@videojs/http-streaming/-/http-streaming-2.16.2.tgz", - "integrity": "sha512-etPTUdCFu7gUWc+1XcbiPr+lrhOcBu3rV5OL1M+3PDW89zskScAkkcdqYzP4pFodBPye/ydamQoTDScOnElw5A==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@videojs/http-streaming/-/http-streaming-3.0.2.tgz", + "integrity": "sha512-iSZkwTLGg3Rx78ypCCq/GsMME89ElNvU02xj7reCE2PlITMQjyYsER1w5AsySvT1A694u5yuSzEzLLGF1cL4pg==", "dependencies": { "@babel/runtime": "^7.12.5", - "@videojs/vhs-utils": "3.0.5", - "aes-decrypter": "3.1.3", + "@videojs/vhs-utils": "4.0.0", + "aes-decrypter": "4.0.1", "global": "^4.4.0", - "m3u8-parser": "4.8.0", - "mpd-parser": "^0.22.1", - "mux.js": "6.0.1", - "video.js": "^6 || ^7" + "m3u8-parser": "^6.0.0", + "mpd-parser": "^1.0.1", + "mux.js": "6.3.0", + "video.js": "^7 || ^8" }, "engines": { "node": ">=8", "npm": ">=5" }, "peerDependencies": { - "video.js": "^6 || ^7" + "video.js": "^7 || ^8" } }, "node_modules/@videojs/vhs-utils": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/@videojs/vhs-utils/-/vhs-utils-3.0.5.tgz", - "integrity": "sha512-PKVgdo8/GReqdx512F+ombhS+Bzogiofy1LgAj4tN8PfdBx3HSS7V5WfJotKTqtOWGwVfSWsrYN/t09/DSryrw==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@videojs/vhs-utils/-/vhs-utils-4.0.0.tgz", + "integrity": "sha512-xJp7Yd4jMLwje2vHCUmi8MOUU76nxiwII3z4Eg3Ucb+6rrkFVGosrXlMgGnaLjq724j3wzNElRZ71D/CKrTtxg==", "dependencies": { "@babel/runtime": "^7.12.5", "global": "^4.4.0", @@ -2625,9 +2617,9 @@ } }, "node_modules/aes-decrypter": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/aes-decrypter/-/aes-decrypter-3.1.3.tgz", - "integrity": "sha512-VkG9g4BbhMBy+N5/XodDeV6F02chEk9IpgRTq/0bS80y4dzy79VH2Gtms02VXomf3HmyRe3yyJYkJ990ns+d6A==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/aes-decrypter/-/aes-decrypter-4.0.1.tgz", + "integrity": "sha512-H1nh/P9VZXUf17AA5NQfJML88CFjVBDuGkp5zDHa7oEhYN9TTpNLJknRY1ie0iSKWlDf6JRnJKaZVDSQdPy6Cg==", "dependencies": { "@babel/runtime": "^7.12.5", "@videojs/vhs-utils": "^3.0.5", @@ -2635,6 +2627,20 @@ "pkcs7": "^1.0.4" } }, + "node_modules/aes-decrypter/node_modules/@videojs/vhs-utils": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@videojs/vhs-utils/-/vhs-utils-3.0.5.tgz", + "integrity": "sha512-PKVgdo8/GReqdx512F+ombhS+Bzogiofy1LgAj4tN8PfdBx3HSS7V5WfJotKTqtOWGwVfSWsrYN/t09/DSryrw==", + "dependencies": { + "@babel/runtime": "^7.12.5", + "global": "^4.4.0", + "url-toolkit": "^2.2.1" + }, + "engines": { + "node": ">=8", + "npm": ">=5" + } + }, "node_modules/agent-base": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", @@ -6650,15 +6656,29 @@ } }, "node_modules/m3u8-parser": { - "version": "4.8.0", - "resolved": "https://registry.npmjs.org/m3u8-parser/-/m3u8-parser-4.8.0.tgz", - "integrity": "sha512-UqA2a/Pw3liR6Df3gwxrqghCP17OpPlQj6RBPLYygf/ZSQ4MoSgvdvhvt35qV+3NaaA0FSZx93Ix+2brT1U7cA==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/m3u8-parser/-/m3u8-parser-6.0.0.tgz", + "integrity": "sha512-s3JfDtqhxTilZQf+P1m9dZc4ohL4O/aylP1VV6g9lhKuQNfAcVUzq7d2wgJ9nZR4ibjuXaP87QzGCV6vB0kV6g==", "dependencies": { "@babel/runtime": "^7.12.5", "@videojs/vhs-utils": "^3.0.5", "global": "^4.4.0" } }, + "node_modules/m3u8-parser/node_modules/@videojs/vhs-utils": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@videojs/vhs-utils/-/vhs-utils-3.0.5.tgz", + "integrity": "sha512-PKVgdo8/GReqdx512F+ombhS+Bzogiofy1LgAj4tN8PfdBx3HSS7V5WfJotKTqtOWGwVfSWsrYN/t09/DSryrw==", + "dependencies": { + "@babel/runtime": "^7.12.5", + "global": "^4.4.0", + "url-toolkit": "^2.2.1" + }, + "engines": { + "node": ">=8", + "npm": ">=5" + } + }, "node_modules/magic-string": { "version": "0.30.0", "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.0.tgz", @@ -6855,9 +6875,9 @@ } }, "node_modules/mpd-parser": { - "version": "0.22.1", - "resolved": "https://registry.npmjs.org/mpd-parser/-/mpd-parser-0.22.1.tgz", - "integrity": "sha512-fwBebvpyPUU8bOzvhX0VQZgSohncbgYwUyJJoTSNpmy7ccD2ryiCvM7oRkn/xQH5cv73/xU7rJSNCLjdGFor0Q==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/mpd-parser/-/mpd-parser-1.1.1.tgz", + "integrity": "sha512-uZ/db5wQdlQn1L+OD49YXBhPI9UGeK1SeQE4D5EoaJIhf0WM9X3HDj8d+9PjoG06CgCvGZw3YW/wsHku+CH3yA==", "dependencies": { "@babel/runtime": "^7.12.5", "@videojs/vhs-utils": "^3.0.5", @@ -6868,6 +6888,20 @@ "mpd-to-m3u8-json": "bin/parse.js" } }, + "node_modules/mpd-parser/node_modules/@videojs/vhs-utils": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@videojs/vhs-utils/-/vhs-utils-3.0.5.tgz", + "integrity": "sha512-PKVgdo8/GReqdx512F+ombhS+Bzogiofy1LgAj4tN8PfdBx3HSS7V5WfJotKTqtOWGwVfSWsrYN/t09/DSryrw==", + "dependencies": { + "@babel/runtime": "^7.12.5", + "global": "^4.4.0", + "url-toolkit": "^2.2.1" + }, + "engines": { + "node": ">=8", + "npm": ">=5" + } + }, "node_modules/mrmime": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/mrmime/-/mrmime-1.0.1.tgz", @@ -7012,9 +7046,9 @@ "dev": true }, "node_modules/mux.js": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/mux.js/-/mux.js-6.0.1.tgz", - "integrity": "sha512-22CHb59rH8pWGcPGW5Og7JngJ9s+z4XuSlYvnxhLuc58cA1WqGDQPzuG8I+sPm1/p0CdgpzVTaKW408k5DNn8w==", + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/mux.js/-/mux.js-6.3.0.tgz", + "integrity": "sha512-/QTkbSAP2+w1nxV+qTcumSDN5PA98P0tjrADijIzQHe85oBK3Akhy9AHlH0ne/GombLMz1rLyvVsmrgRxoPDrQ==", "dependencies": { "@babel/runtime": "^7.11.2", "global": "^4.4.0" @@ -9100,29 +9134,45 @@ } }, "node_modules/video.js": { - "version": "7.21.4", - "resolved": "https://registry.npmjs.org/video.js/-/video.js-7.21.4.tgz", - "integrity": "sha512-R5e57M/5uqxQMQpFpybNbd8GtiRwFJPqkHjrhv0QTJ2tqnesbjETbck5kU5dhFr1FevsJRFhjBG4hAnvRGnXbw==", + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/video.js/-/video.js-8.3.0.tgz", + "integrity": "sha512-Vp3mqMLSUE354t+G8CbZKwcV520VKoS5fow8zjnEEKFuqStmkmnvK7/FurP6zuP/oWGJ1rqlKxML56kmJOrwRw==", "dependencies": { "@babel/runtime": "^7.12.5", - "@videojs/http-streaming": "2.16.2", - "@videojs/vhs-utils": "^3.0.4", + "@videojs/http-streaming": "3.0.2", + "@videojs/vhs-utils": "^4.0.0", "@videojs/xhr": "2.6.0", - "aes-decrypter": "3.1.3", - "global": "^4.4.0", - "keycode": "^2.2.0", - "m3u8-parser": "4.8.0", - "mpd-parser": "0.22.1", - "mux.js": "6.0.1", + "aes-decrypter": "^4.0.1", + "global": "4.4.0", + "keycode": "2.2.0", + "m3u8-parser": "^6.0.0", + "mpd-parser": "^1.0.1", + "mux.js": "^6.2.0", "safe-json-parse": "4.0.0", - "videojs-font": "3.2.0", - "videojs-vtt.js": "^0.15.4" + "videojs-contrib-quality-levels": "3.0.0", + "videojs-font": "4.1.0", + "videojs-vtt.js": "0.15.4" + } + }, + "node_modules/videojs-contrib-quality-levels": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/videojs-contrib-quality-levels/-/videojs-contrib-quality-levels-3.0.0.tgz", + "integrity": "sha512-sNx38EYUx+Q+gmup1gVTv9P9/sPs28rM7gZOx1sedaHoKxEdYB+ysOGfHj6MSELBMNGMj6ZspdrpSiWguGvGxA==", + "dependencies": { + "global": "^4.4.0" + }, + "engines": { + "node": ">=14", + "npm": ">=6" + }, + "peerDependencies": { + "video.js": "^6 || ^7 || ^8" } }, "node_modules/videojs-font": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/videojs-font/-/videojs-font-3.2.0.tgz", - "integrity": "sha512-g8vHMKK2/JGorSfqAZQUmYYNnXmfec4MLhwtEFS+mMs2IDY398GLysy6BH6K+aS1KMNu/xWZ8Sue/X/mdQPliA==" + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/videojs-font/-/videojs-font-4.1.0.tgz", + "integrity": "sha512-X1LuPfLZPisPLrANIAKCknZbZu5obVM/ylfd1CN+SsCmPZQ3UMDPcvLTpPBJxcBuTpHQq2MO1QCFt7p8spnZ/w==" }, "node_modules/videojs-playlist": { "version": "5.1.0", @@ -9136,21 +9186,6 @@ "node": ">=4.4.0" } }, - "node_modules/videojs-seek-buttons": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/videojs-seek-buttons/-/videojs-seek-buttons-3.0.1.tgz", - "integrity": "sha512-scVWOqCMqHajlbwYZIzJ5nBYkDXTAhEpWjfcdCu8ykksA1barrKnEKdQvS84TtDWOx6UXDD/e/x0acYEZCDMEQ==", - "dependencies": { - "global": "^4.4.0" - }, - "engines": { - "node": ">=14", - "npm": ">=6" - }, - "peerDependencies": { - "video.js": "^6 || ^7" - } - }, "node_modules/videojs-vtt.js": { "version": "0.15.4", "resolved": "https://registry.npmjs.org/videojs-vtt.js/-/videojs-vtt.js-0.15.4.tgz", @@ -10879,12 +10914,6 @@ "@types/jest": "*" } }, - "@types/video.js": { - "version": "7.3.51", - "resolved": "https://registry.npmjs.org/@types/video.js/-/video.js-7.3.51.tgz", - "integrity": "sha512-xLlt/ZfCuWYBvG2MRn018RvaEplcK6dI63aOiVUeeAWFyjx3Br1hL749ndFgbrvNdY4m9FoHG1FQ/PB6IpfSAQ==", - "dev": true - }, "@types/yargs": { "version": "17.0.13", "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.13.tgz", @@ -11267,24 +11296,24 @@ } }, "@videojs/http-streaming": { - "version": "2.16.2", - "resolved": "https://registry.npmjs.org/@videojs/http-streaming/-/http-streaming-2.16.2.tgz", - "integrity": "sha512-etPTUdCFu7gUWc+1XcbiPr+lrhOcBu3rV5OL1M+3PDW89zskScAkkcdqYzP4pFodBPye/ydamQoTDScOnElw5A==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@videojs/http-streaming/-/http-streaming-3.0.2.tgz", + "integrity": "sha512-iSZkwTLGg3Rx78ypCCq/GsMME89ElNvU02xj7reCE2PlITMQjyYsER1w5AsySvT1A694u5yuSzEzLLGF1cL4pg==", "requires": { "@babel/runtime": "^7.12.5", - "@videojs/vhs-utils": "3.0.5", - "aes-decrypter": "3.1.3", + "@videojs/vhs-utils": "4.0.0", + "aes-decrypter": "4.0.1", "global": "^4.4.0", - "m3u8-parser": "4.8.0", - "mpd-parser": "^0.22.1", - "mux.js": "6.0.1", - "video.js": "^6 || ^7" + "m3u8-parser": "^6.0.0", + "mpd-parser": "^1.0.1", + "mux.js": "6.3.0", + "video.js": "^7 || ^8" } }, "@videojs/vhs-utils": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/@videojs/vhs-utils/-/vhs-utils-3.0.5.tgz", - "integrity": "sha512-PKVgdo8/GReqdx512F+ombhS+Bzogiofy1LgAj4tN8PfdBx3HSS7V5WfJotKTqtOWGwVfSWsrYN/t09/DSryrw==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@videojs/vhs-utils/-/vhs-utils-4.0.0.tgz", + "integrity": "sha512-xJp7Yd4jMLwje2vHCUmi8MOUU76nxiwII3z4Eg3Ucb+6rrkFVGosrXlMgGnaLjq724j3wzNElRZ71D/CKrTtxg==", "requires": { "@babel/runtime": "^7.12.5", "global": "^4.4.0", @@ -11446,14 +11475,26 @@ "dev": true }, "aes-decrypter": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/aes-decrypter/-/aes-decrypter-3.1.3.tgz", - "integrity": "sha512-VkG9g4BbhMBy+N5/XodDeV6F02chEk9IpgRTq/0bS80y4dzy79VH2Gtms02VXomf3HmyRe3yyJYkJ990ns+d6A==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/aes-decrypter/-/aes-decrypter-4.0.1.tgz", + "integrity": "sha512-H1nh/P9VZXUf17AA5NQfJML88CFjVBDuGkp5zDHa7oEhYN9TTpNLJknRY1ie0iSKWlDf6JRnJKaZVDSQdPy6Cg==", "requires": { "@babel/runtime": "^7.12.5", "@videojs/vhs-utils": "^3.0.5", "global": "^4.4.0", "pkcs7": "^1.0.4" + }, + "dependencies": { + "@videojs/vhs-utils": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@videojs/vhs-utils/-/vhs-utils-3.0.5.tgz", + "integrity": "sha512-PKVgdo8/GReqdx512F+ombhS+Bzogiofy1LgAj4tN8PfdBx3HSS7V5WfJotKTqtOWGwVfSWsrYN/t09/DSryrw==", + "requires": { + "@babel/runtime": "^7.12.5", + "global": "^4.4.0", + "url-toolkit": "^2.2.1" + } + } } }, "agent-base": { @@ -14431,13 +14472,25 @@ "dev": true }, "m3u8-parser": { - "version": "4.8.0", - "resolved": "https://registry.npmjs.org/m3u8-parser/-/m3u8-parser-4.8.0.tgz", - "integrity": "sha512-UqA2a/Pw3liR6Df3gwxrqghCP17OpPlQj6RBPLYygf/ZSQ4MoSgvdvhvt35qV+3NaaA0FSZx93Ix+2brT1U7cA==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/m3u8-parser/-/m3u8-parser-6.0.0.tgz", + "integrity": "sha512-s3JfDtqhxTilZQf+P1m9dZc4ohL4O/aylP1VV6g9lhKuQNfAcVUzq7d2wgJ9nZR4ibjuXaP87QzGCV6vB0kV6g==", "requires": { "@babel/runtime": "^7.12.5", "@videojs/vhs-utils": "^3.0.5", "global": "^4.4.0" + }, + "dependencies": { + "@videojs/vhs-utils": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@videojs/vhs-utils/-/vhs-utils-3.0.5.tgz", + "integrity": "sha512-PKVgdo8/GReqdx512F+ombhS+Bzogiofy1LgAj4tN8PfdBx3HSS7V5WfJotKTqtOWGwVfSWsrYN/t09/DSryrw==", + "requires": { + "@babel/runtime": "^7.12.5", + "global": "^4.4.0", + "url-toolkit": "^2.2.1" + } + } } }, "magic-string": { @@ -14586,14 +14639,26 @@ } }, "mpd-parser": { - "version": "0.22.1", - "resolved": "https://registry.npmjs.org/mpd-parser/-/mpd-parser-0.22.1.tgz", - "integrity": "sha512-fwBebvpyPUU8bOzvhX0VQZgSohncbgYwUyJJoTSNpmy7ccD2ryiCvM7oRkn/xQH5cv73/xU7rJSNCLjdGFor0Q==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/mpd-parser/-/mpd-parser-1.1.1.tgz", + "integrity": "sha512-uZ/db5wQdlQn1L+OD49YXBhPI9UGeK1SeQE4D5EoaJIhf0WM9X3HDj8d+9PjoG06CgCvGZw3YW/wsHku+CH3yA==", "requires": { "@babel/runtime": "^7.12.5", "@videojs/vhs-utils": "^3.0.5", "@xmldom/xmldom": "^0.8.3", "global": "^4.4.0" + }, + "dependencies": { + "@videojs/vhs-utils": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@videojs/vhs-utils/-/vhs-utils-3.0.5.tgz", + "integrity": "sha512-PKVgdo8/GReqdx512F+ombhS+Bzogiofy1LgAj4tN8PfdBx3HSS7V5WfJotKTqtOWGwVfSWsrYN/t09/DSryrw==", + "requires": { + "@babel/runtime": "^7.12.5", + "global": "^4.4.0", + "url-toolkit": "^2.2.1" + } + } } }, "mrmime": { @@ -14699,9 +14764,9 @@ "dev": true }, "mux.js": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/mux.js/-/mux.js-6.0.1.tgz", - "integrity": "sha512-22CHb59rH8pWGcPGW5Og7JngJ9s+z4XuSlYvnxhLuc58cA1WqGDQPzuG8I+sPm1/p0CdgpzVTaKW408k5DNn8w==", + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/mux.js/-/mux.js-6.3.0.tgz", + "integrity": "sha512-/QTkbSAP2+w1nxV+qTcumSDN5PA98P0tjrADijIzQHe85oBK3Akhy9AHlH0ne/GombLMz1rLyvVsmrgRxoPDrQ==", "requires": { "@babel/runtime": "^7.11.2", "global": "^4.4.0" @@ -16255,29 +16320,38 @@ } }, "video.js": { - "version": "7.21.4", - "resolved": "https://registry.npmjs.org/video.js/-/video.js-7.21.4.tgz", - "integrity": "sha512-R5e57M/5uqxQMQpFpybNbd8GtiRwFJPqkHjrhv0QTJ2tqnesbjETbck5kU5dhFr1FevsJRFhjBG4hAnvRGnXbw==", + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/video.js/-/video.js-8.3.0.tgz", + "integrity": "sha512-Vp3mqMLSUE354t+G8CbZKwcV520VKoS5fow8zjnEEKFuqStmkmnvK7/FurP6zuP/oWGJ1rqlKxML56kmJOrwRw==", "requires": { "@babel/runtime": "^7.12.5", - "@videojs/http-streaming": "2.16.2", - "@videojs/vhs-utils": "^3.0.4", + "@videojs/http-streaming": "3.0.2", + "@videojs/vhs-utils": "^4.0.0", "@videojs/xhr": "2.6.0", - "aes-decrypter": "3.1.3", - "global": "^4.4.0", - "keycode": "^2.2.0", - "m3u8-parser": "4.8.0", - "mpd-parser": "0.22.1", - "mux.js": "6.0.1", + "aes-decrypter": "^4.0.1", + "global": "4.4.0", + "keycode": "2.2.0", + "m3u8-parser": "^6.0.0", + "mpd-parser": "^1.0.1", + "mux.js": "^6.2.0", "safe-json-parse": "4.0.0", - "videojs-font": "3.2.0", - "videojs-vtt.js": "^0.15.4" + "videojs-contrib-quality-levels": "3.0.0", + "videojs-font": "4.1.0", + "videojs-vtt.js": "0.15.4" + } + }, + "videojs-contrib-quality-levels": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/videojs-contrib-quality-levels/-/videojs-contrib-quality-levels-3.0.0.tgz", + "integrity": "sha512-sNx38EYUx+Q+gmup1gVTv9P9/sPs28rM7gZOx1sedaHoKxEdYB+ysOGfHj6MSELBMNGMj6ZspdrpSiWguGvGxA==", + "requires": { + "global": "^4.4.0" } }, "videojs-font": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/videojs-font/-/videojs-font-3.2.0.tgz", - "integrity": "sha512-g8vHMKK2/JGorSfqAZQUmYYNnXmfec4MLhwtEFS+mMs2IDY398GLysy6BH6K+aS1KMNu/xWZ8Sue/X/mdQPliA==" + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/videojs-font/-/videojs-font-4.1.0.tgz", + "integrity": "sha512-X1LuPfLZPisPLrANIAKCknZbZu5obVM/ylfd1CN+SsCmPZQ3UMDPcvLTpPBJxcBuTpHQq2MO1QCFt7p8spnZ/w==" }, "videojs-playlist": { "version": "5.1.0", @@ -16288,14 +16362,6 @@ "video.js": "^6 || ^7 || ^8" } }, - "videojs-seek-buttons": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/videojs-seek-buttons/-/videojs-seek-buttons-3.0.1.tgz", - "integrity": "sha512-scVWOqCMqHajlbwYZIzJ5nBYkDXTAhEpWjfcdCu8ykksA1barrKnEKdQvS84TtDWOx6UXDD/e/x0acYEZCDMEQ==", - "requires": { - "global": "^4.4.0" - } - }, "videojs-vtt.js": { "version": "0.15.4", "resolved": "https://registry.npmjs.org/videojs-vtt.js/-/videojs-vtt.js-0.15.4.tgz", diff --git a/web/package.json b/web/package.json index 2f4ed80b8..91292a6aa 100644 --- a/web/package.json +++ b/web/package.json @@ -26,9 +26,8 @@ "react-dom": "npm:@preact/compat@^17.1.2", "strftime": "^0.10.1", "swr": "^1.3.0", - "video.js": "^7.21.4", + "video.js": "^8.3.0", "videojs-playlist": "^5.1.0", - "videojs-seek-buttons": "^3.0.1", "vite-plugin-monaco-editor": "^1.1.0" }, "devDependencies": { @@ -37,7 +36,6 @@ "@testing-library/jest-dom": "^5.16.5", "@testing-library/preact": "^3.2.3", "@testing-library/user-event": "^14.4.3", - "@types/video.js": "^7.3.51", "@typescript-eslint/eslint-plugin": "^5.58.0", "@typescript-eslint/parser": "^5.58.0", "@vitest/coverage-c8": "^0.30.1", diff --git a/web/src/components/HistoryViewer/HistoryVideo.tsx b/web/src/components/HistoryViewer/HistoryVideo.tsx index 32ed7e6c9..554fb8eb7 100644 --- a/web/src/components/HistoryViewer/HistoryVideo.tsx +++ b/web/src/components/HistoryViewer/HistoryVideo.tsx @@ -3,11 +3,10 @@ import { useCallback, useEffect, useRef, useState } from 'preact/hooks'; import { useApiHost } from '../../api'; import { isNullOrUndefined } from '../../utils/objectUtils'; -import 'videojs-seek-buttons'; import 'video.js/dist/video-js.css'; -import 'videojs-seek-buttons/dist/videojs-seek-buttons.css'; -import videojs, { VideoJsPlayer } from 'video.js'; +import videojs from 'video.js'; +import type Player from 'video.js/dist/types/player'; interface OnTimeUpdateEvent { timestamp: number; @@ -34,10 +33,10 @@ export const HistoryVideo = ({ const apiHost = useApiHost(); const videoRef = useRef(null); - const [video, setVideo] = useState(); + const [video, setVideo] = useState(); useEffect(() => { - let video: VideoJsPlayer + let video: Player if (videoRef.current) { video = videojs(videoRef.current, {}) setVideo(video) @@ -88,7 +87,8 @@ export const HistoryVideo = ({ ); useEffect(() => { - if (video && video.readyState() >= 1) { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + if (video && (video as any).readyState() >= 1) { if (videoIsPlaying) { video.play() } else { @@ -98,7 +98,8 @@ export const HistoryVideo = ({ }, [video, videoIsPlaying]) const onLoad = useCallback(() => { - if (video && video.readyState() >= 1 && videoIsPlaying) { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + if (video && (video as any).readyState() >= 1 && videoIsPlaying) { video.play() } }, [video, videoIsPlaying]) diff --git a/web/src/components/VideoPlayer.jsx b/web/src/components/VideoPlayer.jsx index d05a92df5..ec548eab8 100644 --- a/web/src/components/VideoPlayer.jsx +++ b/web/src/components/VideoPlayer.jsx @@ -2,24 +2,21 @@ import { h } from 'preact'; import { useRef, useEffect } from 'preact/hooks'; import videojs from 'video.js'; import 'videojs-playlist'; -import 'videojs-seek-buttons'; import 'video.js/dist/video-js.css'; -import 'videojs-seek-buttons/dist/videojs-seek-buttons.css'; -export default function VideoPlayer({ children, options, seekOptions = {}, onReady = () => {}, onDispose = () => {} }) { +export default function VideoPlayer({ children, options, seekOptions = {forward:30, backward: 10}, onReady = () => {}, onDispose = () => {} }) { const playerRef = useRef(); useEffect(() => { const defaultOptions = { controls: true, + controlBar: { + skipButtons: seekOptions, + }, playbackRates: [0.5, 1, 2, 4, 8], fluid: true, }; - const defaultSeekOptions = { - forward: 30, - back: 10, - }; if (!videojs.browser.IS_FIREFOX) { defaultOptions.playbackRates.push(16); @@ -28,10 +25,6 @@ export default function VideoPlayer({ children, options, seekOptions = {}, onRea const player = videojs(playerRef.current, { ...defaultOptions, ...options }, () => { onReady(player); }); - player.seekButtons({ - ...defaultSeekOptions, - ...seekOptions, - }); // Allows player to continue on error player.reloadSourceOnError(); diff --git a/web/src/routes/Events.jsx b/web/src/routes/Events.jsx index ec50ca782..25036f505 100644 --- a/web/src/routes/Events.jsx +++ b/web/src/routes/Events.jsx @@ -584,7 +584,7 @@ export default function Events({ path, ...props }) { }, ], }} - seekOptions={{ forward: 10, back: 5 }} + seekOptions={{ forward: 10, backward: 5 }} onReady={() => {}} /> ) : null}