mirror of
https://github.com/androidx/media.git
synced 2025-04-30 06:46:50 +08:00

[Problem] As the alignment of each lineas are calculated individually, the artificially introduced CENTER and RIGHT alignments can be mixed with each other and with the default LEFT alignment. The mixed results look worse than just using the original DEFAULT, and the readability is radically decreased. [Solution] Pre-calculate the alignment for each line, and use the leftmost of them for all lines. The intention of caption provider could be different, but the worst case scenario is that we revert back everything to LEFT alignment that is the only option in the CEA608 standard so we show everything at the exact location it is set in the content. The readability is never worse than the one given by the content provider. [Test] This should influence CEA608 pop-up cations only. (Not roll up). Test various live channels with this change. Note: Beginning of commercials tend to have PAINT-ON mode as that is immediately showing incoming characters, not just at the end of the line like POP-on mode.