15:09:59 RRSAgent has joined #me 15:10:03 logging to https://www.w3.org/2025/03/20-me-irc 15:10:03 Zakim has joined #me 15:10:09 present+ Nigel_Megitt_BBC 15:10:15 Meeting: WICG DataCue / TextTrackCue meeting 15:10:17 RobSmith has joined #me 15:10:30 present+ Rob_Smith 15:10:35 present+ Chris_Needham 15:10:46 Chair: Chris 15:10:49 scribe+ cpn 15:10:51 rrsagent, make logs public 15:11:06 Topic: Recap of last meeting 15:11:30 Agenda: https://www.w3.org/events/meetings/a7060850-2ddd-43d6-9c87-a07d061e6f85/ 15:11:41 Chris: Rob walked us through a proposed inheritance tree for TextTrackCue, VTTCue, DataCue 15:11:50 ... All made sense to me 15:12:32 ... We ended at discussing of inhibiting TextTrackCue construction 15:12:52 Topic: TextTrackCue constructor 15:13:07 Nigel: I have a proposal, for what may be a bigger change 15:13:55 Rob: I saw that, feels independent of this. 15:14:27 Chris: Can you explain, Nigel? 15:14:46 -> https://github.com/WICG/datacue/issues/35#issuecomment-2733057771 Comment with alternative inheritance diagram 15:16:14 Nigel: [describes the alternative design] 15:16:56 ... If all you want is the timing behaviour, you can use TrackCue 15:17:55 Rob: Makes sense. It includes some of the elements from my proposal, with different naming. The issue I have is that the root of the problem is TextTrack itself is misnamed 15:18:26 Nigel: True, TrackCue isn't consistent with those other uses 15:18:50 Rob: My thought was to acknlowedge and accept the existing naming 15:20:13 Chris: I tend to agree with that, Rob 15:20:27 Rob: Could call them MetadataTrack 15:21:14 Nigel: The key thing is that they're cues associated with the timeline of a media track 15:21:28 ... This is why I think of TrackCue 15:22:30 Rob: Let's discuss cue differentiation, and prohibiting TextTrackCue construction 15:22:59 Nigel: Is there a use case for preventing construction of TextTrackCue (using current naming) 15:23:47 Rob: I found some more detail in the HTML spec. The key is to differentiate between different types. DataCue is designed to do that, it has a type and value 15:24:01 ... If that existed in HTML spec, we'd be done 15:24:27 ... This proposal is deliberately less of a change - even though DataCue itself is very simple 15:24:52 ... For cue differentiation, an abstract base class requires an extension that can be used for cue type 15:25:11 Nigel: Where does the need to identify the cue type come from? 15:26:07 ... Limiting it to say you must declare a class isn't something we should impose in everyone 15:26:20 Rob: But you otherwise don't know the type 15:26:47 Nigel: But some use cases don't need a type... 15:28:21 Rob: An example, the existing design is an abstract base class, so it's not a change. 15:29:19 .... I considered a use case with no payload, so TextTrackCue instantiated. Is there a use case for that? A video camera monitoring vehicle arrivals in a car park, using cue-enter and cue-exit 15:29:41 ... You need to identify individual vehicles 15:30:05 ... Requires no payload. With just startTime, endTime, id, we can monitor the vehicles 15:30:44 ... There's a family of such use cases. Another is people entering/exiting a venue 15:31:12 ... Combine them, and now you have two sorts of cue in the same track 15:31:37 Nigel: Can do it by having different enter and exit handlers. 15:31:49 Rob: True, if you control the cue creation 15:32:20 ... Cue lifecycle is in two parts: creation and activation 15:33:05 ... In creation, we need to potentially load a cue class, then create a cue instance with times and id. Then add event listeners, optionally. Then add the cue to a track 15:33:33 ... In the activation phase, a cue event is triggered by the browser, handled by the web app's event handler 15:34:05 ... In an out of band use case, the creation steps and the handlers are in the app code. In that case, you don't need to discriminate the types of cue 15:34:27 ... If you've created the Track in the app code, it's private and will only have the cues you created 15:34:56 ... If the Track is created by the browser by a element, is can be seen by other apps, so they can put their own cues on it 15:35:15 ... onchange event associated with the Track, which sees any kind of cues 15:35:47 Nigel: In that case where you have a element, the browser parses the data and creates the cues on the track 15:36:17 ... The ones you make, you control the event handlers. The ones you don't create have their own handlers 15:36:30 Rob: This is the onchange event on the Track 15:36:54 Nigel: So you want to write an onchange handler that can handle the cues you created and the ones you didnt 15:37:42 ... Strategy might be to add an attribute, or to add a subclass. Both are valid things to do. So why force everyone to subclass? 15:38:12 Rob: You need to know the type is unique 15:38:41 ... If you add an attribute instead, how do you know if the other cues don't also have that attribute 15:39:16 Nigel: Could be useful to have that, so others can integrate with my code 15:39:42 Rob: Risk of not being able to discriminate 15:45:03 Chris: XX 15:47:11 Nigel: You're saying if something meets the runtime interface, it'll be accepted. And the other part it's up to the app developer to ensure that their code integrates well with any third party libraries they're using 15:47:32 ... You also said you can have multiple TextTracks, and each handles it's own kinds of cues 15:48:41 Chris: How does map to TextTrack instances? 15:49:02 Rob: HTMLTrackElement has a TextTrack in it. And you can all addTextTrack on a media element to create a track 15:49:48 Nigel: You can give it a different 'kind' attrbute, but he only source document type it'll parse is WebVTT. The browser would create a TextTrackCues with VTTCue in it 15:50:47 Chris: You can have multiple elements with WebVTT files 15:51:02 Nigel: For multiple languages, MDN has a good example 15:53:18 Chris: How to add enter/exit events to individual cues when using ? 15:53:50 Nigel: You can iterate through the cues, but not sure when you'd do that before the media plays 15:54:11 Nigel: The Sourcing In-band Tracks document may talk about that 15:55:16 Rob: In-band events is another case. The creation steps are handled by the browser, but unsure where the activation steps happen - browser could listen to its own events 15:56:04 Nigel: VTTCue, a video with 608 subtitles, the browser parser constructs VTTCues. Then it's standard VTT handling 15:56:50 ... But what if you have other in-band events? 15:57:09 Chris: Webkit does this, creates DataCues, but I assume they go on their own TextTrack 15:59:13 Chris: For VTTCue, the browser will always do the rendering. You can add enter/exit handlers to do additional things, but that doesn't replace the default behaviour 16:00:32 Nigel: TextTrack has inBandMetadataDispatchType property. Not widely implemented 16:01:14 Nigel: You may want an event when a cue is added or removed to a TextTrack 16:01:48 ... This seems missing, but that's separate to today's discussion 16:02:26 Rob: HTML talks about timed data 16:03:02 https://html.spec.whatwg.org/multipage/media.html#guidelines-for-exposing-cues-in-various-formats-as-text-track-cues 16:03:46 Rob: This talks about unspecified / unknown formats that need to be mapped to a TextTrackCue. It sets defaults for id and pauseOnExit flag 16:04:06 ... cue identifiers are optional, but should be there if you need them 16:06:05 Nigel: The terms "in band" and "out of band" are very context dependent, whether in MP4 files, or the blanking in the video, or DASH manifest 16:08:34 -> https://dev.w3.org/html5/html-sourcing-inband-tracks/ Sourcing in-band Media Resource Tracks from Media Containers into HTML 16:09:01 Chris: This is a part of HTML spec that is murky, unclear what's interoperably implemented, and ideally would be tidied up 16:11:23 Chris: Are we concluding we don't need to prevent TextTrackCue construction? 16:11:47 Nigel: There are all the levers you need, to be able to discriminate types of cues. 16:12:36 Rob: The problem I see is the type of cue is undefined. DataCue adds a type label in a specified place 16:27:17 Rob: There's another issue that unbounded TextTrackCue isn't implemented 16:27:53 .... I also notice the TextTrackCue onenter / onexit events WPT tests are failing 16:28:34 Chris: So I suggest we update the proposal to allow TextTrackCue construction, then we can discuss with Eric 16:31:01 s/XX/[explains how today's API design allows supports the use cases]/ 16:31:07 rrsagent, draft minutes 16:31:09 I have made the request to generate https://www.w3.org/2025/03/20-me-minutes.html cpn 16:45:41 rrsagent, make log public 17:16:44 Zakim has left #me