Fix error when closing a playing audio or video modal (#14310)

th-downstream
ThibG 4 years ago committed by GitHub
parent 6391e1e302
commit ddd69f3ae9

@ -298,6 +298,8 @@ class Audio extends React.PureComponent {
_renderCanvas () {
requestAnimationFrame(() => {
if (!this.audio) return;
this.handleTimeUpdate();
this._clear();
this._draw();

@ -182,6 +182,8 @@ class Video extends React.PureComponent {
_updateTime () {
requestAnimationFrame(() => {
if (!this.video) return;
this.handleTimeUpdate();
if (!this.state.paused) {

Loading…
Cancel
Save