wp/wp-includes/js/media-audiovideo.js
changeset 9 177826044cd9
parent 7 cf61fcea0001
child 16 a86126ab1dd4
equal deleted inserted replaced
8:c7c34916027a 9:177826044cd9
    34 /******/ 	__webpack_require__.c = installedModules;
    34 /******/ 	__webpack_require__.c = installedModules;
    35 /******/
    35 /******/
    36 /******/ 	// define getter function for harmony exports
    36 /******/ 	// define getter function for harmony exports
    37 /******/ 	__webpack_require__.d = function(exports, name, getter) {
    37 /******/ 	__webpack_require__.d = function(exports, name, getter) {
    38 /******/ 		if(!__webpack_require__.o(exports, name)) {
    38 /******/ 		if(!__webpack_require__.o(exports, name)) {
    39 /******/ 			Object.defineProperty(exports, name, {
    39 /******/ 			Object.defineProperty(exports, name, { enumerable: true, get: getter });
    40 /******/ 				configurable: false,
       
    41 /******/ 				enumerable: true,
       
    42 /******/ 				get: getter
       
    43 /******/ 			});
       
    44 /******/ 		}
    40 /******/ 		}
       
    41 /******/ 	};
       
    42 /******/
       
    43 /******/ 	// define __esModule on exports
       
    44 /******/ 	__webpack_require__.r = function(exports) {
       
    45 /******/ 		if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
       
    46 /******/ 			Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
       
    47 /******/ 		}
       
    48 /******/ 		Object.defineProperty(exports, '__esModule', { value: true });
       
    49 /******/ 	};
       
    50 /******/
       
    51 /******/ 	// create a fake namespace object
       
    52 /******/ 	// mode & 1: value is a module id, require it
       
    53 /******/ 	// mode & 2: merge all properties of value into the ns
       
    54 /******/ 	// mode & 4: return value when already ns object
       
    55 /******/ 	// mode & 8|1: behave like require
       
    56 /******/ 	__webpack_require__.t = function(value, mode) {
       
    57 /******/ 		if(mode & 1) value = __webpack_require__(value);
       
    58 /******/ 		if(mode & 8) return value;
       
    59 /******/ 		if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
       
    60 /******/ 		var ns = Object.create(null);
       
    61 /******/ 		__webpack_require__.r(ns);
       
    62 /******/ 		Object.defineProperty(ns, 'default', { enumerable: true, value: value });
       
    63 /******/ 		if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
       
    64 /******/ 		return ns;
    45 /******/ 	};
    65 /******/ 	};
    46 /******/
    66 /******/
    47 /******/ 	// getDefaultExport function for compatibility with non-harmony modules
    67 /******/ 	// getDefaultExport function for compatibility with non-harmony modules
    48 /******/ 	__webpack_require__.n = function(module) {
    68 /******/ 	__webpack_require__.n = function(module) {
    49 /******/ 		var getter = module && module.__esModule ?
    69 /******/ 		var getter = module && module.__esModule ?
    57 /******/ 	__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
    77 /******/ 	__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
    58 /******/
    78 /******/
    59 /******/ 	// __webpack_public_path__
    79 /******/ 	// __webpack_public_path__
    60 /******/ 	__webpack_require__.p = "";
    80 /******/ 	__webpack_require__.p = "";
    61 /******/
    81 /******/
       
    82 /******/
    62 /******/ 	// Load entry module and return exports
    83 /******/ 	// Load entry module and return exports
    63 /******/ 	return __webpack_require__(__webpack_require__.s = 0);
    84 /******/ 	return __webpack_require__(__webpack_require__.s = 0);
    64 /******/ })
    85 /******/ })
    65 /************************************************************************/
    86 /************************************************************************/
    66 /******/ ([
    87 /******/ ([
    67 /* 0 */
    88 /* 0 */
    68 /***/ (function(module, exports, __webpack_require__) {
    89 /***/ (function(module, exports, __webpack_require__) {
    69 
    90 
       
    91 module.exports = __webpack_require__(1);
       
    92 
       
    93 
       
    94 /***/ }),
       
    95 /* 1 */
       
    96 /***/ (function(module, exports, __webpack_require__) {
       
    97 
       
    98 /**
       
    99  * @output wp-includes/js/media-audiovideo.js
       
   100  */
       
   101 
    70 var media = wp.media,
   102 var media = wp.media,
    71 	baseSettings = window._wpmejsSettings || {},
   103 	baseSettings = window._wpmejsSettings || {},
    72 	l10n = window._wpMediaViewsL10n || {};
   104 	l10n = window._wpMediaViewsL10n || {};
    73 
   105 
    74 /**
   106 /**
    75  *
   107  *
    76  * @summary Defines the wp.media.mixin object.
   108  * Defines the wp.media.mixin object.
    77  *
   109  *
    78  * @mixin
   110  * @mixin
    79  *
   111  *
    80  * @since 4.2.0
   112  * @since 4.2.0
    81  */
   113  */
    82 wp.media.mixin = {
   114 wp.media.mixin = {
    83 	mejsSettings: baseSettings,
   115 	mejsSettings: baseSettings,
    84 
   116 
    85 	/**
   117 	/**
    86 	 * @summary Pauses and removes all players.
   118 	 * Pauses and removes all players.
    87 	 *
   119 	 *
    88 	 * @since 4.2.0
   120 	 * @since 4.2.0
    89 	 *
   121 	 *
    90 	 * @return {void}
   122 	 * @return {void}
    91 	 */
   123 	 */
    99 			}
   131 			}
   100 		}
   132 		}
   101 	},
   133 	},
   102 
   134 
   103 	/**
   135 	/**
   104 	 * @summary Removes the player.
   136 	 * Removes the player.
   105 	 *
   137 	 *
   106 	 * Override the MediaElement method for removing a player.
   138 	 * Override the MediaElement method for removing a player.
   107 	 * MediaElement tries to pull the audio/video tag out of
   139 	 * MediaElement tries to pull the audio/video tag out of
   108 	 * its container and re-add it to the DOM.
   140 	 * its container and re-add it to the DOM.
   109 	 *
   141 	 *
   145 		delete t.media.player;
   177 		delete t.media.player;
   146 	},
   178 	},
   147 
   179 
   148 	/**
   180 	/**
   149 	 *
   181 	 *
   150 	 * @summary Removes and resets all players.
   182 	 * Removes and resets all players.
   151 	 *
   183 	 *
   152 	 * Allows any class that has set 'player' to a MediaElementPlayer
   184 	 * Allows any class that has set 'player' to a MediaElementPlayer
   153 	 * instance to remove the player when listening to events.
   185 	 * instance to remove the player when listening to events.
   154 	 *
   186 	 *
   155 	 * Examples: modal closes, shortcode properties are removed, etc.
   187 	 * Examples: modal closes, shortcode properties are removed, etc.
   166 		}
   198 		}
   167 	}
   199 	}
   168 };
   200 };
   169 
   201 
   170 /**
   202 /**
   171  * @summary Shortcode modeling for playlists.
   203  * Shortcode modeling for playlists.
   172  *
   204  *
   173  * @since 4.2.0
   205  * @since 4.2.0
   174  */
   206  */
   175 wp.media.playlist = new wp.media.collection({
   207 wp.media.playlist = new wp.media.collection({
   176 	tag: 'playlist',
   208 	tag: 'playlist',
   185 		type: 'audio'
   217 		type: 'audio'
   186 	}
   218 	}
   187 });
   219 });
   188 
   220 
   189 /**
   221 /**
   190  * @summary Shortcode modeling for audio.
   222  * Shortcode modeling for audio.
   191  *
   223  *
   192  * `edit()` prepares the shortcode for the media modal.
   224  * `edit()` prepares the shortcode for the media modal.
   193  * `shortcode()` builds the new shortcode after an update.
   225  * `shortcode()` builds the new shortcode after an update.
   194  *
   226  *
   195  * @namespace
   227  * @namespace
   207 		preload : 'none',
   239 		preload : 'none',
   208 		width : 400
   240 		width : 400
   209 	},
   241 	},
   210 
   242 
   211 	/**
   243 	/**
   212 	 * @summary Instantiates a new media object with the next matching shortcode.
   244 	 * Instantiates a new media object with the next matching shortcode.
   213 	 *
   245 	 *
   214 	 * @since 4.2.0
   246 	 * @since 4.2.0
   215 	 *
   247 	 *
   216 	 * @param {string} data The text to apply the shortcode on.
   248 	 * @param {string} data The text to apply the shortcode on.
   217 	 * @returns {wp.media} The media object.
   249 	 * @returns {wp.media} The media object.
   227 
   259 
   228 		return frame;
   260 		return frame;
   229 	},
   261 	},
   230 
   262 
   231 	/**
   263 	/**
   232 	 * @summary Generates an audio shortcode.
   264 	 * Generates an audio shortcode.
   233 	 *
   265 	 *
   234 	 * @since 4.2.0
   266 	 * @since 4.2.0
   235 	 *
   267 	 *
   236 	 * @param {Array} model Array with attributes for the shortcode.
   268 	 * @param {Array} model Array with attributes for the shortcode.
   237 	 * @returns {wp.shortcode} The audio shortcode object.
   269 	 * @returns {wp.shortcode} The audio shortcode object.
   257 		});
   289 		});
   258 	}
   290 	}
   259 };
   291 };
   260 
   292 
   261 /**
   293 /**
   262  * @summary Shortcode modeling for video.
   294  * Shortcode modeling for video.
   263  *
   295  *
   264  *  `edit()` prepares the shortcode for the media modal.
   296  *  `edit()` prepares the shortcode for the media modal.
   265  *  `shortcode()` builds the new shortcode after update.
   297  *  `shortcode()` builds the new shortcode after update.
   266  *
   298  *
   267  * @since 4.2.0
   299  * @since 4.2.0
   282 		width : 640,
   314 		width : 640,
   283 		height : 360
   315 		height : 360
   284 	},
   316 	},
   285 
   317 
   286 	/**
   318 	/**
   287 	 * @summary Instantiates a new media object with the next matching shortcode.
   319 	 * Instantiates a new media object with the next matching shortcode.
   288 	 *
   320 	 *
   289 	 * @since 4.2.0
   321 	 * @since 4.2.0
   290 	 *
   322 	 *
   291 	 * @param {string} data The text to apply the shortcode on.
   323 	 * @param {string} data The text to apply the shortcode on.
   292 	 * @returns {wp.media} The media object.
   324 	 * @returns {wp.media} The media object.
   307 
   339 
   308 		return frame;
   340 		return frame;
   309 	},
   341 	},
   310 
   342 
   311 	/**
   343 	/**
   312 	 * @summary Generates an video shortcode.
   344 	 * Generates an video shortcode.
   313 	 *
   345 	 *
   314 	 * @since 4.2.0
   346 	 * @since 4.2.0
   315 	 *
   347 	 *
   316 	 * @param {Array} model Array with attributes for the shortcode.
   348 	 * @param {Array} model Array with attributes for the shortcode.
   317 	 * @returns {wp.shortcode} The video shortcode object.
   349 	 * @returns {wp.shortcode} The video shortcode object.
   336 			content: content
   368 			content: content
   337 		});
   369 		});
   338 	}
   370 	}
   339 };
   371 };
   340 
   372 
   341 media.model.PostMedia = __webpack_require__( 1 );
   373 media.model.PostMedia = __webpack_require__( 2 );
   342 media.controller.AudioDetails = __webpack_require__( 2 );
   374 media.controller.AudioDetails = __webpack_require__( 3 );
   343 media.controller.VideoDetails = __webpack_require__( 3 );
   375 media.controller.VideoDetails = __webpack_require__( 4 );
   344 media.view.MediaFrame.MediaDetails = __webpack_require__( 4 );
   376 media.view.MediaFrame.MediaDetails = __webpack_require__( 5 );
   345 media.view.MediaFrame.AudioDetails = __webpack_require__( 5 );
   377 media.view.MediaFrame.AudioDetails = __webpack_require__( 6 );
   346 media.view.MediaFrame.VideoDetails = __webpack_require__( 6 );
   378 media.view.MediaFrame.VideoDetails = __webpack_require__( 7 );
   347 media.view.MediaDetails = __webpack_require__( 7 );
   379 media.view.MediaDetails = __webpack_require__( 8 );
   348 media.view.AudioDetails = __webpack_require__( 8 );
   380 media.view.AudioDetails = __webpack_require__( 9 );
   349 media.view.VideoDetails = __webpack_require__( 9 );
   381 media.view.VideoDetails = __webpack_require__( 10 );
   350 
   382 
   351 
   383 
   352 /***/ }),
   384 /***/ }),
   353 /* 1 */
   385 /* 2 */
   354 /***/ (function(module, exports) {
   386 /***/ (function(module, exports) {
   355 
   387 
   356 /**
   388 /**
   357  * wp.media.model.PostMedia
   389  * wp.media.model.PostMedia
   358  *
   390  *
   396 
   428 
   397 module.exports = PostMedia;
   429 module.exports = PostMedia;
   398 
   430 
   399 
   431 
   400 /***/ }),
   432 /***/ }),
   401 /* 2 */
   433 /* 3 */
   402 /***/ (function(module, exports) {
   434 /***/ (function(module, exports) {
   403 
   435 
   404 var State = wp.media.controller.State,
   436 var State = wp.media.controller.State,
   405 	l10n = wp.media.view.l10n,
   437 	l10n = wp.media.view.l10n,
   406 	AudioDetails;
   438 	AudioDetails;
   435 
   467 
   436 module.exports = AudioDetails;
   468 module.exports = AudioDetails;
   437 
   469 
   438 
   470 
   439 /***/ }),
   471 /***/ }),
   440 /* 3 */
   472 /* 4 */
   441 /***/ (function(module, exports) {
   473 /***/ (function(module, exports) {
   442 
   474 
   443 /**
   475 /**
   444  * wp.media.controller.VideoDetails
   476  * wp.media.controller.VideoDetails
   445  *
   477  *
   474 
   506 
   475 module.exports = VideoDetails;
   507 module.exports = VideoDetails;
   476 
   508 
   477 
   509 
   478 /***/ }),
   510 /***/ }),
   479 /* 4 */
   511 /* 5 */
   480 /***/ (function(module, exports) {
   512 /***/ (function(module, exports) {
   481 
   513 
   482 var Select = wp.media.view.MediaFrame.Select,
   514 var Select = wp.media.view.MediaFrame.Select,
   483 	l10n = wp.media.view.l10n,
   515 	l10n = wp.media.view.l10n,
   484 	MediaDetails;
   516 	MediaDetails;
   610 
   642 
   611 module.exports = MediaDetails;
   643 module.exports = MediaDetails;
   612 
   644 
   613 
   645 
   614 /***/ }),
   646 /***/ }),
   615 /* 5 */
   647 /* 6 */
   616 /***/ (function(module, exports) {
   648 /***/ (function(module, exports) {
   617 
   649 
   618 var MediaDetails = wp.media.view.MediaFrame.MediaDetails,
   650 var MediaDetails = wp.media.view.MediaFrame.MediaDetails,
   619 	MediaLibrary = wp.media.controller.MediaLibrary,
   651 	MediaLibrary = wp.media.controller.MediaLibrary,
   620 
   652 
   692 
   724 
   693 module.exports = AudioDetails;
   725 module.exports = AudioDetails;
   694 
   726 
   695 
   727 
   696 /***/ }),
   728 /***/ }),
   697 /* 6 */
   729 /* 7 */
   698 /***/ (function(module, exports) {
   730 /***/ (function(module, exports) {
   699 
   731 
   700 var MediaDetails = wp.media.view.MediaFrame.MediaDetails,
   732 var MediaDetails = wp.media.view.MediaFrame.MediaDetails,
   701 	MediaLibrary = wp.media.controller.MediaLibrary,
   733 	MediaLibrary = wp.media.controller.MediaLibrary,
   702 	l10n = wp.media.view.l10n,
   734 	l10n = wp.media.view.l10n,
   833 
   865 
   834 module.exports = VideoDetails;
   866 module.exports = VideoDetails;
   835 
   867 
   836 
   868 
   837 /***/ }),
   869 /***/ }),
   838 /* 7 */
   870 /* 8 */
   839 /***/ (function(module, exports) {
   871 /***/ (function(module, exports) {
   840 
   872 
   841 /* global MediaElementPlayer */
   873 /* global MediaElementPlayer */
   842 var AttachmentDisplay = wp.media.view.Settings.AttachmentDisplay,
   874 var AttachmentDisplay = wp.media.view.Settings.AttachmentDisplay,
   843 	$ = jQuery,
   875 	$ = jQuery,
  1007 
  1039 
  1008 module.exports = MediaDetails;
  1040 module.exports = MediaDetails;
  1009 
  1041 
  1010 
  1042 
  1011 /***/ }),
  1043 /***/ }),
  1012 /* 8 */
  1044 /* 9 */
  1013 /***/ (function(module, exports) {
  1045 /***/ (function(module, exports) {
  1014 
  1046 
  1015 var MediaDetails = wp.media.view.MediaDetails,
  1047 var MediaDetails = wp.media.view.MediaDetails,
  1016 	AudioDetails;
  1048 	AudioDetails;
  1017 
  1049 
  1051 
  1083 
  1052 module.exports = AudioDetails;
  1084 module.exports = AudioDetails;
  1053 
  1085 
  1054 
  1086 
  1055 /***/ }),
  1087 /***/ }),
  1056 /* 9 */
  1088 /* 10 */
  1057 /***/ (function(module, exports) {
  1089 /***/ (function(module, exports) {
  1058 
  1090 
  1059 var MediaDetails = wp.media.view.MediaDetails,
  1091 var MediaDetails = wp.media.view.MediaDetails,
  1060 	VideoDetails;
  1092 	VideoDetails;
  1061 
  1093