From bcd80f922e5488db561cbb990867052eb8959c1f Mon Sep 17 00:00:00 2001 From: Gary Katsevman Date: Tue, 9 Nov 2021 10:17:04 -0500 Subject: [PATCH] fix: don't let the player be translated except captions (#7474) This is another follow-up to #6699. Potentially, it means we could get rid of #6977 --- src/js/player.js | 2 ++ src/js/tracks/text-track-display.js | 1 + 2 files changed, 3 insertions(+) diff --git a/src/js/player.js b/src/js/player.js index dbd76a0ec7..f33ecf4474 100644 --- a/src/js/player.js +++ b/src/js/player.js @@ -803,6 +803,8 @@ class Player extends Component { // if it's been set to something different to the doc this.el_.setAttribute('lang', this.language_); + this.el_.setAttribute('translate', 'no'); + this.el_ = el; return el; diff --git a/src/js/tracks/text-track-display.js b/src/js/tracks/text-track-display.js index 7c691c2ef5..533000c709 100644 --- a/src/js/tracks/text-track-display.js +++ b/src/js/tracks/text-track-display.js @@ -218,6 +218,7 @@ class TextTrackDisplay extends Component { return super.createEl('div', { className: 'vjs-text-track-display' }, { + 'translate': 'yes', 'aria-live': 'off', 'aria-atomic': 'true' });