'Create a Daily room' returns Bad Request when I set 'variant' key in streaming_endpoints properties
Options
Ryoko
Member
I have tested live stream features to store HLS outputs in my own aws S3 bucket.
It worked fine by default without variant key in streaming_endpoints properties.
But if I add 'variant' key in streaming_endpoints properties referring to this page below,
I have received bad request executing 'create a Daily room.'
I have developed a system using daily-js.
Any suggestions to prevent this error?
Tagged:
0
Best Answer
-
the property name is `variants` JSON is calling it `variant`
1
Answers
-
Can you provide the exact curl (or request body) request which is giving you error.
0 -
Hello, this is a request which gave me a error.
I call API from firebase cloud functions (node.js).const response = await fetch("https://api.daily.co/v1/rooms", {
method: 'POST',
headers,
body: JSON.stringify({
properties: {
enable_recording: 'cloud',
geo: 'ap-northeast-2',
streaming_endpoints: [
{
name: "hls_s3",
type: "hls",
hls_config: {
save_hls_recording: true,
storage: {
bucket_name: "my bucket name",
bucket_region: "aws region",
assume_role_arn: "arn:aws:iam::555555555555:role/DailyS3AccessRole",
path: "recordings"
},
variant: [
{
width: 1920,
height: 1080,
fps: 30,
bitrate: 3500,
iframe_only: false
},
{
width: 1280,
height: 720,
fps: 30,
bitrate: 2500,
iframe_only: false
},
{
width: 640,
height: 360,
fps: 30,
bitrate: 780,
iframe_only: true
}
],
},
}
],
},
}),
});headers include
const headers = { 'Content-Type': 'application/json', Authorization: `Bearer ${process.env.DAILY_API_KEY}`, };
Without variant key settings, this code worked fine.
Any suggestions ?
0