mirror of
https://github.com/videojs/video.js.git
synced 2025-01-08 07:00:10 +02:00
fix: do a null check for tech when checking if we can toggle mute (#5857)
If the mute toggle checks whether mute can be set before the tech is ready, it may throw an error and cause issues. Instead, add a null check.
This commit is contained in:
parent
c632b24364
commit
d07f97dc94
@ -101,7 +101,7 @@ class MuteToggle extends Button {
|
||||
// in iOS when a player is loaded with muted attribute
|
||||
// and volume is changed with a native mute button
|
||||
// we want to make sure muted state is updated
|
||||
if (browser.IS_IOS) {
|
||||
if (browser.IS_IOS && this.player_.tech_ && this.player_.tech_.el_) {
|
||||
this.player_.muted(this.player_.tech_.el_.muted);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user