Some comments:
Interface TrackDescription {
attribute octet kind; //In MPEG-2 this might be mapped to Stream_Type
attribute ArrayBuffer data; //optional raw data (e.g. as contained in the MPEG-2 TS elementary stream descriptor)
attribute DOMSTRING text; //Optional text version of the data.
}
In DataCue, we're considering removing .text because it's not very useful. Do we expect it to be useful here?
If we're providing the descriptor data as one big binary section, it seems not that much simpler than just providing the entire PMT.
If we want to just provide descriptors, it seems like it would be better to expose them as a list:
interface Descriptor {
attribute octet tag;
attribute ArrayBuffer value;
}
interface TextTrack {
// existing stuff
attribute Descriptor[]? descriptors;
}
The PMT can change mid-stream though, so a descriptor cue would also be reasonable (but we should obviously do one or the other, not both):
interface DescriptorCue : TextTrackCue {
attribute octet tag;
attribute ArrayBuffer value;
}