mirror of
https://git.kescher.at/CatCatNya/catstodon.git
synced 2024-11-25 17:51:36 +01:00
Fix error when closing a playing audio or video modal (#14310)
This commit is contained in:
parent
6f798eb574
commit
bfed7dd5f3
2 changed files with 4 additions and 0 deletions
|
@ -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…
Reference in a new issue