Fix video player subtitle support

This commit is contained in:
DrMint 2024-04-11 07:36:54 +02:00
parent c31e96ee86
commit 5d11d6fdc6
3 changed files with 14 additions and 15 deletions

22
package-lock.json generated
View File

@ -13,7 +13,7 @@
"@fontsource-variable/murecho": "^5.0.18", "@fontsource-variable/murecho": "^5.0.18",
"@fontsource-variable/vollkorn": "^5.0.20", "@fontsource-variable/vollkorn": "^5.0.20",
"accept-language": "^3.0.18", "accept-language": "^3.0.18",
"astro": "4.5.16", "astro": "4.5.18",
"astro-icon": "^1.1.0", "astro-icon": "^1.1.0",
"node-cache": "^5.1.2", "node-cache": "^5.1.2",
"tippy.js": "^6.3.7", "tippy.js": "^6.3.7",
@ -29,7 +29,7 @@
"postcss-preset-env": "^9.5.4", "postcss-preset-env": "^9.5.4",
"prettier": "^3.2.5", "prettier": "^3.2.5",
"prettier-plugin-astro": "^0.13.0", "prettier-plugin-astro": "^0.13.0",
"typescript": "^5.4.4" "typescript": "^5.4.5"
}, },
"engines": { "engines": {
"node": ">=19.7.0", "node": ">=19.7.0",
@ -3211,9 +3211,9 @@
} }
}, },
"node_modules/astro": { "node_modules/astro": {
"version": "4.5.16", "version": "4.5.18",
"resolved": "https://registry.npmjs.org/astro/-/astro-4.5.16.tgz", "resolved": "https://registry.npmjs.org/astro/-/astro-4.5.18.tgz",
"integrity": "sha512-1nOVsMq2OJiXnG6gO0Y77vTAboGN9nLQSy/8SGazq4h6x+alzbsMbQbArBgvaLzOSUXD0m91XLs3D8bOSuavrQ==", "integrity": "sha512-iytLnUfyUneKMjIQdj79zzniByXtcmGNDobIV/gjGsatC9vAyPqeCT8TbMqfkRBMeYGs+S/wCzSoPqaaMJiQnw==",
"dependencies": { "dependencies": {
"@astrojs/compiler": "^2.7.1", "@astrojs/compiler": "^2.7.1",
"@astrojs/internal-helpers": "0.4.0", "@astrojs/internal-helpers": "0.4.0",
@ -11351,9 +11351,9 @@
} }
}, },
"node_modules/tar": { "node_modules/tar": {
"version": "6.2.0", "version": "6.2.1",
"resolved": "https://registry.npmjs.org/tar/-/tar-6.2.0.tgz", "resolved": "https://registry.npmjs.org/tar/-/tar-6.2.1.tgz",
"integrity": "sha512-/Wo7DcT0u5HUV486xg675HtjNd3BXZ6xDbzsCUZPt5iw8bTQ63bP0Raut3mvro9u+CUyq7YQd8Cx55fsZXxqLQ==", "integrity": "sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==",
"dependencies": { "dependencies": {
"chownr": "^2.0.0", "chownr": "^2.0.0",
"fs-minipass": "^2.0.0", "fs-minipass": "^2.0.0",
@ -11550,9 +11550,9 @@
"integrity": "sha512-OJabfkAg1WLZSqJAJ0Z6Sdt3utnbzr/jh+NAHoyWHJe8CMSy79Gm085094M9nvTPy22KzTVn5Zq5mbapCI/hPA==" "integrity": "sha512-OJabfkAg1WLZSqJAJ0Z6Sdt3utnbzr/jh+NAHoyWHJe8CMSy79Gm085094M9nvTPy22KzTVn5Zq5mbapCI/hPA=="
}, },
"node_modules/typescript": { "node_modules/typescript": {
"version": "5.4.4", "version": "5.4.5",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.4.tgz", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz",
"integrity": "sha512-dGE2Vv8cpVvw28v8HCPqyb08EzbBURxDpuhJvTrusShUfGnhHBafDsLdS1EhhxyL6BJQE+2cT3dDPAv+MQ6oLw==", "integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==",
"bin": { "bin": {
"tsc": "bin/tsc", "tsc": "bin/tsc",
"tsserver": "bin/tsserver" "tsserver": "bin/tsserver"

View File

@ -1,6 +1,5 @@
{ {
"name": "v3.accords-library.com", "name": "v3.accords-library.com",
"type": "module",
"version": "0.0.1", "version": "0.0.1",
"scripts": { "scripts": {
"dev": "astro dev", "dev": "astro dev",
@ -25,7 +24,7 @@
"@fontsource-variable/murecho": "^5.0.18", "@fontsource-variable/murecho": "^5.0.18",
"@fontsource-variable/vollkorn": "^5.0.20", "@fontsource-variable/vollkorn": "^5.0.20",
"accept-language": "^3.0.18", "accept-language": "^3.0.18",
"astro": "4.5.16", "astro": "4.5.18",
"astro-icon": "^1.1.0", "astro-icon": "^1.1.0",
"node-cache": "^5.1.2", "node-cache": "^5.1.2",
"tippy.js": "^6.3.7", "tippy.js": "^6.3.7",
@ -41,6 +40,6 @@
"postcss-preset-env": "^9.5.4", "postcss-preset-env": "^9.5.4",
"prettier": "^3.2.5", "prettier": "^3.2.5",
"prettier-plugin-astro": "^0.13.0", "prettier-plugin-astro": "^0.13.0",
"typescript": "^5.4.4" "typescript": "^5.4.5"
} }
} }

View File

@ -13,7 +13,7 @@ const {
{/* ------------------------------------------- HTML ------------------------------------------- */} {/* ------------------------------------------- HTML ------------------------------------------- */}
<video controls poster={thumbnail?.url}> <video controls poster={thumbnail?.url} crossorigin="anonymous">
<source src={url} type={mimeType} /> <source src={url} type={mimeType} />
{ {
subtitles.map(({ language, url }) => ( subtitles.map(({ language, url }) => (