Skip to content

Commit

Permalink
Merge pull request #31 from call-learning/fix-recording-playback-v2
Browse files Browse the repository at this point in the history
Fix array returned by recording playback
  • Loading branch information
andrewnicols authored Feb 23, 2023
2 parents 815ba4e + 76760e1 commit 01d6c3b
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion application/src/Entity/Recording.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,15 @@ public function getRecordingInfo(): array
// Transform playbacks.
if ($playbacks = $this->getPlayback()) {
$formatarray = $playbacks['format'] ?? [];
$recordingInfo['playback'] = $formatarray;
// Backward compatibility here: format can just be an object or an array (sequential).
if (array_keys($formatarray) != array_keys(array_values($formatarray))) {
$recordingInfo['playback'] = $playbacks; // This is an object.
} else {
$recordingInfo['playback'] = (object)[
'forcexmlarraytype' => 'format',
'array' => $formatarray
]; // This should be a sequential array.
}
}
if ($this->getMeeting()->hasSubMeetings()) {
$breakoutRooms = [];
Expand Down

0 comments on commit 01d6c3b

Please sign in to comment.