Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support vtt regions #6694

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Conversation

gkatsev
Copy link
Member

@gkatsev gkatsev commented Jun 6, 2020

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

@gkatsev gkatsev mentioned this pull request Jun 6, 2020
5 tasks
@@ -243,7 +243,7 @@ class TextTrackDisplay extends Component {
const tracks = this.player_.textTracks();
const allowMultipleShowingTracks = this.options_.allowMultipleShowingTracks;

this.clearDisplay();
// this.clearDisplay();
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably should do this in a backwards compatible way, so, if someone is using an older vttjs, captions don't just accumulate.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@stale
Copy link

stale bot commented Aug 8, 2020

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.

@stale stale bot added the outdated Things closed automatically by stalebot label Aug 8, 2020
@gkatsev gkatsev added pinned Things that stalebot shouldn't close automatically and removed outdated Things closed automatically by stalebot labels Aug 8, 2020
@gkatsev gkatsev changed the base branch from master to main October 7, 2020 20:48
@@ -290,6 +288,8 @@ class TextTrackDisplay extends Component {
this.setAttribute('aria-live', 'assertive');
}
this.updateForTrack(descriptionsTrack);
} else {
this.clearDisplay();
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@misteroneill misteroneill added the minor This PR can be added to a minor release. It should not be added to a patch release. label May 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
minor This PR can be added to a minor release. It should not be added to a patch release. needs: updates pinned Things that stalebot shouldn't close automatically
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants