Skip to content

Commit

Permalink
fix: PiP deband video
Browse files Browse the repository at this point in the history
  • Loading branch information
ThaUnknown committed Apr 13, 2024
1 parent 947ac1c commit 453c79f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions common/views/Player/Player.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@
context.drawImage(video, 0, 0)
if (subs?.renderer) {
subs.renderer.resize(video.videoWidth, video.videoHeight)
await new Promise(resolve => setTimeout(resolve, 1000)) // this is hacky, but TLDR wait for canvas to update and re-render, in practice this will take at MOST 100ms, but just to be safe
await new Promise(resolve => setTimeout(resolve, 500)) // this is hacky, but TLDR wait for canvas to update and re-render, in practice this will take at MOST 100ms, but just to be safe
context.drawImage(subs.renderer._canvas, 0, 0, canvas.width, canvas.height)
subs.renderer.resize(0, 0, 0, 0) // undo resize
}
Expand Down Expand Up @@ -608,7 +608,7 @@
canvas.height = video.videoHeight
if (!noSubs) subs.renderer.resize(video.videoWidth, video.videoHeight)
const renderFrame = () => {
context.drawImage(video, 0, 0)
context.drawImage(deband ? deband.canvas : video, 0, 0)
if (!noSubs) context.drawImage(subs.renderer?._canvas, 0, 0, canvas.width, canvas.height)
loop = video.requestVideoFrameCallback(renderFrame)
}
Expand Down
2 changes: 1 addition & 1 deletion electron/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Miru",
"version": "5.0.5",
"version": "5.0.6",
"private": true,
"author": "ThaUnknown_ <ThaUnknown@users.noreply.github.com>",
"description": "Stream anime torrents, real-time with no waiting for downloads.",
Expand Down

0 comments on commit 453c79f

Please sign in to comment.