Unity启动,录制视频没有文件产出

This commit is contained in:
2026-06-03 00:37:41 +08:00
parent 3e161ff995
commit f742499b33
4 changed files with 142 additions and 7 deletions

View File

@@ -292,3 +292,53 @@ describe('websocket signaling test in private mode', () => {
await wsHandler.remove(client);
});
});
describe('recording offer validation', () => {
let server: WS;
let client: WebSocket;
const connectionId = "recording-room";
beforeAll(async () => {
wsHandler.reset("private");
server = new WS("ws://localhost:1234", { jsonProtocol: true });
client = new WebSocket("ws://localhost:1234");
await server.connected;
await wsHandler.add(client);
await wsHandler.onConnect(client, connectionId);
await expect(server).toReceiveMessage({
type: "connect",
connectionId: connectionId,
polite: false,
role: "host",
participantId: anyParticipantId
});
});
afterAll(() => {
WS.clean();
});
test('rejects recording offers without audio or video media sections', async () => {
await wsHandler.onRecordingOffer(client, {
recordingId: 'recording-empty-offer',
connectionId,
sdp: [
'v=0',
'o=- 25268170 0 IN IP4 0.0.0.0',
's=-',
't=0 0',
'a=group:BUNDLE ',
'a=extmap-allow-mixed',
'a=msid-semantic:WMS *',
''
].join('\r\n')
});
await expect(server).toReceiveMessage(expect.objectContaining({
from: connectionId,
to: "",
type: "on-message",
data: expect.stringContaining('"status":"no-media-offer"')
}));
});
});