Skip to content

Commit

Permalink
add voicetrack settings to alert remote.php output
Browse files Browse the repository at this point in the history
  • Loading branch information
hinanaya committed Jun 6, 2024
1 parent 6136eb5 commit 9b6a78d
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions remote.php
Original file line number Diff line number Diff line change
Expand Up @@ -1062,6 +1062,19 @@ private function emergency()
$broadcastxml->addChild('location', $mediaInfo['file_location']);
$broadcastxml->addChild('archived', $mediaInfo['is_archived']);
$broadcastxml->addChild('approved', $mediaInfo['is_approved']);
$broadcastxml->addChild('mode', $broadcast['mode']);

// get voicetrack properties if that mode is set
if ($broadcast['mode'] === 'voicetrack') {
$voicetrackxml = $broadcastxml->addChild('voicetrack_settings');

$properties = json_decode($broadcast['properties'], true);

$voicetrackxml->addChild('volume', $properties['voicetrack_volume']);
$voicetrackxml->addChild('delay', $properties['voicetrack_offset']);
$voicetrackxml->addChild('fadeout_before', $properties['voicetrack_fadeout_before']);
$voicetrackxml->addChild('fadein_after', $properties['voicetrack_fadein_after']);
}
}
}

Expand Down

0 comments on commit 9b6a78d

Please sign in to comment.