Open Bug 1346700 Opened 7 years ago Updated 2 years ago

[webvtt] Verify the timestamp in cue text.

Categories

(Core :: Audio/Video: Playback, enhancement, P3)

enhancement

Tracking

()

People

(Reporter: bechen, Unassigned)

References

(Depends on 1 open bug, Blocks 1 open bug, )

Details

Attachments

(1 file)

      No description provided.
Comment on attachment 8849925 [details]
Bug 1346700 - When rendering, verify timestamp node is valid or not.

https://reviewboard.mozilla.org/r/122666/#review125300

::: dom/media/webvtt/vtt.jsm:308
(Diff revision 1)
>    };
>  
>    // Parse content into a document fragment.
> -  function parseContent(window, input, bReturnFrag) {
> +  function parseContent(window, cue, bReturnFrag) {
> +    var input = cue.text;
> +    var validTimeRange = {start: cue.startTime, end: cue.endTime};

Nits : use "let"

::: dom/media/webvtt/vtt.jsm:390
(Diff revision 1)
>      }
>  
> +    // Check the input ts against to validTimeRange[] and also update
> +    // validTimeRange.
> +    function isValidTimestamp(ts) {
> +    dump(validTimeRange["start"]  +" " +ts+ " "+validTimeRange["end"] +"\n");

Remove the dump.
Attachment #8849925 - Flags: review?(alwu) → review+

The bug assignee is inactive on Bugzilla, so the assignee is being reset.

Assignee: bechen → nobody
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: