feat: add multimodal analysis support to LLM moderation client by processing image attachments
This commit is contained in:
@@ -38,7 +38,8 @@ describe("playTranscodedPreparedStream", () => {
|
||||
it("pipes transcoder output to session and broadcasts to web", async () => {
|
||||
// mock global broadcast
|
||||
const broadcasts: Buffer[] = [];
|
||||
(globalThis as any).broadcastVideoToWeb = (chunk: Buffer) => broadcasts.push(Buffer.from(chunk));
|
||||
(globalThis as any).broadcastVideoToWeb = (chunk: Buffer) =>
|
||||
broadcasts.push(Buffer.from(chunk));
|
||||
|
||||
const session = {
|
||||
connection: { channel: { id: "c" } },
|
||||
@@ -52,7 +53,9 @@ describe("playTranscodedPreparedStream", () => {
|
||||
stop: vi.fn(),
|
||||
} as any;
|
||||
|
||||
await playTranscodedPreparedStream("http://example.test/stream", session, { fps: 30 });
|
||||
await playTranscodedPreparedStream("http://example.test/stream", session, {
|
||||
fps: 30,
|
||||
});
|
||||
expect(session.play).toHaveBeenCalled();
|
||||
expect(broadcasts.length).toBeGreaterThanOrEqual(0);
|
||||
});
|
||||
|
||||
@@ -39,7 +39,10 @@ import { prepareTranscoder } from "../../src/streaming/transcoder";
|
||||
|
||||
describe("Transcoder", () => {
|
||||
it("starts ffmpeg and returns output stream and command", () => {
|
||||
const { transcoder, command, output } = prepareTranscoder("http://example.test/video", { fps: 24 });
|
||||
const { transcoder, command, output } = prepareTranscoder(
|
||||
"http://example.test/video",
|
||||
{ fps: 24 },
|
||||
);
|
||||
expect(transcoder).toBeTruthy();
|
||||
expect(command).toBeTruthy();
|
||||
expect(output).toBeTruthy();
|
||||
|
||||
Reference in New Issue
Block a user