diff --git a/package.json b/package.json index 0da7a57..07600ee 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ui", - "version": "6.4.1", + "version": "6.4.2", "license": "BUSL-1.1", "private": true, "packageManager": "pnpm@9.14.4", @@ -32,6 +32,7 @@ "gql.tada": "^1.8.10", "hayase-extensions": "github:hayase-app/extensions", "jassub": "^1.8.6", + "rollup-plugin-license": "^3.6.0", "simple-copy": "^2.2.1", "svelte": "^4.2.19", "svelte-check": "^4.2.1", @@ -72,7 +73,6 @@ "lucide-svelte": "^0.511.0", "marked": "^15.0.11", "p2pt": "github:ThaUnknown/p2pt#modernise", - "rollup-plugin-license": "^3.6.0", "semver": "^7.7.2", "simple-store-svelte": "^1.0.6", "svelte-headless-table": "^0.18.3", @@ -82,7 +82,7 @@ "tailwind-variants": "^1.0.0", "uint8-util": "^2.2.5", "urql": "^4.2.2", - "video-deband": "^1.0.7", + "video-deband": "^1.0.8", "workbox-core": "^7.3.0", "workbox-precaching": "^7.3.0", "workbox-routing": "^7.3.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 7e69752..99885ae 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -89,9 +89,6 @@ importers: p2pt: specifier: github:ThaUnknown/p2pt#modernise version: https://codeload.github.com/ThaUnknown/p2pt/tar.gz/9ad7a56ed6ee43f5664ebad33b803702ee349316 - rollup-plugin-license: - specifier: ^3.6.0 - version: 3.6.0(picomatch@4.0.2)(rollup@4.40.2) semver: specifier: ^7.7.2 version: 7.7.2 @@ -120,8 +117,8 @@ importers: specifier: ^4.2.2 version: 4.2.2(@urql/core@5.1.0(graphql@16.10.0))(react@19.0.0) video-deband: - specifier: ^1.0.7 - version: 1.0.7 + specifier: ^1.0.8 + version: 1.0.8 workbox-core: specifier: ^7.3.0 version: 7.3.0 @@ -177,6 +174,9 @@ importers: jassub: specifier: ^1.8.6 version: 1.8.6 + rollup-plugin-license: + specifier: ^3.6.0 + version: 3.6.0(picomatch@4.0.2)(rollup@4.40.2) simple-copy: specifier: ^2.2.1 version: 2.2.1 @@ -2594,8 +2594,8 @@ packages: peerDependencies: svelte: ^4.0.0 || ^5.0.0-next.1 - video-deband@1.0.7: - resolution: {integrity: sha512-vwJ2E/e7DfvFlKU5RQ8T8ZEcG7m7A41TIxZ3X57o7Rzw+HSTNyljrtSPJU11UQR2X9wVmAC7WKdOs7zOsxNV6A==} + video-deband@1.0.8: + resolution: {integrity: sha512-QdEVDl29WWSb/HkGuLmdExto7x90WYqz1DdljT7IiCVH/zqepuCS2OnGX/C3kHDIIOiumtFWEj7z9wUiVojiSA==} vite-plugin-static-copy@3.0.2: resolution: {integrity: sha512-/seLvhUg44s1oU9RhjTZZy/0NPbfNctozdysKcvPovxxXZdI5l19mGq6Ri3IaTf1Dy/qChS4BSR7ayxeu8o9aQ==} @@ -5340,7 +5340,7 @@ snapshots: bits-ui: 0.21.16(svelte@4.2.19) svelte: 4.2.19 - video-deband@1.0.7: + video-deband@1.0.8: dependencies: rvfc-polyfill: 1.0.7 twgl.js: 5.5.4 diff --git a/src/lib/components/ui/player/pip.ts b/src/lib/components/ui/player/pip.ts index f109c08..abb5ef2 100644 --- a/src/lib/components/ui/player/pip.ts +++ b/src/lib/components/ui/player/pip.ts @@ -72,13 +72,13 @@ export default class PictureInPicture { canvas.width = this.video.videoWidth canvas.height = this.video.videoHeight this.subtitles.renderer.resize(this.video.videoWidth, this.video.videoHeight) - const renderFrame = () => { + const renderFrame = (noskip?: number) => { + if (noskip) this.video!.paused ? video.pause() : video.play() context.drawImage(this.deband?.canvas ?? this.video!, 0, 0) // @ts-expect-error internal call on canvas if (canvas.width && canvas.height && this.subtitles.renderer?._canvas) context.drawImage(this.subtitles.renderer._canvas, 0, 0, canvas.width, canvas.height) loop = this.video!.requestVideoFrameCallback(renderFrame) } - renderFrame() ctrl.signal.addEventListener('abort', () => { this.subtitles?.renderer?.resize() this.video!.cancelVideoFrameCallback(loop) @@ -90,7 +90,9 @@ export default class PictureInPicture { video.addEventListener('leavepictureinpicture', () => ctrl.abort(), { signal: ctrl.signal }) try { + setTimeout(renderFrame, 10) await video.play() + if (this.video.paused) video.pause() const window = await video.requestPictureInPicture() window.addEventListener('resize', () => { const { width, height } = window diff --git a/src/lib/components/ui/player/player.svelte b/src/lib/components/ui/player/player.svelte index 17c2634..1a3ad7d 100644 --- a/src/lib/components/ui/player/player.svelte +++ b/src/lib/components/ui/player/player.svelte @@ -50,7 +50,7 @@ import PictureInPictureExit from '$lib/components/icons/PictureInPictureExit.svelte' import Play from '$lib/components/icons/Play.svelte' import Subtitles from '$lib/components/icons/Subtitles.svelte' - import { Button } from '$lib/components/ui/button' + import { Button, iconSizes } from '$lib/components/ui/button' import * as Sheet from '$lib/components/ui/sheet' import { client } from '$lib/modules/anilist' import { episodes } from '$lib/modules/anizip' @@ -721,8 +721,8 @@ -
-