Closed lokeshmukeriya closed 1 year ago
(I can only speak for .vtt) the current implementation only handle time and do not handle anything else, so probably not possible..
Also, Load subtitles from a string do not work for me I have tried the code below.
$vttSubtitle ="";
foreach ($param['captions'] as $caption) {
$vttSubtitle .= "$caption->startTime / 1000 --> $caption->endTime $caption->mediaPosition\n$caption->$textColumn\n\n";
}
$subtitles = Subtitles::load($vttSubtitle, 'vtt');
$data = $subtitles->content('vtt');
Now styles can be added.
$subtitles->add(0, 5, 'text', ['vtt_cue_settings' => 'position:50% line:15% align:middle']);
$subtitles->add() except only 3 arguments startTime,andTime, and titileText. I want to create file like this