Make WordPress Core

Opened 11 months ago

Last modified 4 weeks ago

#48562 assigned defect (bug)

Audio keeps playing on closing media/attachment details popup in WP Admin

Reported by: amolv Owned by: antpb
Milestone: Future Release Priority: normal
Severity: normal Version:
Component: Media Keywords: has-patch
Focuses: Cc:



Click on audio file, it opens audio in Media Popup, play audio, if we click on next attachment/media audio stops playing but if we just close "Attachment Details" popup audio keeps playing in the background.

Attachments (1)

48562.1.patch (733 bytes) - added by Mista-Flo 7 weeks ago.

Download all attachments as: .zip

Change History (10)

This ticket was mentioned in Slack in #core-media by antpb. View the logs.

11 months ago

#2 @antpb
11 months ago

  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to Future Release
  • Owner set to antpb
  • Status changed from new to assigned

Sure enough, looks like this is happening for me too. :)

This ticket was brought up in the recent Media component meeting. Just to clarify reproduction steps, be sure to be in grid view of the Media Library when selecting the file. Then push play, close, see error.

@afercia mentioned in the meeting that this also existed in 5.2 so is not a regression from the recent 5.3 release.

Thanks for reporting this @amolv !

#3 @afercia
11 months ago

Looks like this happens for videos as well :)

#4 @Mista-Flo
7 weeks ago

I can reproduce as well, it's hard to know where is it configured in the code

7 weeks ago

#5 @Mista-Flo
7 weeks ago

  • Keywords has-patch added; needs-patch removed

All right, so I finally ended up finding the code.

I have uploaded a patch that works, but I'm not sure about what I do exactly, so it might be a 'bad fix'.

I saw that when switching to the next attachment in the modal, it stops the audio/video. So I looked at the code, and I saw that it fires a refresh event. This refresh event call the rerender function which do some stuff in the background that stops the audio. So I fired that event in the close event as well and it worked.

#6 @justinahinon
7 weeks ago

48562.1.patch is fine and fixes the issue both for audios and videos files.

Last edited 7 weeks ago by justinahinon (previous) (diff)

This ticket was mentioned in Slack in #core-media by florian-tiar. View the logs.

7 weeks ago

This ticket was mentioned in Slack in #core-media by antpb. View the logs.

6 weeks ago

This ticket was mentioned in Slack in #core-media by antpb. View the logs.

4 weeks ago

Note: See TracTickets for help on using tickets.