WebVttRenderer: allow BOM at beginning of a WebVTT file.

This is part of the spec.

Change-Id: I61ccc259c0b9d3a2bc4273925665d107b0c89c62
Signed-off-by: Lajos Molnar <lajos@google.com>
Bug: 10900755
This commit is contained in:
Lajos Molnar
2013-09-24 09:35:47 -07:00
parent db93e1d79e
commit 283fe37aa2

View File

@@ -690,6 +690,9 @@ class WebVttParser {
final private Phase mParseStart = new Phase() { // 5-9
@Override
public void parse(String line) {
if (line.startsWith("\ufeff")) {
line = line.substring(1);
}
if (!line.equals("WEBVTT") &&
!line.startsWith("WEBVTT ") &&
!line.startsWith("WEBVTT\t")) {