This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 14105 - <track> Drop MutableTextTrack and make TextTrack always mutable
Summary: <track> Drop MutableTextTrack and make TextTrack always mutable
Status: RESOLVED FIXED
Alias: None
Product: HTML WG
Classification: Unclassified
Component: HTML5 spec (show other bugs)
Version: unspecified
Hardware: Other other
: P3 blocker
Target Milestone: ---
Assignee: Ian 'Hixie' Hickson
QA Contact: HTML WG Bugzilla archive list
URL: http://www.whatwg.org/specs/web-apps/...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-11 15:30 UTC by contributor
Modified: 2011-10-20 06:20 UTC (History)
11 users (show)

See Also:


Attachments

Description contributor 2011-09-11 15:30:43 UTC
Specification: http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html
Multipage: http://www.whatwg.org/C#text-track-api
Complete: http://www.whatwg.org/c#text-track-api

Comment:
Drop MutableTextTrack and make TextTrack always mutable

Posted from: 24.103.99.21
User agent: Opera/9.80 (Windows NT 6.1; U; en) Presto/2.9.168 Version/11.51
Comment 1 Philip Jägenstedt 2011-09-11 15:37:57 UTC
Comments from the Open Video Conference, with implementors of Opera, Firefox, Chrome and Safari discussing WebVTT.

There does not appear to be any good reason why MutableTextTrack exists, AFAWCT it would be simpler and more powerful to let TextTrack be mutable and have the new TrackTrack constructor create a new track. Move addCue and removeCue to TextTrack.

Allowing authors to tweak the cues using scripts without copying them into a new MutableTextTrack would be more natural.
Comment 2 Ian 'Hixie' Hickson 2011-09-14 22:43:16 UTC
The initial idea was to not require that WebVTT parsers create data structures that are mutable, but if nobody is interested in taking that benefit into account I don't mind making all TextTracks mutable.

Should I make Cues more mutable also?
Comment 3 Silvia Pfeiffer 2011-09-15 05:13:37 UTC
(In reply to comment #2)
> The initial idea was to not require that WebVTT parsers create data structures
> that are mutable, but if nobody is interested in taking that benefit into
> account I don't mind making all TextTracks mutable.
> 
> Should I make Cues more mutable also?

As a Web dev, I'd say "yes". But I also know that caption providers will not like it when their copyrighted content is easily change-able. OTOH, copying it to a MutableTextTrack and then making changes is not difficult, so the extra hurdle introduced by having them immutable is small. It's not like you are changing the original resource.
Comment 4 Ian 'Hixie' Hickson 2011-09-15 23:01:46 UTC
The only concern I'm worried about here is whether UA vendors mind them being mutable  as far as I can tell having them mutable is nothing but good for content providers. I don't see a copyright issue as being relevant here.
Comment 5 Silvia Pfeiffer 2011-09-17 15:23:53 UTC
(In reply to comment #4)
> The only concern I'm worried about here is whether UA vendors mind them being
> mutable � as far as I can tell having them mutable is nothing but good for
> content providers. I don't see a copyright issue as being relevant here.

Why would the browsers want the cues to not be mutable?
Comment 6 Ian 'Hixie' Hickson 2011-09-19 22:44:39 UTC
Mutable data structures are significantly more expensive and complicated.
Comment 7 Philip Jägenstedt 2011-09-20 09:46:36 UTC
You'll have to be more specific, because none of the people that are actually implementing this have understood which operations would be more expensive with mutable tracks.
Comment 8 Philip Jägenstedt 2011-09-20 13:34:01 UTC
(In reply to comment #2)

> Should I make Cues more mutable also?

Yes, all currently readonly IDL attributes on TextTrackCue except track should be mutable. I suggest also replacing getCueAsSource with a mutable property that causes the WebVTT cue parser to be re-run.

For any modification, we could spec it to be equivalent to the current MutableTextTrack case, where the old cue is removed and a new cue is inserted.
Comment 9 Ian 'Hixie' Hickson 2011-09-20 20:06:04 UTC
Ok, will make things more mutable.
Comment 10 contributor 2011-10-20 00:48:45 UTC
Checked in as WHATWG revision r6710.
Check-in comment: Fold MutableTextTrack into TextTrack.
http://html5.org/tools/web-apps-tracker?from=6709&to=6710
Comment 11 contributor 2011-10-20 05:54:53 UTC
Checked in as WHATWG revision r6711.
Check-in comment: Make TextTrackCue more mutable.
http://html5.org/tools/web-apps-tracker?from=6710&to=6711
Comment 12 Ian 'Hixie' Hickson 2011-10-20 06:20:27 UTC
EDITOR'S RESPONSE: This is an Editor's Response to your comment. If you are satisfied with this response, please change the state of this bug to CLOSED. If you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document:
   http://dev.w3.org/html5/decision-policy/decision-policy.html

Status: Accepted
Change Description: see diffs given above
Rationale: Concurred with reporter's comments.