WordPress/wp-admin/js/widgets/media-audio-widget.min.js
Aaron Jorbin 0e21d32900 Build/Test: Bump devDependencies for WordPress 5.3
This upgrades a number of devDependencies.  Some of these include changes to how the tasks are configured.

Uglify: There are deprecated options from 2.x to 4.x, see: https://github.com/gruntjs/grunt-contrib-uglify#options

Autoprefixer: Browserslist now warns when passing in the browser list, so that is put into package.json

As with most changes to uglify, this changes every minified JS file.

Fixes #48203.



Built from https://develop.svn.wordpress.org/trunk@46408


git-svn-id: http://core.svn.wordpress.org/trunk@46206 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-10-05 19:49:10 +00:00

1 line
1.4 KiB
JavaScript

!function(d){"use strict";var e,t,i;i=wp.media.view.MediaFrame.AudioDetails.extend({createStates:function(){this.states.add([new wp.media.controller.AudioDetails({media:this.media}),new wp.media.controller.MediaLibrary({type:"audio",id:"add-audio-source",title:wp.media.view.l10n.audioAddSourceTitle,toolbar:"add-audio-source",media:this.media,menu:!1})])}}),e=d.MediaWidgetModel.extend({}),t=d.MediaWidgetControl.extend({showDisplaySettings:!1,mapModelToMediaFrameProps:function(e){var t;return(t=d.MediaWidgetControl.prototype.mapModelToMediaFrameProps.call(this,e)).link="embed",t},renderPreview:function(){var e,t,d,a,i=this;d=i.model.get("attachment_id"),a=i.model.get("url"),(d||a)&&(e=i.$el.find(".media-widget-preview"),t=wp.template("wp-media-widget-audio-preview"),e.html(t({model:{attachment_id:i.model.get("attachment_id"),src:a},error:i.model.get("error")})),wp.mediaelement.initialize())},editMedia:function(){var e,t,d,a=this;t=a.mapModelToMediaFrameProps(a.model.toJSON()),e=new i({frame:"audio",state:"audio-details",metadata:t}),(wp.media.frame=e).$el.addClass("media-widget"),d=function(e){a.selectedAttachment.set(e),a.model.set(_.extend(a.model.defaults(),a.mapMediaToModelProps(e),{error:!1}))},e.state("audio-details").on("update",d),e.state("replace-audio").on("replace",d),e.on("close",function(){e.detach()}),e.open()}}),d.controlConstructors.media_audio=t,d.modelConstructors.media_audio=e}(wp.mediaWidgets);