mantas-done / subtitles

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

Added vtt cue settings to internal format #79

Closed vnali closed 1 year ago

vnali commented 1 year ago

This PR is related to https://github.com/mantas-done/subtitles/issues/64

It keeps inline the vtt cue settings in internal_format as $internal_format['vtt_cue_settings'].

when the vtt is created, it checks for $internal_format['vtt_cue_settings'] and attaches it to the end of the vtt time line.

To pass tests and keep the code consistent, there should be additional parameter passed to add() for the vtt cue settings. like ->add(0, 10, 'Hello world.', ['vtt_cue_settings' => 'position:50% line:15% align:middle']) -i used an array which makes it possible for passing extra settings as the 4th param in the future -

mantas-done commented 1 year ago

Merged. Thank you.

vnali commented 1 year ago

Thanks @mantas-done Perhaps the 4th parameter for add() should be mentioned in the document page?

mantas-done commented 1 year ago

Added.