- From: Nigel Megitt via GitHub <sysbot+gh@w3.org>
- Date: Fri, 15 Jun 2018 10:21:01 +0000
- To: public-web-and-tv@w3.org
The data already has some format, so assuming it is not WebVTT, then a requirement to convert it into WebVTT and then use a VTTCue seems like unnecessary work. Overloading VTTCue also feels wrong, given that it is generic data and not text to be presented. From that perspective it looks better to start with a TextTrackCue, or a DataCue subclass, and go from there. If I were designing the interface for DataCue I'd put the payload data into an attribute like `.data` or `.payload` rather than `.text` because it might not be text at all. Having a `.type` in the cue class might work. From an object-oriented design perspective it would be better to identify the type by the class, i.e. subclass DataCue into MyFormatDataCue - if a type query is needed then that would require inspection of the object's class rather than an attribute of the object. Both ways can be made to work. -- GitHub Notification of comment by nigelmegitt Please view or discuss this issue at https://github.com/w3c/me-media-timed-events/issues/2#issuecomment-397579006 using your GitHub account
Received on Friday, 15 June 2018 10:21:03 UTC