TextTrackCues associated in-band tracks live "forever" - until the video element is deleted or reloaded. This is fine for relatively short files, but not so good for long lived files (eg. a very long live stream), or for timed metadata where the "cue" size can be much larger than a text sample. Allow text tracks to opt in to purging cues who's time range does not intersect with the `buffered` range, where audio and video data is also not available. Only AVFoundation backed in-band tracks opt in at this time, because AVFoundation will redeliver cues if a time range is played again.
Created attachment 425882 [details] Patch
rdar://14913419
Comment on attachment 425882 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=425882&action=review r=me with nit: > Source/WebCore/html/track/InbandDataTextTrack.h:48 > + bool purgesCuesFromUnbufferedRanges() const final { return true; } Nit: This confused me on initial reading, which I parsed as "purge cues from unbuffered ranges". Maybe "shouldPurgeCuesFromUnbufferedRanges()"?
Created attachment 425895 [details] Patch for landing
Created attachment 425921 [details] Patch for landing
Created attachment 425982 [details] Patch for landing
Committed r275949 (236509@main): <https://commits.webkit.org/236509@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 425982 [details].