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
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
don't clear display
  • Loading branch information
gkatsev committed Oct 6, 2020
commit 3857a02b0aa020e905ec141dc7c51ea065b3d15e
2 changes: 1 addition & 1 deletion src/js/tracks/text-track-display.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.


if (allowMultipleShowingTracks) {
const showingTracks = [];
Expand Down