diff -r 48c4eec2b7e6 -r 8c2e4d02f4ef wp/wp-includes/js/media-audiovideo.js --- a/wp/wp-includes/js/media-audiovideo.js Fri Sep 05 18:40:08 2025 +0200 +++ b/wp/wp-includes/js/media-audiovideo.js Fri Sep 05 18:52:52 2025 +0200 @@ -1,180 +1,6 @@ /******/ (() => { // webpackBootstrap /******/ var __webpack_modules__ = ({ -/***/ 1206: -/***/ ((module) => { - -var State = wp.media.controller.State, - l10n = wp.media.view.l10n, - AudioDetails; - -/** - * wp.media.controller.AudioDetails - * - * The controller for the Audio Details state - * - * @memberOf wp.media.controller - * - * @class - * @augments wp.media.controller.State - * @augments Backbone.Model - */ -AudioDetails = State.extend(/** @lends wp.media.controller.AudioDetails.prototype */{ - defaults: { - id: 'audio-details', - toolbar: 'audio-details', - title: l10n.audioDetailsTitle, - content: 'audio-details', - menu: 'audio-details', - router: false, - priority: 60 - }, - - initialize: function( options ) { - this.media = options.media; - State.prototype.initialize.apply( this, arguments ); - } -}); - -module.exports = AudioDetails; - - -/***/ }), - -/***/ 5039: -/***/ ((module) => { - -/** - * wp.media.controller.VideoDetails - * - * The controller for the Video Details state - * - * @memberOf wp.media.controller - * - * @class - * @augments wp.media.controller.State - * @augments Backbone.Model - */ -var State = wp.media.controller.State, - l10n = wp.media.view.l10n, - VideoDetails; - -VideoDetails = State.extend(/** @lends wp.media.controller.VideoDetails.prototype */{ - defaults: { - id: 'video-details', - toolbar: 'video-details', - title: l10n.videoDetailsTitle, - content: 'video-details', - menu: 'video-details', - router: false, - priority: 60 - }, - - initialize: function( options ) { - this.media = options.media; - State.prototype.initialize.apply( this, arguments ); - } -}); - -module.exports = VideoDetails; - - -/***/ }), - -/***/ 241: -/***/ ((module) => { - -/** - * wp.media.model.PostMedia - * - * Shared model class for audio and video. Updates the model after - * "Add Audio|Video Source" and "Replace Audio|Video" states return - * - * @memberOf wp.media.model - * - * @class - * @augments Backbone.Model - */ -var PostMedia = Backbone.Model.extend(/** @lends wp.media.model.PostMedia.prototype */{ - initialize: function() { - this.attachment = false; - }, - - setSource: function( attachment ) { - this.attachment = attachment; - this.extension = attachment.get( 'filename' ).split('.').pop(); - - if ( this.get( 'src' ) && this.extension === this.get( 'src' ).split('.').pop() ) { - this.unset( 'src' ); - } - - if ( _.contains( wp.media.view.settings.embedExts, this.extension ) ) { - this.set( this.extension, this.attachment.get( 'url' ) ); - } else { - this.unset( this.extension ); - } - }, - - changeAttachment: function( attachment ) { - this.setSource( attachment ); - - this.unset( 'src' ); - _.each( _.without( wp.media.view.settings.embedExts, this.extension ), function( ext ) { - this.unset( ext ); - }, this ); - } -}); - -module.exports = PostMedia; - - -/***/ }), - -/***/ 3713: -/***/ ((module) => { - -var MediaDetails = wp.media.view.MediaDetails, - AudioDetails; - -/** - * wp.media.view.AudioDetails - * - * @memberOf wp.media.view - * - * @class - * @augments wp.media.view.MediaDetails - * @augments wp.media.view.Settings.AttachmentDisplay - * @augments wp.media.view.Settings - * @augments wp.media.View - * @augments wp.Backbone.View - * @augments Backbone.View - */ -AudioDetails = MediaDetails.extend(/** @lends wp.media.view.AudioDetails.prototype */{ - className: 'audio-details', - template: wp.template('audio-details'), - - setMedia: function() { - var audio = this.$('.wp-audio-shortcode'); - - if ( audio.find( 'source' ).length ) { - if ( audio.is(':hidden') ) { - audio.show(); - } - this.media = MediaDetails.prepareSrc( audio.get(0) ); - } else { - audio.hide(); - this.media = false; - } - - return this; - } -}); - -module.exports = AudioDetails; - - -/***/ }), - /***/ 175: /***/ ((module) => { @@ -258,6 +84,55 @@ /***/ }), +/***/ 241: +/***/ ((module) => { + +/** + * wp.media.model.PostMedia + * + * Shared model class for audio and video. Updates the model after + * "Add Audio|Video Source" and "Replace Audio|Video" states return + * + * @memberOf wp.media.model + * + * @class + * @augments Backbone.Model + */ +var PostMedia = Backbone.Model.extend(/** @lends wp.media.model.PostMedia.prototype */{ + initialize: function() { + this.attachment = false; + }, + + setSource: function( attachment ) { + this.attachment = attachment; + this.extension = attachment.get( 'filename' ).split('.').pop(); + + if ( this.get( 'src' ) && this.extension === this.get( 'src' ).split('.').pop() ) { + this.unset( 'src' ); + } + + if ( _.contains( wp.media.view.settings.embedExts, this.extension ) ) { + this.set( this.extension, this.attachment.get( 'url' ) ); + } else { + this.unset( this.extension ); + } + }, + + changeAttachment: function( attachment ) { + this.setSource( attachment ); + + this.unset( 'src' ); + _.each( _.without( wp.media.view.settings.embedExts, this.extension ), function( ext ) { + this.unset( ext ); + }, this ); + } +}); + +module.exports = PostMedia; + + +/***/ }), + /***/ 741: /***/ ((module) => { @@ -395,6 +270,181 @@ /***/ }), +/***/ 1206: +/***/ ((module) => { + +var State = wp.media.controller.State, + l10n = wp.media.view.l10n, + AudioDetails; + +/** + * wp.media.controller.AudioDetails + * + * The controller for the Audio Details state + * + * @memberOf wp.media.controller + * + * @class + * @augments wp.media.controller.State + * @augments Backbone.Model + */ +AudioDetails = State.extend(/** @lends wp.media.controller.AudioDetails.prototype */{ + defaults: { + id: 'audio-details', + toolbar: 'audio-details', + title: l10n.audioDetailsTitle, + content: 'audio-details', + menu: 'audio-details', + router: false, + priority: 60 + }, + + initialize: function( options ) { + this.media = options.media; + State.prototype.initialize.apply( this, arguments ); + } +}); + +module.exports = AudioDetails; + + +/***/ }), + +/***/ 3713: +/***/ ((module) => { + +var MediaDetails = wp.media.view.MediaDetails, + AudioDetails; + +/** + * wp.media.view.AudioDetails + * + * @memberOf wp.media.view + * + * @class + * @augments wp.media.view.MediaDetails + * @augments wp.media.view.Settings.AttachmentDisplay + * @augments wp.media.view.Settings + * @augments wp.media.View + * @augments wp.Backbone.View + * @augments Backbone.View + */ +AudioDetails = MediaDetails.extend(/** @lends wp.media.view.AudioDetails.prototype */{ + className: 'audio-details', + template: wp.template('audio-details'), + + setMedia: function() { + var audio = this.$('.wp-audio-shortcode'); + + if ( audio.find( 'source' ).length ) { + if ( audio.is(':hidden') ) { + audio.show(); + } + this.media = MediaDetails.prepareSrc( audio.get(0) ); + } else { + audio.hide(); + this.media = false; + } + + return this; + } +}); + +module.exports = AudioDetails; + + +/***/ }), + +/***/ 5039: +/***/ ((module) => { + +/** + * wp.media.controller.VideoDetails + * + * The controller for the Video Details state + * + * @memberOf wp.media.controller + * + * @class + * @augments wp.media.controller.State + * @augments Backbone.Model + */ +var State = wp.media.controller.State, + l10n = wp.media.view.l10n, + VideoDetails; + +VideoDetails = State.extend(/** @lends wp.media.controller.VideoDetails.prototype */{ + defaults: { + id: 'video-details', + toolbar: 'video-details', + title: l10n.videoDetailsTitle, + content: 'video-details', + menu: 'video-details', + router: false, + priority: 60 + }, + + initialize: function( options ) { + this.media = options.media; + State.prototype.initialize.apply( this, arguments ); + } +}); + +module.exports = VideoDetails; + + +/***/ }), + +/***/ 5836: +/***/ ((module) => { + +var MediaDetails = wp.media.view.MediaDetails, + VideoDetails; + +/** + * wp.media.view.VideoDetails + * + * @memberOf wp.media.view + * + * @class + * @augments wp.media.view.MediaDetails + * @augments wp.media.view.Settings.AttachmentDisplay + * @augments wp.media.view.Settings + * @augments wp.media.View + * @augments wp.Backbone.View + * @augments Backbone.View + */ +VideoDetails = MediaDetails.extend(/** @lends wp.media.view.VideoDetails.prototype */{ + className: 'video-details', + template: wp.template('video-details'), + + setMedia: function() { + var video = this.$('.wp-video-shortcode'); + + if ( video.find( 'source' ).length ) { + if ( video.is(':hidden') ) { + video.show(); + } + + if ( ! video.hasClass( 'youtube-video' ) && ! video.hasClass( 'vimeo-video' ) ) { + this.media = MediaDetails.prepareSrc( video.get(0) ); + } else { + this.media = video.get(0); + } + } else { + video.hide(); + this.media = false; + } + + return this; + } +}); + +module.exports = VideoDetails; + + +/***/ }), + /***/ 8646: /***/ ((module) => { @@ -711,56 +761,6 @@ module.exports = MediaDetails; -/***/ }), - -/***/ 5836: -/***/ ((module) => { - -var MediaDetails = wp.media.view.MediaDetails, - VideoDetails; - -/** - * wp.media.view.VideoDetails - * - * @memberOf wp.media.view - * - * @class - * @augments wp.media.view.MediaDetails - * @augments wp.media.view.Settings.AttachmentDisplay - * @augments wp.media.view.Settings - * @augments wp.media.View - * @augments wp.Backbone.View - * @augments Backbone.View - */ -VideoDetails = MediaDetails.extend(/** @lends wp.media.view.VideoDetails.prototype */{ - className: 'video-details', - template: wp.template('video-details'), - - setMedia: function() { - var video = this.$('.wp-video-shortcode'); - - if ( video.find( 'source' ).length ) { - if ( video.is(':hidden') ) { - video.show(); - } - - if ( ! video.hasClass( 'youtube-video' ) && ! video.hasClass( 'vimeo-video' ) ) { - this.media = MediaDetails.prepareSrc( video.get(0) ); - } else { - this.media = video.get(0); - } - } else { - video.hide(); - this.media = false; - } - - return this; - } -}); - -module.exports = VideoDetails; - - /***/ }) /******/ }); @@ -790,9 +790,6 @@ /******/ } /******/ /************************************************************************/ -var __webpack_exports__ = {}; -// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk. -(() => { /** * @output wp-includes/js/media-audiovideo.js */ @@ -1078,7 +1075,5 @@ media.view.AudioDetails = __webpack_require__( 3713 ); media.view.VideoDetails = __webpack_require__( 5836 ); -})(); - /******/ })() ; \ No newline at end of file