feat: Regions
TODO
- [x] "no scroll:up" support
- [x] clearing the display
- [x] final cue without a new line
- [x] non region cues
- [x] ~better api?~
This PR implements region support. It stays within the framework of the current API, which makes it a bit annoying. I think processCues probably needs a refactor for how it accepts arguments so that more changes can be made to it. The key to making regions work is to realize that region cues should be positioned relatively and not absolutely. There is likely some optimizations that can happen here particularly for inserting multiple cues for example during seeks. In addition, this requires that the display area not be cleared, see https://github.com/videojs/video.js/pull/6694 for usage example.
This still needs a couple of changes, making sure that if scroll:up isn't set, it doesn't scroll but just pops. also, verifying that regular captions are still working fine.
A better API can wait for a complete overhaul.
This is a breaking change since it requires not clearing the display each tick like Video.js has been doing previously.