diff --git a/materialious/package-lock.json b/materialious/package-lock.json index ade68fa3..2d321619 100644 --- a/materialious/package-lock.json +++ b/materialious/package-lock.json @@ -1,12 +1,12 @@ { "name": "materialious", - "version": "1.16.1", + "version": "1.16.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "materialious", - "version": "1.16.1", + "version": "1.16.2", "hasInstallScript": true, "dependencies": { "@capacitor-community/electron": "^5.0.1", @@ -21,6 +21,7 @@ "@capacitor/share": "^8.0.0", "@macfja/serializer": "^1.1.4", "@macfja/svelte-persistent-store": "^2.4.2", + "@neodrag/svelte": "^3.0.0-next.8", "altcha": "^2.3.0", "altcha-lib": "^1.4.1", "beercss": "^4.0.2", @@ -3523,6 +3524,23 @@ "node": ">= 10" } }, + "node_modules/@neodrag/core": { + "version": "3.0.0-next.8", + "resolved": "https://registry.npmjs.org/@neodrag/core/-/core-3.0.0-next.8.tgz", + "integrity": "sha512-RNFwbo2w6M7BEzCh7pls68X2h3n+ofFDW1XnGyIzhtJ2bb8J/2VqixOpOlw9NfSJ61xgUC5ymGQbQFg5BKsWBA==", + "license": "MIT", + "peer": true + }, + "node_modules/@neodrag/svelte": { + "version": "3.0.0-next.8", + "resolved": "https://registry.npmjs.org/@neodrag/svelte/-/svelte-3.0.0-next.8.tgz", + "integrity": "sha512-VkTnOqiHpAaEK5jp2PqQPEEx5AaNGVoKeoC2TuWd2xuteGOVq7NqQjNC4sxk0HAVysfYOC9YhYOsVyRiKo2LFw==", + "license": "MIT", + "peerDependencies": { + "@neodrag/core": "3.0.0-next.8", + "svelte": "^3 || ^4 || ^5" + } + }, "node_modules/@noble/hashes": { "version": "1.8.0", "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.8.0.tgz", diff --git a/materialious/package.json b/materialious/package.json index b8072d4b..3cb841f1 100644 --- a/materialious/package.json +++ b/materialious/package.json @@ -57,6 +57,7 @@ "@capacitor/share": "^8.0.0", "@macfja/serializer": "^1.1.4", "@macfja/svelte-persistent-store": "^2.4.2", + "@neodrag/svelte": "^3.0.0-next.8", "altcha": "^2.3.0", "altcha-lib": "^1.4.1", "beercss": "^4.0.2", @@ -96,4 +97,4 @@ "youtubei.js": "^16.0.1", "zod": "^4.3.6" } -} \ No newline at end of file +} diff --git a/materialious/src/lib/components/player/ClosedCaptions.svelte b/materialious/src/lib/components/player/ClosedCaptions.svelte new file mode 100644 index 00000000..8e7cad3d --- /dev/null +++ b/materialious/src/lib/components/player/ClosedCaptions.svelte @@ -0,0 +1,135 @@ + + + + +{#if trackVisible && captionsCues.length > 0} + {@const currentCaption = findElementForTime( + captionsCues, + currentTime, + (cue: VTTCue) => cue.startTime, + (cue: VTTCue) => cue.endTime + )} +
+ {removeTags(currentCaption.text)} +
+ {/if} +