Closed Bug 1283417 Opened 8 years ago Closed 8 years ago

[webvtt] the cue doesn't be rendered immediately when its attributes changes

Categories

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

Other Branch
defect

Tracking

()

RESOLVED FIXED
mozilla51
Tracking Status
firefox51 --- fixed

People

(Reporter: alwu, Assigned: alwu)

References

(Blocks 2 open bugs)

Details

Attachments

(2 files)

STR.
1. go to http://people.mozilla.org/~alwu/WebVTT/vttExample.html
2. change the value of line and position by pressing button

Expected.
3. the cue's position would be changed correctly 

Actual.
3. the cue doesn't change its position or move to wrong position.
Depends on: 1281999
Quote from spec, [1]

> When a WebVTT cue whose active flag is set has its writing direction, snap-to-lines flag, line, 
> position, size, text alignment, region, or text change value, then the user agent must empty the text
> track cue display state, and then immediately run the text track’s rules for updating the display of 
> WebVTT text tracks."

[1] https://w3c.github.io/webvtt/#webvtt-cue
FYI, also need to render cues immediately when its css style changes.
https://w3c.github.io/webvtt/#css-extensions
Summary: [webvtt] the cue doesn't be rendered correctly when changing it's line and position → [webvtt] the cue doesn't be rendered immediately when its attributes changes
Component: Audio/Video → Audio/Video: Playback
Mass change P2 -> P3
Priority: P2 → P3
Comment on attachment 8777783 [details]
Bug 1283417 - part1 : implement function to notify cue's display states changed.

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/69242/diff/1-2/
Comment on attachment 8777784 [details]
Bug 1283417 - part2 : notify media element when cue's display states changed.

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/69244/diff/1-2/
Attachment #8777783 - Flags: review?(bechen)
Attachment #8777784 - Flags: review?(bechen)
Comment on attachment 8777784 [details]
Bug 1283417 - part2 : notify media element when cue's display states changed.

https://reviewboard.mozilla.org/r/69244/#review67538

::: dom/media/TextTrackCue.h:327
(Diff revision 3)
> +    if (!mHaveStartedWatcher && aTextTrack) {
> +      mHaveStartedWatcher = true;
> +      mWatchManager.Watch(mReset, &TextTrackCue::NotifyDisplayStatesChanged);
> +    }

It is better to UnWatch it if the aTextTrack is null.
Attachment #8777784 - Flags: review?(bechen) → review+
Comment on attachment 8777783 [details]
Bug 1283417 - part1 : implement function to notify cue's display states changed.

https://reviewboard.mozilla.org/r/69242/#review67540
Attachment #8777783 - Flags: review?(bechen) → review+
Pushed by alwu@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/00dfeaac1814
part1 : implement function to notify cue's display states changed. r=bechen
https://hg.mozilla.org/integration/autoland/rev/b47abe0917b0
part2 : notify media element when cue's display states changed. r=bechen
https://hg.mozilla.org/mozilla-central/rev/00dfeaac1814
https://hg.mozilla.org/mozilla-central/rev/b47abe0917b0
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla51
Blocks: 1327061
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: