vtt.js icon indicating copy to clipboard operation
vtt.js copied to clipboard

feat: Regions

Open gkatsev opened this issue 5 years ago • 4 comments

TODO

  • [x] "no scroll:up" support
  • [x] clearing the display
  • [x] final cue without a new line
  • [x] non region cues
  • [x] ~better api?~

gkatsev avatar Jan 10 '20 23:01 gkatsev

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.

gkatsev avatar Jun 06 '20 17:06 gkatsev

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.

gkatsev avatar Jun 06 '20 17:06 gkatsev

A better API can wait for a complete overhaul.

gkatsev avatar Oct 07 '20 21:10 gkatsev

This is a breaking change since it requires not clearing the display each tick like Video.js has been doing previously.

gkatsev avatar Oct 07 '20 21:10 gkatsev