Don't render empty cues
This commit is contained in:
parent
ebe9ae6b13
commit
8a7d68da6c
@ -135,6 +135,11 @@ import android.util.Log;
|
|||||||
*/
|
*/
|
||||||
public void draw(Cue cue, CaptionStyleCompat style, float fontScale, Canvas canvas,
|
public void draw(Cue cue, CaptionStyleCompat style, float fontScale, Canvas canvas,
|
||||||
int cueBoxLeft, int cueBoxTop, int cueBoxRight, int cueBoxBottom) {
|
int cueBoxLeft, int cueBoxTop, int cueBoxRight, int cueBoxBottom) {
|
||||||
|
if (TextUtils.isEmpty(cue.text)) {
|
||||||
|
// Nothing to draw;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (TextUtils.equals(cueText, cue.text)
|
if (TextUtils.equals(cueText, cue.text)
|
||||||
&& cuePosition == cue.position
|
&& cuePosition == cue.position
|
||||||
&& Util.areEqual(cueAlignment, cue.alignment)
|
&& Util.areEqual(cueAlignment, cue.alignment)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user