mirror of
https://framagit.org/tykayn/mastodon.git
synced 2023-08-25 08:33:12 +02:00
Fix error when closing a playing audio or video modal (#14310)
This commit is contained in:
parent
6f798eb574
commit
bfed7dd5f3
@ -298,6 +298,8 @@ class Audio extends React.PureComponent {
|
|||||||
|
|
||||||
_renderCanvas () {
|
_renderCanvas () {
|
||||||
requestAnimationFrame(() => {
|
requestAnimationFrame(() => {
|
||||||
|
if (!this.audio) return;
|
||||||
|
|
||||||
this.handleTimeUpdate();
|
this.handleTimeUpdate();
|
||||||
this._clear();
|
this._clear();
|
||||||
this._draw();
|
this._draw();
|
||||||
|
@ -182,6 +182,8 @@ class Video extends React.PureComponent {
|
|||||||
|
|
||||||
_updateTime () {
|
_updateTime () {
|
||||||
requestAnimationFrame(() => {
|
requestAnimationFrame(() => {
|
||||||
|
if (!this.video) return;
|
||||||
|
|
||||||
this.handleTimeUpdate();
|
this.handleTimeUpdate();
|
||||||
|
|
||||||
if (!this.state.paused) {
|
if (!this.state.paused) {
|
||||||
|
Loading…
Reference in New Issue
Block a user