feat: support vtt regions#6694
Conversation
| const allowMultipleShowingTracks = this.options_.allowMultipleShowingTracks; | ||
|
|
||
| this.clearDisplay(); | ||
| // this.clearDisplay(); |
There was a problem hiding this comment.
probably should do this in a backwards compatible way, so, if someone is using an older vttjs, captions don't just accumulate.
There was a problem hiding this comment.
Looks like vtt.js already removed old things, so, this was never necessary, really. The addition of the else below with clearDisplay is necessary though for when turning all the captions off.
Thus, this line can be removed and we will be backward and forward compatible.
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
| } | ||
| this.updateForTrack(descriptionsTrack); | ||
| } else { | ||
| this.clearDisplay(); |
There was a problem hiding this comment.
This is necessary to clear the cues whenever we turn off all the captions. This makes it so that this PR is backward and forwards compatible.
This depends on PR videojs/vtt.js#50 and would need a new vttjs release.
The change is fairly simple and stays within the current API constraints of vttjs.
The only change necessary for regions is to not clear the display ourselves but let vttjs handle it now.
TODO