-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: audio impl in wrkspce+client, improve vnc viewer, fix file list…
…ing and screenshot (kinda), fix config file resolving
- Loading branch information
1 parent
0c953c5
commit 1c9422c
Showing
29 changed files
with
350 additions
and
173 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,6 +33,7 @@ tsconfig.tsbuildinfo | |
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
std*.log | ||
|
||
# Misc | ||
.DS_Store | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,17 @@ | ||
import { docker } from "~/lib/docker"; | ||
export default async function screenshot(id: string) { | ||
const container = docker.getContainer(id); | ||
const exec = await container.exec({ | ||
Cmd: ["sh", "-c", "xwd -root | convert xwd:- png:- | base64"], | ||
const exec = await docker.getContainer(id).exec({ | ||
Cmd: ["sh", "-c", "xwd -root -display :1 | convert xwd:- png:- | base64"], | ||
AttachStdout: true, | ||
AttachStderr: true, | ||
}); | ||
|
||
const stream = await exec.start({ hijack: true, stdin: true }); | ||
const stream = await exec.start({}); | ||
const encoded = await new Promise<string>((res, err) => { | ||
const out: string[] = []; | ||
stream.on("error", err); | ||
stream.on("data", (chunk) => out.push(chunk.toString())); | ||
stream.on("end", () => res(out.join(""))); | ||
}); | ||
const file = Buffer.from(encoded, "base64"); | ||
return file; | ||
return encoded.replaceAll(/[^A-Za-z0-9+/=]/g, ""); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.