support stl justification when converting to webvtt (#35)

This commit is contained in:
David Le Corfec
2021-01-05 12:28:26 +01:00
committed by GitHub
parent 9df47df7fe
commit 010044f333
+12 -1
View File
@@ -246,7 +246,18 @@ type StyleAttributes struct {
func (sa *StyleAttributes) propagateSSAAttributes() {}
func (sa *StyleAttributes) propagateSTLAttributes() {}
func (sa *StyleAttributes) propagateSTLAttributes() {
if sa.STLJustification != nil {
switch *sa.STLJustification {
case JustificationCentered:
// default to middle anyway?
case JustificationRight:
sa.WebVTTAlign = "right"
case JustificationLeft:
sa.WebVTTAlign = "left"
}
}
}
func (sa *StyleAttributes) propagateTeletextAttributes() {
if sa.TeletextColor != nil {