mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-22 08:11:52 +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. Built from https://develop.svn.wordpress.org/trunk@50256 git-svn-id: http://core.svn.wordpress.org/trunk@49901 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
219d92f75b
commit
b981f48184
@ -4532,6 +4532,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' );
|
||||
|
||||
|
2
wp-includes/js/media-views.min.js
vendored
2
wp-includes/js/media-views.min.js
vendored
File diff suppressed because one or more lines are too long
@ -13,7 +13,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.7-beta1-50255';
|
||||
$wp_version = '5.7-beta1-50256';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user