Skip to content
Snippets Groups Projects
Unverified Commit bfed7dd5 authored by ThibG's avatar ThibG Committed by GitHub
Browse files

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

parent 6f798eb5
No related branches found
No related tags found
No related merge requests found
......@@ -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) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment