--- a/wp/wp-includes/js/media-audiovideo.js Tue Jun 09 11:14:17 2015 +0000
+++ b/wp/wp-includes/js/media-audiovideo.js Mon Oct 14 17:39:30 2019 +0200
@@ -1,16 +1,94 @@
-(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
-/*globals wp, _ */
+/******/ (function(modules) { // webpackBootstrap
+/******/ // The module cache
+/******/ var installedModules = {};
+/******/
+/******/ // The require function
+/******/ function __webpack_require__(moduleId) {
+/******/
+/******/ // Check if module is in cache
+/******/ if(installedModules[moduleId]) {
+/******/ return installedModules[moduleId].exports;
+/******/ }
+/******/ // Create a new module (and put it into the cache)
+/******/ var module = installedModules[moduleId] = {
+/******/ i: moduleId,
+/******/ l: false,
+/******/ exports: {}
+/******/ };
+/******/
+/******/ // Execute the module function
+/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
+/******/
+/******/ // Flag the module as loaded
+/******/ module.l = true;
+/******/
+/******/ // Return the exports of the module
+/******/ return module.exports;
+/******/ }
+/******/
+/******/
+/******/ // expose the modules object (__webpack_modules__)
+/******/ __webpack_require__.m = modules;
+/******/
+/******/ // expose the module cache
+/******/ __webpack_require__.c = installedModules;
+/******/
+/******/ // define getter function for harmony exports
+/******/ __webpack_require__.d = function(exports, name, getter) {
+/******/ if(!__webpack_require__.o(exports, name)) {
+/******/ Object.defineProperty(exports, name, {
+/******/ configurable: false,
+/******/ enumerable: true,
+/******/ get: getter
+/******/ });
+/******/ }
+/******/ };
+/******/
+/******/ // getDefaultExport function for compatibility with non-harmony modules
+/******/ __webpack_require__.n = function(module) {
+/******/ var getter = module && module.__esModule ?
+/******/ function getDefault() { return module['default']; } :
+/******/ function getModuleExports() { return module; };
+/******/ __webpack_require__.d(getter, 'a', getter);
+/******/ return getter;
+/******/ };
+/******/
+/******/ // Object.prototype.hasOwnProperty.call
+/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
+/******/
+/******/ // __webpack_public_path__
+/******/ __webpack_require__.p = "";
+/******/
+/******/ // Load entry module and return exports
+/******/ return __webpack_require__(__webpack_require__.s = 0);
+/******/ })
+/************************************************************************/
+/******/ ([
+/* 0 */
+/***/ (function(module, exports, __webpack_require__) {
var media = wp.media,
baseSettings = window._wpmejsSettings || {},
l10n = window._wpMediaViewsL10n || {};
/**
+ *
+ * @summary Defines the wp.media.mixin object.
+ *
* @mixin
+ *
+ * @since 4.2.0
*/
wp.media.mixin = {
mejsSettings: baseSettings,
+ /**
+ * @summary Pauses and removes all players.
+ *
+ * @since 4.2.0
+ *
+ * @return {void}
+ */
removeAllPlayers: function() {
var p;
@@ -23,9 +101,15 @@
},
/**
+ * @summary Removes the player.
+ *
* Override the MediaElement method for removing a player.
- * MediaElement tries to pull the audio/video tag out of
- * its container and re-add it to the DOM.
+ * MediaElement tries to pull the audio/video tag out of
+ * its container and re-add it to the DOM.
+ *
+ * @since 4.2.0
+ *
+ * @return {void}
*/
removePlayer: function(t) {
var featureIndex, feature;
@@ -45,25 +129,32 @@
}
if ( ! t.isDynamic ) {
- t.$node.remove();
+ t.node.remove();
}
- if ( 'native' !== t.media.pluginType ) {
- t.$media.remove();
+ if ( 'html5' !== t.media.rendererName ) {
+ t.media.remove();
}
delete window.mejs.players[t.id];
t.container.remove();
- t.globalUnbind();
- delete t.node.player;
+ t.globalUnbind('resize', t.globalResizeCallback);
+ t.globalUnbind('keydown', t.globalKeydownCallback);
+ t.globalUnbind('click', t.globalClickCallback);
+ delete t.media.player;
},
/**
+ *
+ * @summary Removes and resets all players.
+ *
* Allows any class that has set 'player' to a MediaElementPlayer
- * instance to remove the player when listening to events.
+ * instance to remove the player when listening to events.
*
- * Examples: modal closes, shortcode properties are removed, etc.
+ * Examples: modal closes, shortcode properties are removed, etc.
+ *
+ * @since 4.2.0
*/
unsetPlayers : function() {
if ( this.players && this.players.length ) {
@@ -77,7 +168,9 @@
};
/**
- * Autowire "collection"-type shortcodes
+ * @summary Shortcode modeling for playlists.
+ *
+ * @since 4.2.0
*/
wp.media.playlist = new wp.media.collection({
tag: 'playlist',
@@ -94,11 +187,14 @@
});
/**
- * Shortcode modeling for audio
- * `edit()` prepares the shortcode for the media modal
- * `shortcode()` builds the new shortcode after update
+ * @summary Shortcode modeling for audio.
+ *
+ * `edit()` prepares the shortcode for the media modal.
+ * `shortcode()` builds the new shortcode after an update.
*
* @namespace
+ *
+ * @since 4.2.0
*/
wp.media.audio = {
coerce : wp.media.coerce,
@@ -112,6 +208,14 @@
width : 400
},
+ /**
+ * @summary Instantiates a new media object with the next matching shortcode.
+ *
+ * @since 4.2.0
+ *
+ * @param {string} data The text to apply the shortcode on.
+ * @returns {wp.media} The media object.
+ */
edit : function( data ) {
var frame, shortcode = wp.shortcode.next( 'audio', data ).shortcode;
@@ -124,6 +228,14 @@
return frame;
},
+ /**
+ * @summary Generates an audio shortcode.
+ *
+ * @since 4.2.0
+ *
+ * @param {Array} model Array with attributes for the shortcode.
+ * @returns {wp.shortcode} The audio shortcode object.
+ */
shortcode : function( model ) {
var content;
@@ -147,9 +259,12 @@
};
/**
- * Shortcode modeling for video
- * `edit()` prepares the shortcode for the media modal
- * `shortcode()` builds the new shortcode after update
+ * @summary Shortcode modeling for video.
+ *
+ * `edit()` prepares the shortcode for the media modal.
+ * `shortcode()` builds the new shortcode after update.
+ *
+ * @since 4.2.0
*
* @namespace
*/
@@ -168,6 +283,14 @@
height : 360
},
+ /**
+ * @summary Instantiates a new media object with the next matching shortcode.
+ *
+ * @since 4.2.0
+ *
+ * @param {string} data The text to apply the shortcode on.
+ * @returns {wp.media} The media object.
+ */
edit : function( data ) {
var frame,
shortcode = wp.shortcode.next( 'video', data ).shortcode,
@@ -185,6 +308,14 @@
return frame;
},
+ /**
+ * @summary Generates an video shortcode.
+ *
+ * @since 4.2.0
+ *
+ * @param {Array} model Array with attributes for the shortcode.
+ * @returns {wp.shortcode} The video shortcode object.
+ */
shortcode : function( model ) {
var content;
@@ -207,88 +338,20 @@
}
};
-media.model.PostMedia = require( './models/post-media.js' );
-media.controller.AudioDetails = require( './controllers/audio-details.js' );
-media.controller.VideoDetails = require( './controllers/video-details.js' );
-media.view.MediaFrame.MediaDetails = require( './views/frame/media-details.js' );
-media.view.MediaFrame.AudioDetails = require( './views/frame/audio-details.js' );
-media.view.MediaFrame.VideoDetails = require( './views/frame/video-details.js' );
-media.view.MediaDetails = require( './views/media-details.js' );
-media.view.AudioDetails = require( './views/audio-details.js' );
-media.view.VideoDetails = require( './views/video-details.js' );
-
-},{"./controllers/audio-details.js":2,"./controllers/video-details.js":3,"./models/post-media.js":4,"./views/audio-details.js":5,"./views/frame/audio-details.js":6,"./views/frame/media-details.js":7,"./views/frame/video-details.js":8,"./views/media-details.js":9,"./views/video-details.js":10}],2:[function(require,module,exports){
-/*globals wp */
-
-/**
- * wp.media.controller.AudioDetails
- *
- * The controller for the Audio Details state
- *
- * @class
- * @augments wp.media.controller.State
- * @augments Backbone.Model
- */
-var State = wp.media.controller.State,
- l10n = wp.media.view.l10n,
- AudioDetails;
-
-AudioDetails = State.extend({
- defaults: {
- id: 'audio-details',
- toolbar: 'audio-details',
- title: l10n.audioDetailsTitle,
- content: 'audio-details',
- menu: 'audio-details',
- router: false,
- priority: 60
- },
+media.model.PostMedia = __webpack_require__( 1 );
+media.controller.AudioDetails = __webpack_require__( 2 );
+media.controller.VideoDetails = __webpack_require__( 3 );
+media.view.MediaFrame.MediaDetails = __webpack_require__( 4 );
+media.view.MediaFrame.AudioDetails = __webpack_require__( 5 );
+media.view.MediaFrame.VideoDetails = __webpack_require__( 6 );
+media.view.MediaDetails = __webpack_require__( 7 );
+media.view.AudioDetails = __webpack_require__( 8 );
+media.view.VideoDetails = __webpack_require__( 9 );
- initialize: function( options ) {
- this.media = options.media;
- State.prototype.initialize.apply( this, arguments );
- }
-});
-module.exports = AudioDetails;
-
-},{}],3:[function(require,module,exports){
-/*globals wp */
-
-/**
- * wp.media.controller.VideoDetails
- *
- * The controller for the Video Details state
- *
- * @class
- * @augments wp.media.controller.State
- * @augments Backbone.Model
- */
-var State = wp.media.controller.State,
- l10n = wp.media.view.l10n,
- VideoDetails;
-
-VideoDetails = State.extend({
- 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;
-
-},{}],4:[function(require,module,exports){
-/*globals wp, Backbone, _ */
+/***/ }),
+/* 1 */
+/***/ (function(module, exports) {
/**
* wp.media.model.PostMedia
@@ -296,10 +359,12 @@
* 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({
+var PostMedia = Backbone.Model.extend(/** @lends wp.media.model.PostMedia.prototype */{
initialize: function() {
this.attachment = false;
},
@@ -331,130 +396,98 @@
module.exports = PostMedia;
-},{}],5:[function(require,module,exports){
-/*globals wp */
-/**
- * wp.media.view.AudioDetails
- *
- * @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
- */
-var MediaDetails = wp.media.view.MediaDetails,
+/***/ }),
+/* 2 */
+/***/ (function(module, exports) {
+
+var State = wp.media.controller.State,
+ l10n = wp.media.view.l10n,
AudioDetails;
-AudioDetails = MediaDetails.extend({
- className: 'audio-details',
- template: wp.template('audio-details'),
-
- setMedia: function() {
- var audio = this.$('.wp-audio-shortcode');
+/**
+ * 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
+ },
- 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;
+ initialize: function( options ) {
+ this.media = options.media;
+ State.prototype.initialize.apply( this, arguments );
}
});
module.exports = AudioDetails;
-},{}],6:[function(require,module,exports){
-/*globals wp */
+
+/***/ }),
+/* 3 */
+/***/ (function(module, exports) {
/**
- * wp.media.view.MediaFrame.AudioDetails
+ * wp.media.controller.VideoDetails
+ *
+ * The controller for the Video Details state
+ *
+ * @memberOf wp.media.controller
*
* @class
- * @augments wp.media.view.MediaFrame.MediaDetails
- * @augments wp.media.view.MediaFrame.Select
- * @augments wp.media.view.MediaFrame
- * @augments wp.media.view.Frame
- * @augments wp.media.View
- * @augments wp.Backbone.View
- * @augments Backbone.View
- * @mixes wp.media.controller.StateMachine
+ * @augments wp.media.controller.State
+ * @augments Backbone.Model
*/
-var MediaDetails = wp.media.view.MediaFrame.MediaDetails,
- MediaLibrary = wp.media.controller.MediaLibrary,
-
+var State = wp.media.controller.State,
l10n = wp.media.view.l10n,
- AudioDetails;
+ VideoDetails;
-AudioDetails = MediaDetails.extend({
+VideoDetails = State.extend(/** @lends wp.media.controller.VideoDetails.prototype */{
defaults: {
- id: 'audio',
- url: '',
- menu: 'audio-details',
- content: 'audio-details',
- toolbar: 'audio-details',
- type: 'link',
- title: l10n.audioDetailsTitle,
- priority: 120
+ id: 'video-details',
+ toolbar: 'video-details',
+ title: l10n.videoDetailsTitle,
+ content: 'video-details',
+ menu: 'video-details',
+ router: false,
+ priority: 60
},
initialize: function( options ) {
- options.DetailsView = wp.media.view.AudioDetails;
- options.cancelText = l10n.audioDetailsCancel;
- options.addText = l10n.audioAddSourceTitle;
-
- MediaDetails.prototype.initialize.call( this, options );
- },
-
- bindHandlers: function() {
- MediaDetails.prototype.bindHandlers.apply( this, arguments );
-
- this.on( 'toolbar:render:replace-audio', this.renderReplaceToolbar, this );
- this.on( 'toolbar:render:add-audio-source', this.renderAddSourceToolbar, this );
- },
-
- createStates: function() {
- this.states.add([
- new wp.media.controller.AudioDetails( {
- media: this.media
- } ),
-
- new MediaLibrary( {
- type: 'audio',
- id: 'replace-audio',
- title: l10n.audioReplaceTitle,
- toolbar: 'replace-audio',
- media: this.media,
- menu: 'audio-details'
- } ),
-
- new MediaLibrary( {
- type: 'audio',
- id: 'add-audio-source',
- title: l10n.audioAddSourceTitle,
- toolbar: 'add-audio-source',
- media: this.media,
- menu: false
- } )
- ]);
+ this.media = options.media;
+ State.prototype.initialize.apply( this, arguments );
}
});
-module.exports = AudioDetails;
+module.exports = VideoDetails;
+
-},{}],7:[function(require,module,exports){
-/*globals wp */
+/***/ }),
+/* 4 */
+/***/ (function(module, exports) {
+
+var Select = wp.media.view.MediaFrame.Select,
+ l10n = wp.media.view.l10n,
+ MediaDetails;
/**
* wp.media.view.MediaFrame.MediaDetails
*
+ * @memberOf wp.media.view.MediaFrame
+ *
* @class
* @augments wp.media.view.MediaFrame.Select
* @augments wp.media.view.MediaFrame
@@ -464,11 +497,7 @@
* @augments Backbone.View
* @mixes wp.media.controller.StateMachine
*/
-var Select = wp.media.view.MediaFrame.Select,
- l10n = wp.media.view.l10n,
- MediaDetails;
-
-MediaDetails = Select.extend({
+MediaDetails = Select.extend(/** @lends wp.media.view.MediaFrame.MediaDetails.prototype */{
defaults: {
id: 'media',
url: '',
@@ -581,11 +610,21 @@
module.exports = MediaDetails;
-},{}],8:[function(require,module,exports){
-/*globals wp, _ */
+
+/***/ }),
+/* 5 */
+/***/ (function(module, exports) {
+
+var MediaDetails = wp.media.view.MediaFrame.MediaDetails,
+ MediaLibrary = wp.media.controller.MediaLibrary,
+
+ l10n = wp.media.view.l10n,
+ AudioDetails;
/**
- * wp.media.view.MediaFrame.VideoDetails
+ * wp.media.view.MediaFrame.AudioDetails
+ *
+ * @memberOf wp.media.view.MediaFrame
*
* @class
* @augments wp.media.view.MediaFrame.MediaDetails
@@ -597,12 +636,88 @@
* @augments Backbone.View
* @mixes wp.media.controller.StateMachine
*/
+AudioDetails = MediaDetails.extend(/** @lends wp.media.view.MediaFrame.AudioDetails.prototype */{
+ defaults: {
+ id: 'audio',
+ url: '',
+ menu: 'audio-details',
+ content: 'audio-details',
+ toolbar: 'audio-details',
+ type: 'link',
+ title: l10n.audioDetailsTitle,
+ priority: 120
+ },
+
+ initialize: function( options ) {
+ options.DetailsView = wp.media.view.AudioDetails;
+ options.cancelText = l10n.audioDetailsCancel;
+ options.addText = l10n.audioAddSourceTitle;
+
+ MediaDetails.prototype.initialize.call( this, options );
+ },
+
+ bindHandlers: function() {
+ MediaDetails.prototype.bindHandlers.apply( this, arguments );
+
+ this.on( 'toolbar:render:replace-audio', this.renderReplaceToolbar, this );
+ this.on( 'toolbar:render:add-audio-source', this.renderAddSourceToolbar, this );
+ },
+
+ createStates: function() {
+ this.states.add([
+ new wp.media.controller.AudioDetails( {
+ media: this.media
+ } ),
+
+ new MediaLibrary( {
+ type: 'audio',
+ id: 'replace-audio',
+ title: l10n.audioReplaceTitle,
+ toolbar: 'replace-audio',
+ media: this.media,
+ menu: 'audio-details'
+ } ),
+
+ new MediaLibrary( {
+ type: 'audio',
+ id: 'add-audio-source',
+ title: l10n.audioAddSourceTitle,
+ toolbar: 'add-audio-source',
+ media: this.media,
+ menu: false
+ } )
+ ]);
+ }
+});
+
+module.exports = AudioDetails;
+
+
+/***/ }),
+/* 6 */
+/***/ (function(module, exports) {
+
var MediaDetails = wp.media.view.MediaFrame.MediaDetails,
MediaLibrary = wp.media.controller.MediaLibrary,
l10n = wp.media.view.l10n,
VideoDetails;
-VideoDetails = MediaDetails.extend({
+/**
+ * wp.media.view.MediaFrame.VideoDetails
+ *
+ * @memberOf wp.media.view.MediaFrame
+ *
+ * @class
+ * @augments wp.media.view.MediaFrame.MediaDetails
+ * @augments wp.media.view.MediaFrame.Select
+ * @augments wp.media.view.MediaFrame
+ * @augments wp.media.view.Frame
+ * @augments wp.media.View
+ * @augments wp.Backbone.View
+ * @augments Backbone.View
+ * @mixes wp.media.controller.StateMachine
+ */
+VideoDetails = MediaDetails.extend(/** @lends wp.media.view.MediaFrame.VideoDetails.prototype */{
defaults: {
id: 'video',
url: '',
@@ -704,7 +819,7 @@
if ( -1 === content.indexOf( attachment.get( 'url' ) ) ) {
content += [
- '<track srclang="en" label="English"kind="subtitles" src="',
+ '<track srclang="en" label="English" kind="subtitles" src="',
attachment.get( 'url' ),
'" />'
].join('');
@@ -718,12 +833,21 @@
module.exports = VideoDetails;
-},{}],9:[function(require,module,exports){
-/*global wp, jQuery, _, MediaElementPlayer */
+
+/***/ }),
+/* 7 */
+/***/ (function(module, exports) {
+
+/* global MediaElementPlayer */
+var AttachmentDisplay = wp.media.view.Settings.AttachmentDisplay,
+ $ = jQuery,
+ MediaDetails;
/**
* wp.media.view.MediaDetails
*
+ * @memberOf wp.media.view
+ *
* @class
* @augments wp.media.view.Settings.AttachmentDisplay
* @augments wp.media.view.Settings
@@ -731,11 +855,7 @@
* @augments wp.Backbone.View
* @augments Backbone.View
*/
-var AttachmentDisplay = wp.media.view.Settings.AttachmentDisplay,
- $ = jQuery,
- MediaDetails;
-
-MediaDetails = AttachmentDisplay.extend({
+MediaDetails = AttachmentDisplay.extend(/** @lends wp.media.view.MediaDetails.prototype */{
initialize: function() {
_.bindAll(this, 'success');
this.players = [];
@@ -744,14 +864,17 @@
this.on( 'media:setting:remove', wp.media.mixin.unsetPlayers, this );
this.on( 'media:setting:remove', this.render );
this.on( 'media:setting:remove', this.setPlayer );
- this.events = _.extend( this.events, {
+
+ AttachmentDisplay.prototype.initialize.apply( this, arguments );
+ },
+
+ events: function(){
+ return _.extend( {
'click .remove-setting' : 'removeSetting',
'change .content-track' : 'setTracks',
'click .remove-track' : 'setTracks',
'click .add-media-source' : 'addSource'
- } );
-
- AttachmentDisplay.prototype.initialize.apply( this, arguments );
+ }, AttachmentDisplay.prototype.events );
},
prepare: function() {
@@ -804,19 +927,17 @@
this.scriptXhr = false;
},
- /**
- * @global MediaElementPlayer
- */
setPlayer : function() {
- var baseSettings;
+ var src;
if ( this.players.length || ! this.media || this.scriptXhr ) {
return;
}
- if ( this.model.get( 'src' ).indexOf( 'vimeo' ) > -1 && ! ( 'Froogaloop' in window ) ) {
- baseSettings = wp.media.mixin.mejsSettings;
- this.scriptXhr = $.getScript( baseSettings.pluginPath + 'froogaloop.min.js', _.bind( this.loadPlayer, this ) );
+ src = this.model.get( 'src' );
+
+ if ( src && src.indexOf( 'vimeo' ) > -1 && ! ( 'Vimeo' in window ) ) {
+ this.scriptXhr = $.getScript( 'https://player.vimeo.com/api/player.js', _.bind( this.loadPlayer, this ) );
} else {
this.loadPlayer();
}
@@ -861,7 +982,7 @@
resetFocus: function() {
this.$( '.embed-media-settings' ).scrollTop( 0 );
}
-}, {
+},/** @lends wp.media.view.MediaDetails */{
instances : 0,
/**
* When multiple players in the DOM contain the same src, things get weird.
@@ -886,11 +1007,18 @@
module.exports = MediaDetails;
-},{}],10:[function(require,module,exports){
-/*globals wp */
+
+/***/ }),
+/* 8 */
+/***/ (function(module, exports) {
+
+var MediaDetails = wp.media.view.MediaDetails,
+ AudioDetails;
/**
- * wp.media.view.VideoDetails
+ * wp.media.view.AudioDetails
+ *
+ * @memberOf wp.media.view
*
* @class
* @augments wp.media.view.MediaDetails
@@ -900,10 +1028,51 @@
* @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;
+
+
+/***/ }),
+/* 9 */
+/***/ (function(module, exports) {
+
var MediaDetails = wp.media.view.MediaDetails,
VideoDetails;
-VideoDetails = MediaDetails.extend({
+/**
+ * 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'),
@@ -931,4 +1100,6 @@
module.exports = VideoDetails;
-},{}]},{},[1]);
+
+/***/ })
+/******/ ]);
\ No newline at end of file