= $this->extend('episode/_layout-preview') ?>
= $this->section('content') ?>
= lang('Episode.download_transcript', [
'extension' => '.' . $transcript->file_extension,
]) ?>
$startTimeFormatted ?? '',
'speaker' => $speakerLabel ?? '',
'text' => $captionTextBlock ?? '',
]);
$captionTextBlock = '';
}
$startTimeFormatted = format_duration($caption['startTime']);
$speakerLabel = $caption['speaker'];
$captionTextBlock .= $captionText;
$previousSpeaker = $speakerLabel;
$renderCue = true;
} else {
// concatenate cues with the same speaker
$captionTextBlock .= ' ' . $captionText;
}
} else {
$startTimeFormatted = isset($caption['startTime']) ? format_duration($caption['startTime']) : '';
echo view('episode/_partials/transcript', [
'startTime' => $startTimeFormatted,
'speaker' => $caption['speaker'] ?? '',
'text' => $captionText ?? '',
]);
}
}
// render last cue if not already rendered
if ($captionTextBlock !== '') {
echo view('episode/_partials/transcript', [
'startTime' => $startTimeFormatted ?? '',
'speaker' => $speakerLabel ?? '',
'text' => $captionTextBlock ?? '',
]);
}
?>
= lang('Episode.no_transcript') ?>
= $this->endSection() ?>