steep-balloon-41261
07/08/2023, 11:52 AMmagnificent-art-43333
07/08/2023, 3:32 PMmagnificent-art-43333
07/08/2023, 3:33 PMcan anyone help me what host to pass in egressclient
is it livekitcloud host id or my website/app bundle id?
adamant-napkin-5261
07/08/2023, 3:35 PMadamant-napkin-5261
07/08/2023, 4:21 PMadamant-napkin-5261
07/08/2023, 5:01 PMadamant-napkin-5261
07/08/2023, 5:09 PMdry-elephant-14928
07/08/2023, 5:56 PMadamant-napkin-5261
07/08/2023, 7:57 PMimport * as fs from 'fs';
const content = fs.readFileSync('/path/to/credentials.json')
const output = {
fileType: EncodedFileType.MP4,
filepath: 'livekit-demo/room-composite-test.mp4',
gcp: {
// credentials needs to be a UInt8Array
credentials: content,
bucket: 'my-bucket',
}
};
await egressClient.startRoomCompositeEgress('my-room', output);
My Version:-
const content = fs.readFileSync(
"../functions/creds.json"
);
const output = {
fileType: EncodedFileType.MP4,
filePath: "${entityId}/recording01.mp4",
gcp: {
// credentials needs to be a Buffer
credentials: Buffer.from(content), // Uint8Array
bucket: "recording_calls",
},
};
const data = await egressClient.startRoomCompositeEgress(
roomName,
output,
{
layout: "speaker",
videoOnly: true,
encodingOptions: EncodingOptionsPreset.H264_1080P_30,
audioOnly: true,
}
);
adamant-napkin-5261
07/08/2023, 8:35 PM```my Credentials are going like this
"credentials": {
"type": "Buffer",
"data": [
123,
10,
32,
32,
34,
116,
121,
112,
101,
34,
58,
32,
34,
115,........
]
}```
dry-elephant-14928
07/09/2023, 5:17 AMdry-elephant-14928
07/09/2023, 5:24 AMconst content = fs.readFileSync(
"../functions/creds.json"
);
const output = {
fileType: EncodedFileType.MP4,
filePath: "${entityId}/recording01.mp4",
gcp: {
// credentials needs to be a Buffer
credentials: content.toString(),
bucket: "recording_calls",
},
};
const data = await egressClient.startRoomCompositeEgress(
roomName,
output,
{
layout: "speaker",
videoOnly: true,
encodingOptions: EncodingOptionsPreset.H264_1080P_30,
audioOnly: true,
}
);
dry-elephant-14928
07/09/2023, 5:24 AMcontent.toString()
adamant-napkin-5261
07/09/2023, 6:03 AMadamant-napkin-5261
07/13/2023, 10:26 AMmagnificent-art-43333
07/13/2023, 4:08 PMbright-dream-51521
07/13/2023, 4:13 PMadamant-napkin-5261
07/15/2023, 8:47 AM