A self-hosted media server and file management system
Vue ffmpegfile-serverjellyfinlaravelmediamedia-playermedia-servermediabrowsermediaservermusicmusic-librarymusic-playermusicplayerself-hostedvuejs
feat: add copy and save video frame options to video context menu
aminnausinb8e3f8d7dbb4
diff --git a/package-lock.json b/package-lock.jsonindex 5f9184e6..6a9d8c73 100755--- a/package-lock.json+++ b/package-lock.json@@ -4,7 +4,6 @@"requires": true,"packages": {"": {- "name": "mediaServer","dependencies": {"@tanstack/vue-query": "^5.77.2","@types/lodash": "^4.17.13",@@ -3073,6 +3072,29 @@}}},+ "node_modules/base64-js": {+ "version": "1.5.1",+ "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",+ "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==",+ "dev": true,+ "funding": [+ {+ "type": "github",+ "url": "https://github.com/sponsors/feross"+ },+ {+ "type": "patreon",+ "url": "https://www.patreon.com/feross"+ },+ {+ "type": "consulting",+ "url": "https://feross.org/support"+ }+ ],+ "license": "MIT",+ "optional": true,+ "peer": true+ },"node_modules/basic-ftp": {"version": "5.0.5","resolved": "https://registry.npmjs.org/basic-ftp/-/basic-ftp-5.0.5.tgz",@@ -3104,6 +3126,20 @@"url": "https://github.com/sponsors/antfu"}},+ "node_modules/bl": {+ "version": "4.1.0",+ "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz",+ "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==",+ "dev": true,+ "license": "MIT",+ "optional": true,+ "peer": true,+ "dependencies": {+ "buffer": "^5.5.0",+ "inherits": "^2.0.4",+ "readable-stream": "^3.4.0"+ }+ },"node_modules/boolbase": {"version": "1.0.0","resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz",@@ -3167,6 +3203,33 @@"node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7"}},+ "node_modules/buffer": {+ "version": "5.7.1",+ "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz",+ "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==",+ "dev": true,+ "funding": [+ {+ "type": "github",+ "url": "https://github.com/sponsors/feross"+ },+ {+ "type": "patreon",+ "url": "https://www.patreon.com/feross"+ },+ {+ "type": "consulting",+ "url": "https://feross.org/support"+ }+ ],+ "license": "MIT",+ "optional": true,+ "peer": true,+ "dependencies": {+ "base64-js": "^1.3.1",+ "ieee754": "^1.1.13"+ }+ },"node_modules/buffer-crc32": {"version": "0.2.13","resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz",@@ -3261,6 +3324,23 @@],"license": "CC-BY-4.0"},+ "node_modules/canvas": {+ "version": "3.1.2",+ "resolved": "https://registry.npmjs.org/canvas/-/canvas-3.1.2.tgz",+ "integrity": "sha512-Z/tzFAcBzoCvJlOSlCnoekh1Gu8YMn0J51+UAuXJAbW1Z6I9l2mZgdD7738MepoeeIcUdDtbMnOg6cC7GJxy/g==",+ "dev": true,+ "hasInstallScript": true,+ "license": "MIT",+ "optional": true,+ "peer": true,+ "dependencies": {+ "node-addon-api": "^7.0.0",+ "prebuild-install": "^7.1.3"+ },+ "engines": {+ "node": "^18.12.0 || >= 20.9.0"+ }+ },"node_modules/chai": {"version": "5.2.0","resolved": "https://registry.npmjs.org/chai/-/chai-5.2.0.tgz",@@ -3368,6 +3448,15 @@"node": ">= 6"}},+ "node_modules/chownr": {+ "version": "1.1.4",+ "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz",+ "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==",+ "dev": true,+ "license": "ISC",+ "optional": true,+ "peer": true+ },"node_modules/chromium-bidi": {"version": "5.1.0","resolved": "https://registry.npmjs.org/chromium-bidi/-/chromium-bidi-5.1.0.tgz",@@ -3865,6 +3954,24 @@"dev": true,"license": "MIT"},+ "node_modules/decompress-response": {+ "version": "6.0.0",+ "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz",+ "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==",+ "dev": true,+ "license": "MIT",+ "optional": true,+ "peer": true,+ "dependencies": {+ "mimic-response": "^3.1.0"+ },+ "engines": {+ "node": ">=10"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },"node_modules/deep-eql": {"version": "5.0.2","resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-5.0.2.tgz",@@ -3875,6 +3982,18 @@"node": ">=6"}},+ "node_modules/deep-extend": {+ "version": "0.6.0",+ "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz",+ "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==",+ "dev": true,+ "license": "MIT",+ "optional": true,+ "peer": true,+ "engines": {+ "node": ">=4.0.0"+ }+ },"node_modules/deep-is": {"version": "0.1.4","resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz",@@ -3925,6 +4044,18 @@],"license": "MIT"},+ "node_modules/detect-libc": {+ "version": "2.0.4",+ "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.4.tgz",+ "integrity": "sha512-3UDv+G9CsCKO1WKMGw9fwq/SWJYbI0c5Y7LU1AXYoDdbhE2AHQ6N6Nb34sG8Fj7T5APy8qXDCKuuIHd1BR0tVA==",+ "dev": true,+ "license": "Apache-2.0",+ "optional": true,+ "peer": true,+ "engines": {+ "node": ">=8"+ }+ },"node_modules/devtools-protocol": {"version": "0.0.1439962","resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1439962.tgz",@@ -4514,6 +4645,18 @@"node": ">=0.10.0"}},+ "node_modules/expand-template": {+ "version": "2.0.3",+ "resolved": "https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz",+ "integrity": "sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==",+ "dev": true,+ "license": "(MIT OR WTFPL)",+ "optional": true,+ "peer": true,+ "engines": {+ "node": ">=6"+ }+ },"node_modules/expect-type": {"version": "1.2.1","resolved": "https://registry.npmjs.org/expect-type/-/expect-type-1.2.1.tgz",@@ -4775,6 +4918,15 @@"url": "https://github.com/sponsors/rawify"}},+ "node_modules/fs-constants": {+ "version": "1.0.0",+ "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz",+ "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==",+ "dev": true,+ "license": "MIT",+ "optional": true,+ "peer": true+ },"node_modules/fs-extra": {"version": "10.1.0","resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz",@@ -4896,6 +5048,15 @@"node": ">= 14"}},+ "node_modules/github-from-package": {+ "version": "0.0.0",+ "resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz",+ "integrity": "sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw==",+ "dev": true,+ "license": "MIT",+ "optional": true,+ "peer": true+ },"node_modules/glob": {"version": "10.4.5","resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz",@@ -5093,6 +5254,29 @@"node": ">=0.10.0"}},+ "node_modules/ieee754": {+ "version": "1.2.1",+ "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz",+ "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==",+ "dev": true,+ "funding": [+ {+ "type": "github",+ "url": "https://github.com/sponsors/feross"+ },+ {+ "type": "patreon",+ "url": "https://www.patreon.com/feross"+ },+ {+ "type": "consulting",+ "url": "https://feross.org/support"+ }+ ],+ "license": "BSD-3-Clause",+ "optional": true,+ "peer": true+ },"node_modules/ignore": {"version": "7.0.4","resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.4.tgz",@@ -5129,6 +5313,24 @@"node": ">=0.8.19"}},+ "node_modules/inherits": {+ "version": "2.0.4",+ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",+ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",+ "dev": true,+ "license": "ISC",+ "optional": true,+ "peer": true+ },+ "node_modules/ini": {+ "version": "1.3.8",+ "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz",+ "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==",+ "dev": true,+ "license": "ISC",+ "optional": true,+ "peer": true+ },"node_modules/ip-address": {"version": "9.0.5","resolved": "https://registry.npmjs.org/ip-address/-/ip-address-9.0.5.tgz",@@ -5758,6 +5960,21 @@"node": ">= 0.6"}},+ "node_modules/mimic-response": {+ "version": "3.1.0",+ "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz",+ "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==",+ "dev": true,+ "license": "MIT",+ "optional": true,+ "peer": true,+ "engines": {+ "node": ">=10"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },"node_modules/mini-svg-data-uri": {"version": "1.4.4","resolved": "https://registry.npmjs.org/mini-svg-data-uri/-/mini-svg-data-uri-1.4.4.tgz",@@ -5784,6 +6001,18 @@"url": "https://github.com/sponsors/isaacs"}},+ "node_modules/minimist": {+ "version": "1.2.8",+ "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz",+ "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==",+ "dev": true,+ "license": "MIT",+ "optional": true,+ "peer": true,+ "funding": {+ "url": "https://github.com/sponsors/ljharb"+ }+ },"node_modules/minipass": {"version": "7.1.2","resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz",@@ -5800,6 +6029,15 @@"integrity": "sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw==","license": "MIT"},+ "node_modules/mkdirp-classic": {+ "version": "0.5.3",+ "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz",+ "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==",+ "dev": true,+ "license": "MIT",+ "optional": true,+ "peer": true+ },"node_modules/mlly": {"version": "1.7.4","resolved": "https://registry.npmjs.org/mlly/-/mlly-1.7.4.tgz",@@ -5856,6 +6094,15 @@"node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"}},+ "node_modules/napi-build-utils": {+ "version": "2.0.0",+ "resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-2.0.0.tgz",+ "integrity": "sha512-GEbrYkbfF7MoNaoh2iGG84Mnf/WZfB0GdGEsM8wz7Expx/LlWf5U8t9nvJKXSp3qr5IsEbK04cBGhol/KwOsWA==",+ "dev": true,+ "license": "MIT",+ "optional": true,+ "peer": true+ },"node_modules/natural-compare": {"version": "1.4.0","resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz",@@ -5872,6 +6119,30 @@"node": ">= 0.4.0"}},+ "node_modules/node-abi": {+ "version": "3.75.0",+ "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.75.0.tgz",+ "integrity": "sha512-OhYaY5sDsIka7H7AtijtI9jwGYLyl29eQn/W623DiN/MIv5sUqc4g7BIDThX+gb7di9f6xK02nkp8sdfFWZLTg==",+ "dev": true,+ "license": "MIT",+ "optional": true,+ "peer": true,+ "dependencies": {+ "semver": "^7.3.5"+ },+ "engines": {+ "node": ">=10"+ }+ },+ "node_modules/node-addon-api": {+ "version": "7.1.1",+ "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-7.1.1.tgz",+ "integrity": "sha512-5m3bsyrjFWE1xf7nz7YXdN4udnVtXK6/Yfgn5qnahL6bCkf2yKt4k3nuTKAtT4r3IG8JNR2ncsIMdZuAzJjHQQ==",+ "dev": true,+ "license": "MIT",+ "optional": true,+ "peer": true+ },"node_modules/node-fetch": {"version": "2.7.0","resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz",@@ -6973,6 +7244,69 @@"dev": true,"license": "MIT"},+ "node_modules/prebuild-install": {+ "version": "7.1.3",+ "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-7.1.3.tgz",+ "integrity": "sha512-8Mf2cbV7x1cXPUILADGI3wuhfqWvtiLA1iclTDbFRZkgRQS0NqsPZphna9V+HyTEadheuPmjaJMsbzKQFOzLug==",+ "dev": true,+ "license": "MIT",+ "optional": true,+ "peer": true,+ "dependencies": {+ "detect-libc": "^2.0.0",+ "expand-template": "^2.0.3",+ "github-from-package": "0.0.0",+ "minimist": "^1.2.3",+ "mkdirp-classic": "^0.5.3",+ "napi-build-utils": "^2.0.0",+ "node-abi": "^3.3.0",+ "pump": "^3.0.0",+ "rc": "^1.2.7",+ "simple-get": "^4.0.0",+ "tar-fs": "^2.0.0",+ "tunnel-agent": "^0.6.0"+ },+ "bin": {+ "prebuild-install": "bin.js"+ },+ "engines": {+ "node": ">=10"+ }+ },+ "node_modules/prebuild-install/node_modules/tar-fs": {+ "version": "2.1.3",+ "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.3.tgz",+ "integrity": "sha512-090nwYJDmlhwFwEW3QQl+vaNnxsO2yVsd45eTKRBzSzu+hlb1w2K9inVq5b0ngXuLVqQ4ApvsUHHnu/zQNkWAg==",+ "dev": true,+ "license": "MIT",+ "optional": true,+ "peer": true,+ "dependencies": {+ "chownr": "^1.1.1",+ "mkdirp-classic": "^0.5.2",+ "pump": "^3.0.0",+ "tar-stream": "^2.1.4"+ }+ },+ "node_modules/prebuild-install/node_modules/tar-stream": {+ "version": "2.2.0",+ "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz",+ "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==",+ "dev": true,+ "license": "MIT",+ "optional": true,+ "peer": true,+ "dependencies": {+ "bl": "^4.0.3",+ "end-of-stream": "^1.4.1",+ "fs-constants": "^1.0.0",+ "inherits": "^2.0.3",+ "readable-stream": "^3.1.1"+ },+ "engines": {+ "node": ">=6"+ }+ },"node_modules/prelude-ls": {"version": "1.2.1","resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz",@@ -7161,6 +7495,36 @@],"license": "MIT"},+ "node_modules/rc": {+ "version": "1.2.8",+ "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz",+ "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==",+ "dev": true,+ "license": "(BSD-2-Clause OR MIT OR Apache-2.0)",+ "optional": true,+ "peer": true,+ "dependencies": {+ "deep-extend": "^0.6.0",+ "ini": "~1.3.0",+ "minimist": "^1.2.0",+ "strip-json-comments": "~2.0.1"+ },+ "bin": {+ "rc": "cli.js"+ }+ },+ "node_modules/rc/node_modules/strip-json-comments": {+ "version": "2.0.1",+ "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz",+ "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==",+ "dev": true,+ "license": "MIT",+ "optional": true,+ "peer": true,+ "engines": {+ "node": ">=0.10.0"+ }+ },"node_modules/read-cache": {"version": "1.0.0","resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz",@@ -7171,6 +7535,23 @@"pify": "^2.3.0"}},+ "node_modules/readable-stream": {+ "version": "3.6.2",+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz",+ "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==",+ "dev": true,+ "license": "MIT",+ "optional": true,+ "peer": true,+ "dependencies": {+ "inherits": "^2.0.3",+ "string_decoder": "^1.1.1",+ "util-deprecate": "^1.0.1"+ },+ "engines": {+ "node": ">= 6"+ }+ },"node_modules/readdirp": {"version": "3.6.0","resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz",@@ -7327,6 +7708,29 @@"tslib": "^2.1.0"}},+ "node_modules/safe-buffer": {+ "version": "5.2.1",+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",+ "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",+ "dev": true,+ "funding": [+ {+ "type": "github",+ "url": "https://github.com/sponsors/feross"+ },+ {+ "type": "patreon",+ "url": "https://www.patreon.com/feross"+ },+ {+ "type": "consulting",+ "url": "https://feross.org/support"+ }+ ],+ "license": "MIT",+ "optional": true,+ "peer": true+ },"node_modules/safer-buffer": {"version": "2.1.2","resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",@@ -7415,6 +7819,57 @@"url": "https://github.com/sponsors/isaacs"}},+ "node_modules/simple-concat": {+ "version": "1.0.1",+ "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz",+ "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==",+ "dev": true,+ "funding": [+ {+ "type": "github",+ "url": "https://github.com/sponsors/feross"+ },+ {+ "type": "patreon",+ "url": "https://www.patreon.com/feross"+ },+ {+ "type": "consulting",+ "url": "https://feross.org/support"+ }+ ],+ "license": "MIT",+ "optional": true,+ "peer": true+ },+ "node_modules/simple-get": {+ "version": "4.0.1",+ "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-4.0.1.tgz",+ "integrity": "sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA==",+ "dev": true,+ "funding": [+ {+ "type": "github",+ "url": "https://github.com/sponsors/feross"+ },+ {+ "type": "patreon",+ "url": "https://www.patreon.com/feross"+ },+ {+ "type": "consulting",+ "url": "https://feross.org/support"+ }+ ],+ "license": "MIT",+ "optional": true,+ "peer": true,+ "dependencies": {+ "decompress-response": "^6.0.0",+ "once": "^1.3.1",+ "simple-concat": "^1.0.0"+ }+ },"node_modules/smart-buffer": {"version": "4.2.0","resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz",@@ -7527,6 +7982,18 @@"bare-events": "^2.2.0"}},+ "node_modules/string_decoder": {+ "version": "1.3.0",+ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz",+ "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==",+ "dev": true,+ "license": "MIT",+ "optional": true,+ "peer": true,+ "dependencies": {+ "safe-buffer": "~5.2.0"+ }+ },"node_modules/string-width": {"version": "5.1.2","resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz",@@ -8158,6 +8625,21 @@"integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==","license": "0BSD"},+ "node_modules/tunnel-agent": {+ "version": "0.6.0",+ "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz",+ "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==",+ "dev": true,+ "license": "Apache-2.0",+ "optional": true,+ "peer": true,+ "dependencies": {+ "safe-buffer": "^5.0.1"+ },+ "engines": {+ "node": "*"+ }+ },"node_modules/tweetnacl": {"version": "1.0.3","resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-1.0.3.tgz",diff --git a/resources/js/components/video/VideoPlayer.vue b/resources/js/components/video/VideoPlayer.vueindex 589abe2e..eb26b3c2 100755--- a/resources/js/components/video/VideoPlayer.vue+++ b/resources/js/components/video/VideoPlayer.vue@@ -5,6 +5,7 @@ import type { ComputedRef, Ref } from 'vue';import { getScreenSize, handleStorageURL, isInputLikeElement, isMobileDevice, toFormattedDate, toFormattedDuration } from '@/service/util';import { computed, nextTick, onBeforeUnmount, onMounted, ref, useTemplateRef, watch } from 'vue';+import { copyVideoFrame, saveVideoFrame } from '@/service/video/frameService';import { debounce, round, throttle } from 'lodash';import { useRoute, useRouter } from 'vue-router';import { UseCreatePlayback } from '@/service/mutations';@@ -15,6 +16,7 @@ import { useAppStore } from '@/stores/AppStore';import { storeToRefs } from 'pinia';import { getMediaUrl } from '@/service/api';import { MediaType } from '@/types/types';+import { onSeek } from '@/service/video/seekBus';import { toast } from '@/service/toaster/toastService';import VideoPopoverSlider from '@/components/video/VideoPopoverSlider.vue';@@ -50,7 +52,6 @@ import ProiconsCancel from '~icons/proicons/cancel';import ProiconsPlay from '~icons/proicons/play';import MagePlaylist from '~icons/mage/playlist';import CircumTimer from '~icons/circum/timer';-import { onSeek } from '@/service/video/seekBus';/*** Z Index Layout:@@ -209,6 +210,22 @@ const contextMenuItems = computed(() => {isShowingParty.value = !isShowingParty.value;},},+ {+ text: 'Save Frame',+ hidden: isAudio.value,+ action: () => {+ if (!player.value) return;+ saveVideoFrame(player.value);+ },+ },+ {+ text: 'Copy Frame',+ hidden: isAudio.value,+ action: () => {+ if (!player.value) return;+ copyVideoFrame(player.value);+ },+ },];return items;});diff --git a/resources/js/service/video/frameService.test.ts b/resources/js/service/video/frameService.test.tsnew file mode 100644index 00000000..bb0c6f25--- /dev/null+++ b/resources/js/service/video/frameService.test.ts@@ -0,0 +1,137 @@+import { describe, it, vi, expect, beforeEach, afterEach } from 'vitest';+import { saveVideoFrame, copyVideoFrame } from './frameService';+import { toast } from '../toaster/toastService';++vi.mock('../toaster/toastService', () => ({+ toast: {+ success: vi.fn(),+ error: vi.fn(),+ },+}));++function createMockVideo({ width = 1280, height = 720, currentTime = 12.34 } = {}): HTMLVideoElement {+ return {+ videoWidth: width,+ videoHeight: height,+ currentTime,+ } as HTMLVideoElement;+}++function setupCanvasMock() {+ vi.spyOn(HTMLCanvasElement.prototype, 'getContext').mockImplementation(() => {+ return {+ drawImage: vi.fn(),+ } as unknown as CanvasRenderingContext2D;+ });++ vi.spyOn(HTMLCanvasElement.prototype, 'toBlob').mockImplementation(function (cb) {+ cb?.(new Blob(['mock'], { type: 'image/png' }));+ });+}++describe('frameService', () => {+ beforeEach(() => {+ vi.resetAllMocks();+ vi.mock('canvas', () => ({}));++ setupCanvasMock();++ globalThis.ClipboardItem ??= class ClipboardItem {+ static supports(type: string): boolean {+ return type === 'image/png';+ }++ constructor(public items: Record<string, Blob>) {}+ } as unknown as typeof ClipboardItem;+ globalThis.URL.createObjectURL ??= vi.fn(() => 'blob:mock-url');+ globalThis.URL.revokeObjectURL ??= vi.fn();+ });++ describe('saveVideoFrame', () => {+ it('saves the frame and shows a success toast', async () => {+ const aClick = vi.fn();+ const mockAnchor = {+ click: aClick,+ set href(_: any) {},+ set download(_: any) {},+ };++ const video = createMockVideo();+ await saveVideoFrame(video);++ expect(toast.success).toHaveBeenCalledWith('Frame saved');+ });++ it('shows error if frame generation fails', async () => {+ vi.spyOn(HTMLCanvasElement.prototype, 'toBlob').mockImplementation((cb) => cb?.(null));++ const video = createMockVideo();+ await saveVideoFrame(video);++ expect(toast.error).toHaveBeenCalledWith('Capture failed', {+ description: 'Failed to generate frame.',+ });+ });+ });++ describe('copyVideoFrame', () => {+ it('copies the frame and shows a success toast', async () => {+ const writeMock = vi.fn().mockResolvedValue(undefined);+ Object.assign(navigator, {+ clipboard: {+ write: writeMock,+ },+ });++ const video = createMockVideo();+ await copyVideoFrame(video);++ expect(writeMock).toHaveBeenCalled();+ expect(toast.success).toHaveBeenCalledWith('Frame copied');+ });++ it('shows error if clipboard write fails', async () => {+ const writeMock = vi.fn().mockRejectedValue(new Error('Clipboard fail'));+ Object.assign(navigator, {+ clipboard: {+ write: writeMock,+ },+ });++ const video = createMockVideo();+ await copyVideoFrame(video);++ expect(toast.error).toHaveBeenCalledWith('Copy failed', {+ description: 'Unable to write to clipboard. Clipboard permissions require a secure HTTPS context.',+ });+ });+ });++ describe('getVideoFrame', () => {+ it('shows error if video is not ready', async () => {+ const video = createMockVideo({ width: 0, height: 0 });+ await saveVideoFrame(video);+ expect(toast.error).toHaveBeenCalledWith('Capture failed', {+ description: 'Wait for the video to load metadata before capturing a frame.',+ });+ });++ it('shows error if getContext returns null', async () => {+ vi.spyOn(document, 'createElement').mockImplementation((tag) => {+ if (tag === 'canvas') {+ return {+ getContext: () => null,+ } as unknown as HTMLCanvasElement;+ }+ return document.createElement(tag);+ });++ const video = createMockVideo();+ await saveVideoFrame(video);++ expect(toast.error).toHaveBeenCalledWith('Capture failed', {+ description: 'Failed to get video information.',+ });+ });+ });+});diff --git a/resources/js/service/video/frameService.ts b/resources/js/service/video/frameService.tsnew file mode 100644index 00000000..ef4dfbc0--- /dev/null+++ b/resources/js/service/video/frameService.ts@@ -0,0 +1,68 @@+import { toast } from '../toaster/toastService';++export async function saveVideoFrame(video: HTMLVideoElement) {+ const blob = await getVideoFrame(video);++ if (!blob) {+ return;+ }++ const url = URL.createObjectURL(blob);+ const a = document.createElement('a');++ a.href = url;+ a.download = `frame-${video.currentTime.toFixed(2)}s.png`;++ try {+ a.click();+ toast.success('Frame saved');+ } finally {+ URL.revokeObjectURL(url);+ }+}++export async function copyVideoFrame(video: HTMLVideoElement) {+ const blob = await getVideoFrame(video);++ if (!blob) {+ return;+ }++ try {+ await navigator.clipboard.write([new ClipboardItem({ 'image/png': blob })]);+ toast.success('Frame copied');+ } catch (err) {+ toast.error('Copy failed', { description: 'Unable to write to clipboard. Clipboard permissions require a secure HTTPS context.' });+ console.error('Clipboard write failed', err);+ }+}++async function getVideoFrame(video: HTMLVideoElement): Promise<Blob | null> {+ const canvas = document.createElement('canvas');++ if (!video.videoWidth || !video.videoHeight) {+ toast.error('Capture failed', { description: 'Wait for the video to load metadata before capturing a frame.' });+ return null;+ }++ canvas.width = video.videoWidth;+ canvas.height = video.videoHeight;++ const ctx = canvas.getContext('2d');++ if (!ctx) {+ toast.error('Capture failed', { description: 'Failed to get video information.' });+ return null;+ }++ ctx.drawImage(video, 0, 0, canvas.width, canvas.height);++ const blob = await new Promise<Blob | null>((resolve) => canvas.toBlob((b) => resolve(b), 'image/png'));++ if (!blob) {+ toast.error('Capture failed', { description: 'Failed to generate frame.' });+ return null;+ }++ return blob;+}