ttml

package
v0.16.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 27, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TrancodeToSRT

func TrancodeToSRT(dst io.Writer, src io.Reader) (int64, error)

Types

type Caption

type Caption int

func (*Caption) UnmarshalText

func (c *Caption) UnmarshalText(b []byte) error

type Page

type Page struct {
	Begin TTMLTime `xml:"begin,attr"`
	End   TTMLTime `xml:"end,attr"`
	// Region string   `xml:"region,attr"`
	ID   Caption `xml:"id,attr"`
	Span []struct {
		Text string `xml:",chardata"`
		StyleAttributes
	} `xml:"span"`
}

type StyleAttributes

type StyleAttributes struct {
	// BackgroundColor string `xml:"backgroundColor,attr"`
	// DisplayAlign    string `xml:"displayAlign,attr"`
	// Extent          string `xml:"extent,attr"`
	// FontFamily      string `xml:"fontFamily,attr"`
	// FontSize        string `xml:"fontSize,attr"`
	// Origin          string `xml:"origin,attr"`
	// TextAlign       string `xml:"textAlign,attr"`
	Color string `xml:"color,attr,omitempty"`
}

type TTML

type TTML struct {
	XMLName xml.Name `xml:"tt"`
	Lang    string   `xml:"lang,attr"`
	// Regions []Region `xml:"head>layout>region"`
	// Styles  []Style  `xml:"head>styling>style"`
	Pages []Page `xml:"body>div>p"`
}

func (*TTML) ToSrt

func (tt *TTML) ToSrt(dst io.Writer) error

type TTMLTime

type TTMLTime string

func (*TTMLTime) UnmarshalText

func (t *TTMLTime) UnmarshalText(i []byte) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL