mirror of
git://develop.git.wordpress.org/
synced 2025-01-18 05:18:42 +01:00
Media: Pause any playing media when closing the the media modal.
Previously, any video or audio playing in the media modal failed to stop playing when the modal was closed. Now we pause the player when the modal is closed. Props adamsilverstein, hellofromTonya, paaljoachim, Mista-Flo, Clorith, justinahinon, afercia, amolv. Fixes #48562. git-svn-id: https://develop.svn.wordpress.org/trunk@50256 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
df0c776d1f
commit
de258c87e6
@ -132,6 +132,9 @@ Modal = wp.media.View.extend(/** @lends wp.media.view.Modal.prototype */{
|
||||
return this;
|
||||
}
|
||||
|
||||
// Pause current audio/video even after closing the modal
|
||||
$( '.mejs-pause button' ).click();
|
||||
|
||||
// Enable page scrolling.
|
||||
$( 'body' ).removeClass( 'modal-open' );
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user