mantas-done / subtitles

Subtitle/caption converter
https://gotranscript.com/subtitle-converter
MIT License
143 stars 50 forks source link

strict mode example #91

Closed Brandon689 closed 7 months ago

Brandon689 commented 7 months ago
Subtitles::convert($input, $output, ['strict' => false]);
Subtitles::loadFromString($string, ['strict' => false]);
Subtitles::loadFromFile($input, ['strict' => false]);

Why do you use this array form, it will not work like this, instead:

Subtitles::convert($input, $output, false);
Subtitles::loadFromString($string, false);
Subtitles::loadFromFile($input, false);
mantas-done commented 7 months ago

Third parameter accepts other parameters also, like:

Subtitles::convert('subtitles1', 'subtitles2', ['output_format' => 'vtt']);