mirror of
https://github.com/zoriya/go-astisub.git
synced 2026-08-16 02:33:21 +00:00
support stl justification when converting to webvtt (#35)
This commit is contained in:
+12
-1
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user