Fix 'this' while switching subtitle tracks (#2441)
When you switch a subtitle track you'll get `TypeError: Cannot read properties of undefined (reading 'ui')` in `captions.js`'s `captions.setup`, Because `captions.setup` is being called without proper `this` binding.
This commit is contained in:
parent
b7953ff0fc
commit
ba67920025
@ -958,7 +958,7 @@ class Plyr {
|
||||
*/
|
||||
set currentTrack(input) {
|
||||
captions.set.call(this, input, false);
|
||||
captions.setup();
|
||||
captions.setup.call(this);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user