Fixed errors when Plyr instance is destroyed before constructor setTimeout() functions execute. (#2108)
Co-authored-by: Emilis Dambauskas <emilis.dambauskas@mps.fi>
This commit is contained in:
committed by
Sam Potts
parent
d41a90f0dd
commit
f016a367b5
@ -675,7 +675,9 @@ class Plyr {
|
||||
|
||||
// Set media speed
|
||||
setTimeout(() => {
|
||||
this.media.playbackRate = speed;
|
||||
if (this.media) {
|
||||
this.media.playbackRate = speed;
|
||||
}
|
||||
}, 0);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user