mirror of
https://github.com/samsonjs/media.git
synced 2026-03-26 09:35:47 +00:00
Add default to switch in TtmlDecoder
Also de-dupe a couple of case statements PiperOrigin-RevId: 290610993
This commit is contained in:
parent
9cfc75ff8a
commit
04d325331b
1 changed files with 3 additions and 4 deletions
|
|
@ -488,20 +488,19 @@ public final class TtmlDecoder extends SimpleSubtitleDecoder {
|
|||
case TtmlNode.ATTR_TTS_TEXT_ALIGN:
|
||||
switch (Util.toLowerInvariant(attributeValue)) {
|
||||
case TtmlNode.LEFT:
|
||||
style = createIfNull(style).setTextAlign(Layout.Alignment.ALIGN_NORMAL);
|
||||
break;
|
||||
case TtmlNode.START:
|
||||
style = createIfNull(style).setTextAlign(Layout.Alignment.ALIGN_NORMAL);
|
||||
break;
|
||||
case TtmlNode.RIGHT:
|
||||
style = createIfNull(style).setTextAlign(Layout.Alignment.ALIGN_OPPOSITE);
|
||||
break;
|
||||
case TtmlNode.END:
|
||||
style = createIfNull(style).setTextAlign(Layout.Alignment.ALIGN_OPPOSITE);
|
||||
break;
|
||||
case TtmlNode.CENTER:
|
||||
style = createIfNull(style).setTextAlign(Layout.Alignment.ALIGN_CENTER);
|
||||
break;
|
||||
default:
|
||||
// ignore
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case TtmlNode.ATTR_TTS_TEXT_DECORATION:
|
||||
|
|
|
|||
Loading…
Reference in a new issue