From 969160e751d8d44c7206316ca82263b3e76a3c0c Mon Sep 17 00:00:00 2001 From: Scott Tolinski Date: Mon, 8 Jul 2024 18:58:39 +0200 Subject: [PATCH] Where I Left Off / State Restor (#1731) * major re-work of audio player * removes current_time from player state. saves a ton of updating * gets local saving working * removes log * removes unessary await on state creation * fixes ts errors and comments out hotkeys compoennt * uses existing tsToS fn and remvoes src attr * changes playback position to timeupdate event * updates to use onended to reset state to 0 --- package.json | 6 +- pnpm-lock.yaml | 258 ++++++++++---- src/lib/hotkeys/Hotkeys.svelte | 8 +- src/lib/player/AlbumArt.svelte | 66 ++-- src/lib/player/Bookmarks.svelte | 81 ----- src/lib/player/Player.svelte | 21 +- src/lib/transcript/Transcript.svelte | 17 +- src/routes/(site)/+layout.svelte | 7 +- .../show/[show_number]/[slug]/+layout.svelte | 13 +- src/routes/+error.svelte | 6 +- src/routes/+layout.server.ts | 13 + src/state/player.ts | 324 +++++++++++------- src/state/player_utils.ts | 50 +++ src/state/player_window_status.ts | 2 +- 14 files changed, 532 insertions(+), 340 deletions(-) delete mode 100644 src/lib/player/Bookmarks.svelte create mode 100644 src/state/player_utils.ts diff --git a/package.json b/package.json index 5ee351d6c..4648e4b0b 100644 --- a/package.json +++ b/package.json @@ -26,9 +26,9 @@ "postinstall": "pnpm db:generate && pnpm exec playwright install" }, "devDependencies": { - "@codecov/sveltekit-plugin": "0.0.1-beta.9", + "@codecov/sveltekit-plugin": "0.0.1-beta.10", "@playwright/test": "^1.45.0", - "@sveltejs/kit": "^2.5.17", + "@sveltejs/kit": "^2.5.18", "@sveltejs/vite-plugin-svelte": "^3.1.1", "@types/chroma-js": "^2.4.4", "@types/js-cookie": "^3.0.6", @@ -97,7 +97,7 @@ "remark-heading-id": "^1.0.1", "remark-parse": "^11.0.0", "remark-rehype": "^11.1.0", - "sk-form-data": "^1.0.1", + "sk-form-data": "^2.0.2", "speakingurl": "^14.0.1", "svelte-french-toast": "1.2.0", "svelte-local-storage-store": "^0.6.4", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e51adef4c..f9b0ba75e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -34,7 +34,7 @@ importers: version: 7.118.0 '@sentry/sveltekit': specifier: ^7.118.0 - version: 7.118.0(@sveltejs/kit@2.5.17(@sveltejs/vite-plugin-svelte@3.1.1(svelte@4.2.18)(vite@5.3.2(@types/node@20.14.9)))(svelte@4.2.18)(vite@5.3.2(@types/node@20.14.9)))(svelte@4.2.18) + version: 7.118.0(@sveltejs/kit@2.5.18(@sveltejs/vite-plugin-svelte@3.1.1(svelte@4.2.18)(vite@5.3.2(@types/node@20.14.9)))(svelte@4.2.18)(vite@5.3.2(@types/node@20.14.9)))(svelte@4.2.18) '@sparticuz/chromium': specifier: ^122.0.0 version: 122.0.0 @@ -43,7 +43,7 @@ importers: version: 3.1.1(svelte@4.2.18) '@sveltejs/adapter-vercel': specifier: ^5.3.2 - version: 5.3.2(@sveltejs/kit@2.5.17(@sveltejs/vite-plugin-svelte@3.1.1(svelte@4.2.18)(vite@5.3.2(@types/node@20.14.9)))(svelte@4.2.18)(vite@5.3.2(@types/node@20.14.9))) + version: 5.3.2(@sveltejs/kit@2.5.18(@sveltejs/vite-plugin-svelte@3.1.1(svelte@4.2.18)(vite@5.3.2(@types/node@20.14.9)))(svelte@4.2.18)(vite@5.3.2(@types/node@20.14.9))) '@types/core-js': specifier: ^2.5.8 version: 2.5.8 @@ -114,8 +114,8 @@ importers: specifier: ^11.1.0 version: 11.1.0 sk-form-data: - specifier: ^1.0.1 - version: 1.0.1 + specifier: ^2.0.2 + version: 2.0.2 speakingurl: specifier: ^14.0.1 version: 14.0.1 @@ -127,7 +127,7 @@ importers: version: 0.6.4(svelte@4.2.18) sveltekit-search-params: specifier: ^2.1.2 - version: 2.1.2(@sveltejs/kit@2.5.17(@sveltejs/vite-plugin-svelte@3.1.1(svelte@4.2.18)(vite@5.3.2(@types/node@20.14.9)))(svelte@4.2.18)(vite@5.3.2(@types/node@20.14.9)))(svelte@4.2.18)(vite@5.3.2(@types/node@20.14.9)) + version: 2.1.2(@sveltejs/kit@2.5.18(@sveltejs/vite-plugin-svelte@3.1.1(svelte@4.2.18)(vite@5.3.2(@types/node@20.14.9)))(svelte@4.2.18)(vite@5.3.2(@types/node@20.14.9)))(svelte@4.2.18)(vite@5.3.2(@types/node@20.14.9)) ts-node: specifier: ^10.9.2 version: 10.9.2(@types/node@20.14.9)(typescript@5.5.2) @@ -145,14 +145,14 @@ importers: version: 7.2.3 devDependencies: '@codecov/sveltekit-plugin': - specifier: 0.0.1-beta.9 - version: 0.0.1-beta.9(@sveltejs/kit@2.5.17(@sveltejs/vite-plugin-svelte@3.1.1(svelte@4.2.18)(vite@5.3.2(@types/node@20.14.9)))(svelte@4.2.18)(vite@5.3.2(@types/node@20.14.9)))(svelte@4.2.18)(vite@5.3.2(@types/node@20.14.9)) + specifier: 0.0.1-beta.10 + version: 0.0.1-beta.10(@sveltejs/kit@2.5.18(@sveltejs/vite-plugin-svelte@3.1.1(svelte@4.2.18)(vite@5.3.2(@types/node@20.14.9)))(svelte@4.2.18)(vite@5.3.2(@types/node@20.14.9)))(svelte@4.2.18)(vite@5.3.2(@types/node@20.14.9)) '@playwright/test': specifier: ^1.45.0 version: 1.45.0 '@sveltejs/kit': - specifier: ^2.5.17 - version: 2.5.17(@sveltejs/vite-plugin-svelte@3.1.1(svelte@4.2.18)(vite@5.3.2(@types/node@20.14.9)))(svelte@4.2.18)(vite@5.3.2(@types/node@20.14.9)) + specifier: ^2.5.18 + version: 2.5.18(@sveltejs/vite-plugin-svelte@3.1.1(svelte@4.2.18)(vite@5.3.2(@types/node@20.14.9)))(svelte@4.2.18)(vite@5.3.2(@types/node@20.14.9)) '@sveltejs/vite-plugin-svelte': specifier: ^3.1.1 version: 3.1.1(svelte@4.2.18)(vite@5.3.2(@types/node@20.14.9)) @@ -258,27 +258,27 @@ packages: engines: {node: '>=6.0.0'} hasBin: true - '@babel/runtime@7.23.1': - resolution: {integrity: sha512-hC2v6p8ZSI/W0HUzh3V8C5g+NwSKzKPtJwSpTjwl0o297GP9+ZLQSkdvHz46CM3LqyoXxq+5G9komY+eSqSO0g==} + '@babel/runtime@7.24.7': + resolution: {integrity: sha512-UwgBRMjJP+xv857DCngvqXI3Iq6J4v0wXmwc6sapg+zyhbwmQX67LUEFrkK5tbyJ30jGuG3ZvWpBiB9LCy1kWw==} engines: {node: '>=6.9.0'} '@babel/types@7.24.0': resolution: {integrity: sha512-+j7a5c253RfKh8iABBhywc8NSfP5LURe7Uh4qpsh6jc+aLJguvmIUBdjSdEMQv2bENrCR5MfRdjGo7vzS/ob7w==} engines: {node: '>=6.9.0'} - '@codecov/bundler-plugin-core@0.0.1-beta.9': - resolution: {integrity: sha512-zxMpUhhplvjuwNVmLtOi64d7LGPAhoLsQwVky9Rkx8oRHaDKqDvuisrs+NP5mIE9tQYPnGZKgiv0gnEJ3AHULw==} + '@codecov/bundler-plugin-core@0.0.1-beta.10': + resolution: {integrity: sha512-fOgy02gc0Z0ipKVe8QqN7mcmzQYjHb2UzT6RtHR+tqyYwpe1r1Kg5E/pbIOXKLaJGXK+AaOX23qtgp6kvUn+iA==} engines: {node: '>=18.0.0'} - '@codecov/sveltekit-plugin@0.0.1-beta.9': - resolution: {integrity: sha512-wAp1IenXKNfFGrnsfts1xRRANMfoDUrXA2JgJmHu52Uj0ZAKKBqxWlByVvji7cBEYSI9GYoYfQsC4C7iHDPfkg==} + '@codecov/sveltekit-plugin@0.0.1-beta.10': + resolution: {integrity: sha512-7yDzkCDKP9YKALuEW0WeUJM9eid53Y8Lvm9VKtldKPNBC8UeBbre86sixKK1D55LOoEt5piK040URWywWKzNsg==} engines: {node: '>=18.0.0'} peerDependencies: '@sveltejs/kit': 2.x svelte: 4.x - '@codecov/vite-plugin@0.0.1-beta.9': - resolution: {integrity: sha512-SbJagAnmiFb1YRdTjDOt5fisc7GTRLPJIbth/rvSFIuX9HZLM0Effb/XniLBQrD/IL5znL/7e75Lhcez2ryKnA==} + '@codecov/vite-plugin@0.0.1-beta.10': + resolution: {integrity: sha512-ZoNKEGTMUIwQbwjxu/YUMaGlBUw24c2rZG0E0Lsa2SjZ+DBL+yTe2Kz+7vB6rzW+2Y/EpxxqVWCVjjK03Z7l1w==} engines: {node: '>=18.0.0'} peerDependencies: vite: 4.x || 5.x @@ -1162,8 +1162,8 @@ packages: peerDependencies: '@sveltejs/kit': ^2.4.0 - '@sveltejs/kit@2.5.17': - resolution: {integrity: sha512-wiADwq7VreR3ctOyxilAZOfPz3Jiy2IIp2C8gfafhTdQaVuGIHllfqQm8dXZKADymKr3uShxzgLZFT+a+CM4kA==} + '@sveltejs/kit@2.5.18': + resolution: {integrity: sha512-+g06hvpVAnH7b4CDjhnTDgFWBKBiQJpuSmQeGYOuzbO3SC3tdYjRNlDCrafvDtKbGiT2uxY5Dn9qdEUGVZdWOQ==} engines: {node: '>=18.13'} hasBin: true peerDependencies: @@ -1398,6 +1398,11 @@ packages: engines: {node: '>=0.4.0'} hasBin: true + acorn@8.12.1: + resolution: {integrity: sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==} + engines: {node: '>=0.4.0'} + hasBin: true + agent-base@6.0.2: resolution: {integrity: sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==} engines: {node: '>= 6.0.0'} @@ -1492,6 +1497,10 @@ packages: resolution: {integrity: sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==} engines: {node: '>= 0.4'} + available-typed-arrays@1.0.7: + resolution: {integrity: sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==} + engines: {node: '>= 0.4'} + axios@0.26.1: resolution: {integrity: sha512-fPwcX4EvnSHuInCMItEhAGnaSEXRBjtzh9fOtsE6E1G6p7vl7edEeZe11QHf18+6+9gR5PbKV/sGKNaD8YaMeA==} @@ -1571,6 +1580,10 @@ packages: call-bind@1.0.5: resolution: {integrity: sha512-C3nQxfFZxFRVoJoGKKI8y3MOEo129NQ+FgQ08iye+Mk4zNZZGdjfs06bVTr+DBSlA66Q2VEcMki/cUCP4SercQ==} + call-bind@1.0.7: + resolution: {integrity: sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==} + engines: {node: '>= 0.4'} + callsites@3.1.0: resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} engines: {node: '>=6'} @@ -1779,6 +1792,10 @@ packages: resolution: {integrity: sha512-E7uGkTzkk1d0ByLeSc6ZsFS79Axg+m1P/VsgYsxHgiuc3tFSj+MjMIwe90FC4lOAZzNBdY7kkO2P2wKdsQ1vgQ==} engines: {node: '>= 0.4'} + define-data-property@1.1.4: + resolution: {integrity: sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==} + engines: {node: '>= 0.4'} + define-properties@1.2.1: resolution: {integrity: sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==} engines: {node: '>= 0.4'} @@ -1870,6 +1887,14 @@ packages: resolution: {integrity: sha512-eiiY8HQeYfYH2Con2berK+To6GrK2RxbPawDkGq4UiCQQfZHb6wX9qQqkbpPqaxQFcl8d9QzZqo0tGE0VcrdwA==} engines: {node: '>= 0.4'} + es-define-property@1.0.0: + resolution: {integrity: sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==} + engines: {node: '>= 0.4'} + + es-errors@1.3.0: + resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==} + engines: {node: '>= 0.4'} + es-set-tostringtag@2.0.2: resolution: {integrity: sha512-BuDyupZt65P9D2D2vA/zqcI3G5xRsklm5N3xCwuiy+/vKy8i0ifdsQP1sLgO4tZDSCaQUSnmC48khknGMV3D2Q==} engines: {node: '>= 0.4'} @@ -2149,6 +2174,10 @@ packages: get-intrinsic@1.2.2: resolution: {integrity: sha512-0gSo4ml/0j98Y3lngkFEot/zhiCeWsbYIlZ+uZOVgzLyLaUw7wxUL+nCTP0XJvJg1AXulJRI3UJi8GsbDuxdGA==} + get-intrinsic@1.2.4: + resolution: {integrity: sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==} + engines: {node: '>= 0.4'} + get-stream@5.2.0: resolution: {integrity: sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==} engines: {node: '>=8'} @@ -2232,10 +2261,17 @@ packages: has-property-descriptors@1.0.1: resolution: {integrity: sha512-VsX8eaIewvas0xnvinAe9bw4WfIeODpGYikiWYLH+dma0Jw6KHYqWiWfhQlgOVK8D6PvjubK5Uc4P0iIhIcNVg==} + has-property-descriptors@1.0.2: + resolution: {integrity: sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==} + has-proto@1.0.1: resolution: {integrity: sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==} engines: {node: '>= 0.4'} + has-proto@1.0.3: + resolution: {integrity: sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==} + engines: {node: '>= 0.4'} + has-symbols@1.0.3: resolution: {integrity: sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==} engines: {node: '>= 0.4'} @@ -2244,6 +2280,10 @@ packages: resolution: {integrity: sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==} engines: {node: '>= 0.4'} + has-tostringtag@1.0.2: + resolution: {integrity: sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==} + engines: {node: '>= 0.4'} + has-unicode@2.0.1: resolution: {integrity: sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==} @@ -2463,6 +2503,10 @@ packages: resolution: {integrity: sha512-Z14TF2JNG8Lss5/HMqt0//T9JeHXttXy5pH/DBU4vi98ozO2btxzq9MwYDZYnKwU8nRsz/+GVFVRDq3DkVuSPg==} engines: {node: '>= 0.4'} + is-typed-array@1.1.13: + resolution: {integrity: sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw==} + engines: {node: '>= 0.4'} + is-weakref@1.0.2: resolution: {integrity: sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==} @@ -3078,6 +3122,10 @@ packages: engines: {node: '>=18'} hasBin: true + possible-typed-array-names@1.0.0: + resolution: {integrity: sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==} + engines: {node: '>= 0.4'} + postcss-attribute-case-insensitive@6.0.3: resolution: {integrity: sha512-KHkmCILThWBRtg+Jn1owTnHPnFit4OkqS+eKiGEOPIGke54DCeYGJ6r0Fx/HjfE9M9kznApCLcU0DvnPchazMQ==} engines: {node: ^14 || ^16 || >=18} @@ -3378,8 +3426,8 @@ packages: resolution: {integrity: sha512-9FHoNjX1yjuesMwuthAmPKabxYQdOgihFYmT5ebXfYGBcnqXZf3WOVz+5foEZ8Y83P4ZY6yQD5GMmtV+pgCCAQ==} engines: {node: '>= 4'} - regenerator-runtime@0.14.0: - resolution: {integrity: sha512-srw17NI0TUWHuGa5CFGGmhfNIeja30WMBfbslPNhf6JrqQlLN5gcrvig1oqPxiVaXb0oW0XRKtH6Nngs5lKCIA==} + regenerator-runtime@0.14.1: + resolution: {integrity: sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==} regexp.prototype.flags@1.5.1: resolution: {integrity: sha512-sy6TXMN+hnP/wMy+ISxg3krXx7BAtWVO4UouuCN/ziM9UEne0euamVNafDfvC83bRNr95y0V5iijeDQFUNpvrg==} @@ -3502,6 +3550,10 @@ packages: resolution: {integrity: sha512-VoaqjbBJKiWtg4yRcKBQ7g7wnGnLV3M8oLvVWwOk2PdYY6PEFegR1vezXR0tw6fZGF9csVakIRjrJiy2veSBFQ==} engines: {node: '>= 0.4'} + set-function-length@1.2.2: + resolution: {integrity: sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==} + engines: {node: '>= 0.4'} + set-function-name@2.0.1: resolution: {integrity: sha512-tMNCiqYVkXIZgc2Hnoy2IvC/f8ezc5koaRFkCjrpWzGpCd3qbZXPzVy9MAZzK1ch/X0jvSkojys3oqJN0qCmdA==} engines: {node: '>= 0.4'} @@ -3542,8 +3594,8 @@ packages: resolution: {integrity: sha512-94Bdh3cC2PKrbgSOUqTiGPWVZeSiXfKOVZNJniWoqrWrRkB1CJzBU3NEbiTsPcYy1lDsANA/THzS+9WBiy5nfQ==} engines: {node: '>= 10'} - sk-form-data@1.0.1: - resolution: {integrity: sha512-KqYcA1t97/jbJpyNeCLMn2Uex5fjowgsCvr0T6qAWdGiccKyYsSNe+2/v9tEVXZ3c/P8sAmm74IPXaRu82QUgA==} + sk-form-data@2.0.2: + resolution: {integrity: sha512-8HeJyQIiNpJJgjMBthpukQ45T1cV/2eHM1KFTXA3FG+2bq+mMroC5QjDzGcWQOWTbrH/AGom1Z0MewAPo3o+WA==} slash@3.0.0: resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==} @@ -3933,8 +3985,8 @@ packages: unplugin@1.0.1: resolution: {integrity: sha512-aqrHaVBWW1JVKBHmGo33T5TxeL0qWzfvjWokObHA9bYmN7eNDkwOxmLjhioHl9878qDFMAaT51XNroRyuz7WxA==} - unplugin@1.10.1: - resolution: {integrity: sha512-d6Mhq8RJeGA8UfKCu54Um4lFA0eSaRa3XxdAJg8tIdxbu1ubW0hBCZUL7yI2uGyYCRndvbK8FLHzqy2XKfeMsg==} + unplugin@1.11.0: + resolution: {integrity: sha512-3r7VWZ/webh0SGgJScpWl2/MRCZK5d3ZYFcNaeci/GQ7Teop7zf0Nl2pUuz7G21BwPd9pcUPOC5KmJ2L3WgC5g==} engines: {node: '>=14.0.0'} update-browserslist-db@1.0.13: @@ -4049,10 +4101,6 @@ packages: web-namespaces@2.0.1: resolution: {integrity: sha512-bKr1DkiNa2krS7qxNtdrtHAmzuYGFQLiQ13TsorsdT6ULTkPLKuu5+GsFpDlg6JFjUTwX2DyhMPG2be8uPrqsQ==} - web-streams-polyfill@3.2.1: - resolution: {integrity: sha512-e0MO3wdXWKrLbL0DgGnUV7WHVuw9OUvL4hjgnPkIeEvESk74gAITi5G606JtZPp39cd8HA9VQzCIvA49LpPN5Q==} - engines: {node: '>= 8'} - web-streams-polyfill@3.3.3: resolution: {integrity: sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw==} engines: {node: '>= 8'} @@ -4071,8 +4119,8 @@ packages: webpack-virtual-modules@0.5.0: resolution: {integrity: sha512-kyDivFZ7ZM0BVOUteVbDFhlRt7Ah/CSPwJdi8hBpkK7QLumUqdLtVfm/PX/hkcnrvr0i77fO5+TjZ94Pe+C9iw==} - webpack-virtual-modules@0.6.1: - resolution: {integrity: sha512-poXpCylU7ExuvZK8z+On3kX+S8o/2dQ/SVYueKA0D4WEMXROXgY8Ez50/bQEUmvoSMMrWcrJqCHuhAbsiwg7Dg==} + webpack-virtual-modules@0.6.2: + resolution: {integrity: sha512-66/V2i5hQanC51vBQKPH4aI8NMAcBW59FVBs+rC7eGHupMyfn34q7rZIE+ETlJ+XTevqfUhVVBgSUNSW2flEUQ==} webpod@0.0.2: resolution: {integrity: sha512-cSwwQIeg8v4i3p4ajHhwgR7N6VyxAf+KYSSsY6Pd3aETE+xEU4vbitz7qQkB0I321xnhDdgtxuiSfk5r/FVtjg==} @@ -4088,6 +4136,10 @@ packages: resolution: {integrity: sha512-P5Nra0qjSncduVPEAr7xhoF5guty49ArDTwzJ/yNuPIbZppyRxFQsRCWrocxIY+CnMVG+qfbU2FmDKyvSGClow==} engines: {node: '>= 0.4'} + which-typed-array@1.1.15: + resolution: {integrity: sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA==} + engines: {node: '>= 0.4'} + which@1.3.1: resolution: {integrity: sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==} hasBin: true @@ -4187,9 +4239,6 @@ packages: youtube-video-element@1.1.6: resolution: {integrity: sha512-EaHyEh68twtuWn6S7cCEghJkLfaOD82wmJhczeWSTxT71yOG6lL7EXu6EAHADj6wPQJ9+lZpaos3f/Bh8Lzvjg==} - zod@3.22.4: - resolution: {integrity: sha512-iC+8Io04lddc+mVqQ9AZ7OQ2MrUKGN+oIQyq1vemgt46jwCwLfhq7/pwnBnNXXXZb8VTVLKwp9EDkx+ryxIWmg==} - zod@3.23.8: resolution: {integrity: sha512-XBx9AXhXktjUqnepgTiE5flcKIYWi/rme0Eaj+5Y0lftuGBq+jyRu/md4WnuxqgP1ubdpNCsYEYPxrzVHD8d6g==} @@ -4232,9 +4281,9 @@ snapshots: dependencies: '@babel/types': 7.24.0 - '@babel/runtime@7.23.1': + '@babel/runtime@7.24.7': dependencies: - regenerator-runtime: 0.14.0 + regenerator-runtime: 0.14.1 '@babel/types@7.24.0': dependencies: @@ -4242,27 +4291,27 @@ snapshots: '@babel/helper-validator-identifier': 7.22.20 to-fast-properties: 2.0.0 - '@codecov/bundler-plugin-core@0.0.1-beta.9': + '@codecov/bundler-plugin-core@0.0.1-beta.10': dependencies: chalk: 4.1.2 - semver: 7.6.0 - unplugin: 1.10.1 - zod: 3.22.4 + semver: 7.6.2 + unplugin: 1.11.0 + zod: 3.23.8 - '@codecov/sveltekit-plugin@0.0.1-beta.9(@sveltejs/kit@2.5.17(@sveltejs/vite-plugin-svelte@3.1.1(svelte@4.2.18)(vite@5.3.2(@types/node@20.14.9)))(svelte@4.2.18)(vite@5.3.2(@types/node@20.14.9)))(svelte@4.2.18)(vite@5.3.2(@types/node@20.14.9))': + '@codecov/sveltekit-plugin@0.0.1-beta.10(@sveltejs/kit@2.5.18(@sveltejs/vite-plugin-svelte@3.1.1(svelte@4.2.18)(vite@5.3.2(@types/node@20.14.9)))(svelte@4.2.18)(vite@5.3.2(@types/node@20.14.9)))(svelte@4.2.18)(vite@5.3.2(@types/node@20.14.9))': dependencies: - '@codecov/bundler-plugin-core': 0.0.1-beta.9 - '@codecov/vite-plugin': 0.0.1-beta.9(vite@5.3.2(@types/node@20.14.9)) - '@sveltejs/kit': 2.5.17(@sveltejs/vite-plugin-svelte@3.1.1(svelte@4.2.18)(vite@5.3.2(@types/node@20.14.9)))(svelte@4.2.18)(vite@5.3.2(@types/node@20.14.9)) + '@codecov/bundler-plugin-core': 0.0.1-beta.10 + '@codecov/vite-plugin': 0.0.1-beta.10(vite@5.3.2(@types/node@20.14.9)) + '@sveltejs/kit': 2.5.18(@sveltejs/vite-plugin-svelte@3.1.1(svelte@4.2.18)(vite@5.3.2(@types/node@20.14.9)))(svelte@4.2.18)(vite@5.3.2(@types/node@20.14.9)) svelte: 4.2.18 - unplugin: 1.10.1 + unplugin: 1.11.0 transitivePeerDependencies: - vite - '@codecov/vite-plugin@0.0.1-beta.9(vite@5.3.2(@types/node@20.14.9))': + '@codecov/vite-plugin@0.0.1-beta.10(vite@5.3.2(@types/node@20.14.9))': dependencies: - '@codecov/bundler-plugin-core': 0.0.1-beta.9 - unplugin: 1.10.1 + '@codecov/bundler-plugin-core': 0.0.1-beta.10 + unplugin: 1.11.0 vite: 5.3.2(@types/node@20.14.9) '@cspotcode/source-map-support@0.8.1': @@ -4799,7 +4848,7 @@ snapshots: '@remix-run/web-stream@1.1.0': dependencies: - web-streams-polyfill: 3.2.1 + web-streams-polyfill: 3.3.3 '@rollup/pluginutils@4.2.1': dependencies: @@ -4987,7 +5036,7 @@ snapshots: magic-string: 0.30.10 svelte: 4.2.18 - '@sentry/sveltekit@7.118.0(@sveltejs/kit@2.5.17(@sveltejs/vite-plugin-svelte@3.1.1(svelte@4.2.18)(vite@5.3.2(@types/node@20.14.9)))(svelte@4.2.18)(vite@5.3.2(@types/node@20.14.9)))(svelte@4.2.18)': + '@sentry/sveltekit@7.118.0(@sveltejs/kit@2.5.18(@sveltejs/vite-plugin-svelte@3.1.1(svelte@4.2.18)(vite@5.3.2(@types/node@20.14.9)))(svelte@4.2.18)(vite@5.3.2(@types/node@20.14.9)))(svelte@4.2.18)': dependencies: '@sentry-internal/tracing': 7.118.0 '@sentry/core': 7.118.0 @@ -4997,7 +5046,7 @@ snapshots: '@sentry/types': 7.118.0 '@sentry/utils': 7.118.0 '@sentry/vite-plugin': 0.6.1 - '@sveltejs/kit': 2.5.17(@sveltejs/vite-plugin-svelte@3.1.1(svelte@4.2.18)(vite@5.3.2(@types/node@20.14.9)))(svelte@4.2.18)(vite@5.3.2(@types/node@20.14.9)) + '@sveltejs/kit': 2.5.18(@sveltejs/vite-plugin-svelte@3.1.1(svelte@4.2.18)(vite@5.3.2(@types/node@20.14.9)))(svelte@4.2.18)(vite@5.3.2(@types/node@20.14.9)) magicast: 0.2.8 sorcery: 0.11.0 transitivePeerDependencies: @@ -5041,16 +5090,16 @@ snapshots: dependencies: svelte: 4.2.18 - '@sveltejs/adapter-vercel@5.3.2(@sveltejs/kit@2.5.17(@sveltejs/vite-plugin-svelte@3.1.1(svelte@4.2.18)(vite@5.3.2(@types/node@20.14.9)))(svelte@4.2.18)(vite@5.3.2(@types/node@20.14.9)))': + '@sveltejs/adapter-vercel@5.3.2(@sveltejs/kit@2.5.18(@sveltejs/vite-plugin-svelte@3.1.1(svelte@4.2.18)(vite@5.3.2(@types/node@20.14.9)))(svelte@4.2.18)(vite@5.3.2(@types/node@20.14.9)))': dependencies: - '@sveltejs/kit': 2.5.17(@sveltejs/vite-plugin-svelte@3.1.1(svelte@4.2.18)(vite@5.3.2(@types/node@20.14.9)))(svelte@4.2.18)(vite@5.3.2(@types/node@20.14.9)) + '@sveltejs/kit': 2.5.18(@sveltejs/vite-plugin-svelte@3.1.1(svelte@4.2.18)(vite@5.3.2(@types/node@20.14.9)))(svelte@4.2.18)(vite@5.3.2(@types/node@20.14.9)) '@vercel/nft': 0.27.2 esbuild: 0.20.2 transitivePeerDependencies: - encoding - supports-color - '@sveltejs/kit@2.5.17(@sveltejs/vite-plugin-svelte@3.1.1(svelte@4.2.18)(vite@5.3.2(@types/node@20.14.9)))(svelte@4.2.18)(vite@5.3.2(@types/node@20.14.9))': + '@sveltejs/kit@2.5.18(@sveltejs/vite-plugin-svelte@3.1.1(svelte@4.2.18)(vite@5.3.2(@types/node@20.14.9)))(svelte@4.2.18)(vite@5.3.2(@types/node@20.14.9))': dependencies: '@sveltejs/vite-plugin-svelte': 3.1.1(svelte@4.2.18)(vite@5.3.2(@types/node@20.14.9)) '@types/cookie': 0.6.0 @@ -5059,7 +5108,7 @@ snapshots: esm-env: 1.0.0 import-meta-resolve: 4.1.0 kleur: 4.1.5 - magic-string: 0.30.8 + magic-string: 0.30.10 mrmime: 2.0.0 sade: 1.8.1 set-cookie-parser: 2.6.0 @@ -5335,6 +5384,8 @@ snapshots: acorn@8.12.0: {} + acorn@8.12.1: {} + agent-base@6.0.2: dependencies: debug: 4.3.5 @@ -5437,6 +5488,10 @@ snapshots: available-typed-arrays@1.0.5: {} + available-typed-arrays@1.0.7: + dependencies: + possible-typed-array-names: 1.0.0 + axios@0.26.1: dependencies: follow-redirects: 1.15.6 @@ -5524,6 +5579,14 @@ snapshots: get-intrinsic: 1.2.2 set-function-length: 1.1.1 + call-bind@1.0.7: + dependencies: + es-define-property: 1.0.0 + es-errors: 1.3.0 + function-bind: 1.1.2 + get-intrinsic: 1.2.4 + set-function-length: 1.2.2 + callsites@3.1.0: {} caniuse-lite@1.0.30001605: {} @@ -5721,6 +5784,12 @@ snapshots: gopd: 1.0.1 has-property-descriptors: 1.0.1 + define-data-property@1.1.4: + dependencies: + es-define-property: 1.0.0 + es-errors: 1.3.0 + gopd: 1.0.1 + define-properties@1.2.1: dependencies: define-data-property: 1.1.1 @@ -5844,6 +5913,12 @@ snapshots: unbox-primitive: 1.0.2 which-typed-array: 1.1.13 + es-define-property@1.0.0: + dependencies: + get-intrinsic: 1.2.4 + + es-errors@1.3.0: {} + es-set-tostringtag@2.0.2: dependencies: get-intrinsic: 1.2.2 @@ -6223,6 +6298,14 @@ snapshots: has-symbols: 1.0.3 hasown: 2.0.0 + get-intrinsic@1.2.4: + dependencies: + es-errors: 1.3.0 + function-bind: 1.1.2 + has-proto: 1.0.3 + has-symbols: 1.0.3 + hasown: 2.0.2 + get-stream@5.2.0: dependencies: pump: 3.0.0 @@ -6323,14 +6406,24 @@ snapshots: dependencies: get-intrinsic: 1.2.2 + has-property-descriptors@1.0.2: + dependencies: + es-define-property: 1.0.0 + has-proto@1.0.1: {} + has-proto@1.0.3: {} + has-symbols@1.0.3: {} has-tostringtag@1.0.0: dependencies: has-symbols: 1.0.3 + has-tostringtag@1.0.2: + dependencies: + has-symbols: 1.0.3 + has-unicode@2.0.1: {} has@1.0.3: @@ -6505,8 +6598,8 @@ snapshots: is-arguments@1.1.1: dependencies: - call-bind: 1.0.5 - has-tostringtag: 1.0.0 + call-bind: 1.0.7 + has-tostringtag: 1.0.2 is-array-buffer@3.0.2: dependencies: @@ -6553,7 +6646,7 @@ snapshots: is-generator-function@1.0.10: dependencies: - has-tostringtag: 1.0.0 + has-tostringtag: 1.0.2 is-glob@4.0.3: dependencies: @@ -6598,6 +6691,10 @@ snapshots: dependencies: which-typed-array: 1.1.13 + is-typed-array@1.1.13: + dependencies: + which-typed-array: 1.1.15 + is-weakref@1.0.2: dependencies: call-bind: 1.0.5 @@ -7299,7 +7396,7 @@ snapshots: parse-nested-form-data@1.0.0(@remix-run/web-file@3.1.0): dependencies: - '@babel/runtime': 7.23.1 + '@babel/runtime': 7.24.7 '@remix-run/web-file': 3.1.0 parse5@7.1.2: @@ -7369,6 +7466,8 @@ snapshots: optionalDependencies: fsevents: 2.3.2 + possible-typed-array-names@1.0.0: {} + postcss-attribute-case-insensitive@6.0.3(postcss@8.4.38): dependencies: postcss: 8.4.38 @@ -7728,7 +7827,7 @@ snapshots: tiny-invariant: 1.3.3 tslib: 2.6.3 - regenerator-runtime@0.14.0: {} + regenerator-runtime@0.14.1: {} regexp.prototype.flags@1.5.1: dependencies: @@ -7909,6 +8008,15 @@ snapshots: gopd: 1.0.1 has-property-descriptors: 1.0.1 + set-function-length@1.2.2: + dependencies: + define-data-property: 1.1.4 + es-errors: 1.3.0 + function-bind: 1.1.2 + get-intrinsic: 1.2.4 + gopd: 1.0.1 + has-property-descriptors: 1.0.2 + set-function-name@2.0.1: dependencies: define-data-property: 1.1.1 @@ -7947,7 +8055,7 @@ snapshots: mrmime: 2.0.0 totalist: 3.0.1 - sk-form-data@1.0.1: + sk-form-data@2.0.2: dependencies: '@remix-run/web-file': 3.1.0 parse-nested-form-data: 1.0.0(@remix-run/web-file@3.1.0) @@ -8171,9 +8279,9 @@ snapshots: magic-string: 0.30.8 periscopic: 3.1.0 - sveltekit-search-params@2.1.2(@sveltejs/kit@2.5.17(@sveltejs/vite-plugin-svelte@3.1.1(svelte@4.2.18)(vite@5.3.2(@types/node@20.14.9)))(svelte@4.2.18)(vite@5.3.2(@types/node@20.14.9)))(svelte@4.2.18)(vite@5.3.2(@types/node@20.14.9)): + sveltekit-search-params@2.1.2(@sveltejs/kit@2.5.18(@sveltejs/vite-plugin-svelte@3.1.1(svelte@4.2.18)(vite@5.3.2(@types/node@20.14.9)))(svelte@4.2.18)(vite@5.3.2(@types/node@20.14.9)))(svelte@4.2.18)(vite@5.3.2(@types/node@20.14.9)): dependencies: - '@sveltejs/kit': 2.5.17(@sveltejs/vite-plugin-svelte@3.1.1(svelte@4.2.18)(vite@5.3.2(@types/node@20.14.9)))(svelte@4.2.18)(vite@5.3.2(@types/node@20.14.9)) + '@sveltejs/kit': 2.5.18(@sveltejs/vite-plugin-svelte@3.1.1(svelte@4.2.18)(vite@5.3.2(@types/node@20.14.9)))(svelte@4.2.18)(vite@5.3.2(@types/node@20.14.9)) '@sveltejs/vite-plugin-svelte': 3.1.1(svelte@4.2.18)(vite@5.3.2(@types/node@20.14.9)) svelte: 4.2.18 transitivePeerDependencies: @@ -8372,12 +8480,12 @@ snapshots: webpack-sources: 3.2.3 webpack-virtual-modules: 0.5.0 - unplugin@1.10.1: + unplugin@1.11.0: dependencies: - acorn: 8.11.3 + acorn: 8.12.1 chokidar: 3.6.0 webpack-sources: 3.2.3 - webpack-virtual-modules: 0.6.1 + webpack-virtual-modules: 0.6.2 update-browserslist-db@1.0.13(browserslist@4.23.0): dependencies: @@ -8402,8 +8510,8 @@ snapshots: inherits: 2.0.4 is-arguments: 1.1.1 is-generator-function: 1.0.10 - is-typed-array: 1.1.12 - which-typed-array: 1.1.13 + is-typed-array: 1.1.13 + which-typed-array: 1.1.15 v8-compile-cache-lib@3.0.1: {} @@ -8501,8 +8609,6 @@ snapshots: web-namespaces@2.0.1: {} - web-streams-polyfill@3.2.1: {} - web-streams-polyfill@3.3.3: {} web-streams-polyfill@4.0.0-beta.3: {} @@ -8513,7 +8619,7 @@ snapshots: webpack-virtual-modules@0.5.0: {} - webpack-virtual-modules@0.6.1: {} + webpack-virtual-modules@0.6.2: {} webpod@0.0.2: {} @@ -8538,6 +8644,14 @@ snapshots: gopd: 1.0.1 has-tostringtag: 1.0.0 + which-typed-array@1.1.15: + dependencies: + available-typed-arrays: 1.0.7 + call-bind: 1.0.7 + for-each: 0.3.3 + gopd: 1.0.1 + has-tostringtag: 1.0.2 + which@1.3.1: dependencies: isexe: 2.0.0 @@ -8612,8 +8726,6 @@ snapshots: youtube-video-element@1.1.6: {} - zod@3.22.4: {} - zod@3.23.8: {} zwitch@2.0.4: {} diff --git a/src/lib/hotkeys/Hotkeys.svelte b/src/lib/hotkeys/Hotkeys.svelte index 3a85f1380..9b63cd43c 100644 --- a/src/lib/hotkeys/Hotkeys.svelte +++ b/src/lib/hotkeys/Hotkeys.svelte @@ -1,4 +1,4 @@ - {#if is_link && show} @@ -38,11 +13,12 @@ {:else} -
- {#if image_index === 0} - - {:else} - +
+ + {#if !$player.initial_load} + {#key $player?.current_show?.id} +
📀
+ {/key} {/if}
{/if} @@ -54,8 +30,36 @@ cursor: pointer; flex-shrink: 0; display: none; + position: relative; @media (--above_med) { display: block; } } + .cd { + position: absolute; + inset: 0; + font-size: 68px; + animation: + spin 0.5s linear 5, + slide-in 1s ease-in-out 2 alternate; + transform-origin: center center; + text-align: center; + z-index: -1; + } + + /* Define the second animation */ + @keyframes slide-in { + 80% { + translate: 35px; + } + 100% { + translate: 35px; + } + } + + @keyframes spin { + to { + rotate: 360deg; + } + } diff --git a/src/lib/player/Bookmarks.svelte b/src/lib/player/Bookmarks.svelte deleted file mode 100644 index b4e584273..000000000 --- a/src/lib/player/Bookmarks.svelte +++ /dev/null @@ -1,81 +0,0 @@ - - -
- {#each time_stamps as time_stamp} - - - - -
-

{time_stamp.label}

- {/each} -
- - diff --git a/src/lib/player/Player.svelte b/src/lib/player/Player.svelte index 6476d2d04..5e20a0c90 100644 --- a/src/lib/player/Player.svelte +++ b/src/lib/player/Player.svelte @@ -5,9 +5,18 @@ import get_show_path from '$utilities/slug'; import Icon from '../Icon.svelte'; import ShareButton from '../share/HairButton.svelte'; + import { onMount } from 'svelte'; + import type { Show } from '@prisma/client'; + + export let initial_show: Show; + + onMount(() => { + // Load latest show by default + player.initialize(initial_show); + }); -
+
{#if $player.current_show}{/if} @@ -34,10 +43,13 @@ style="--media-range-track-height: 5px; --media-range-thumb-height: 15px; --media-range-thumb-border-radius: 0; --media-range-track-border-radius: 5px; --media-range-bar-color: var(--primary);--media-background-color: transparent; --media-control-background: transparent; width: 100%; --media-font-family: var(--body-font-family); --media-control-hover-background: transparent; " >