Skip to content

Commit 8b67b9d

Browse files
jaycee-licopybara-github
authored andcommitted
chore: fix that LiveSendRealtimeInputParameters.media is not treated as a list type
PiperOrigin-RevId: 808252678
1 parent da2f89b commit 8b67b9d

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

src/converters/_live_converters.ts

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -949,7 +949,13 @@ export function liveSendRealtimeInputParametersToMldev(
949949

950950
const fromMedia = common.getValueByPath(fromObject, ['media']);
951951
if (fromMedia != null) {
952-
common.setValueByPath(toObject, ['mediaChunks'], t.tBlobs(fromMedia));
952+
let transformedList = t.tBlobs(fromMedia);
953+
if (Array.isArray(transformedList)) {
954+
transformedList = transformedList.map((item) => {
955+
return item;
956+
});
957+
}
958+
common.setValueByPath(toObject, ['mediaChunks'], transformedList);
953959
}
954960

955961
const fromAudio = common.getValueByPath(fromObject, ['audio']);
@@ -2505,7 +2511,13 @@ export function liveSendRealtimeInputParametersToVertex(
25052511

25062512
const fromMedia = common.getValueByPath(fromObject, ['media']);
25072513
if (fromMedia != null) {
2508-
common.setValueByPath(toObject, ['mediaChunks'], t.tBlobs(fromMedia));
2514+
let transformedList = t.tBlobs(fromMedia);
2515+
if (Array.isArray(transformedList)) {
2516+
transformedList = transformedList.map((item) => {
2517+
return item;
2518+
});
2519+
}
2520+
common.setValueByPath(toObject, ['mediaChunks'], transformedList);
25092521
}
25102522

25112523
const fromAudio = common.getValueByPath(fromObject, ['audio']);

0 commit comments

Comments
 (0)