Skip to content

Commit

Permalink
fix webvtt field
Browse files Browse the repository at this point in the history
  • Loading branch information
aynsix committed May 14, 2024
1 parent 3891e24 commit b50eb61
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ public function process(array $payload)

if (in_array($payload['databoxId'], $sendVttField)) {
foreach ($databox->get_meta_structure() as $meta) {
if (1 === preg_match('#^VideoTextTrack([a-z]{2}(?:[-_]\w+)?)#i', $meta->get_name(), $matches) && $caption->has_field($meta->get_name())) {
if (1 === preg_match('#^VideoTextTrack([a-z]{2}(?:[-_]\w+)?)$#i', trim($meta->get_name()), $matches) && $caption->has_field($meta->get_name())) {
// retrieve value for the corresponding field
$fieldValues = $record->get_caption()->get_field($meta->get_name())->get_values();
$fieldValue = array_pop($fieldValues);
Expand Down

0 comments on commit b50eb61

Please sign in to comment.