Changeset 41330
- Timestamp:
- 09/03/2017 04:15:38 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/js/media-audiovideo.js
r41198 r41330 5 5 6 6 /** 7 * 8 * @summary Defines the wp.media.mixin object. 9 * 7 10 * @mixin 11 * 12 * @since 4.2.0 8 13 */ 9 14 wp.media.mixin = { 10 15 mejsSettings: baseSettings, 11 16 17 /** 18 * @summary Pauses and removes all players. 19 * 20 * @since 4.2.0 21 * 22 * @return {void} 23 */ 12 24 removeAllPlayers: function() { 13 25 var p; … … 22 34 23 35 /** 36 * @summary Removes the player. 37 * 24 38 * Override the MediaElement method for removing a player. 25 * MediaElement tries to pull the audio/video tag out of 26 * its container and re-add it to the DOM. 39 * MediaElement tries to pull the audio/video tag out of 40 * its container and re-add it to the DOM. 41 * 42 * @since 4.2.0 43 * 44 * @return {void} 27 45 */ 28 46 removePlayer: function(t) { … … 59 77 60 78 /** 79 * 80 * @summary Removes and resets all players. 81 * 61 82 * Allows any class that has set 'player' to a MediaElementPlayer 62 * instance to remove the player when listening to events. 63 * 64 * Examples: modal closes, shortcode properties are removed, etc. 83 * instance to remove the player when listening to events. 84 * 85 * Examples: modal closes, shortcode properties are removed, etc. 86 * 87 * @since 4.2.0 65 88 */ 66 89 unsetPlayers : function() { … … 76 99 77 100 /** 78 * Autowire "collection"-type shortcodes 101 * @summary Shortcode modeling for playlists. 102 * 103 * @since 4.2.0 79 104 */ 80 105 wp.media.playlist = new wp.media.collection({ … … 93 118 94 119 /** 95 * Shortcode modeling for audio 96 * `edit()` prepares the shortcode for the media modal 97 * `shortcode()` builds the new shortcode after update 120 * @summary Shortcode modeling for audio. 121 * 122 * `edit()` prepares the shortcode for the media modal. 123 * `shortcode()` builds the new shortcode after an update. 98 124 * 99 125 * @namespace 126 * 127 * @since 4.2.0 100 128 */ 101 129 wp.media.audio = { … … 111 139 }, 112 140 141 /** 142 * @summary Instantiates a new media object with the next matching shortcode. 143 * 144 * @since 4.2.0 145 * 146 * @param {string} data The text to apply the shortcode on. 147 * @returns {wp.media} The media object. 148 */ 113 149 edit : function( data ) { 114 150 var frame, shortcode = wp.shortcode.next( 'audio', data ).shortcode; … … 123 159 }, 124 160 161 /** 162 * @summary Generates an audio shortcode. 163 * 164 * @since 4.2.0 165 * 166 * @param {Array} model Array with attributes for the shortcode. 167 * @returns {wp.shortcode} The audio shortcode object. 168 */ 125 169 shortcode : function( model ) { 126 170 var content; … … 146 190 147 191 /** 148 * Shortcode modeling for video 149 * `edit()` prepares the shortcode for the media modal 150 * `shortcode()` builds the new shortcode after update 192 * @summary Shortcode modeling for video. 193 * 194 * `edit()` prepares the shortcode for the media modal. 195 * `shortcode()` builds the new shortcode after update. 196 * 197 * @since 4.2.0 151 198 * 152 199 * @namespace … … 167 214 }, 168 215 216 /** 217 * @summary Instantiates a new media object with the next matching shortcode. 218 * 219 * @since 4.2.0 220 * 221 * @param {string} data The text to apply the shortcode on. 222 * @returns {wp.media} The media object. 223 */ 169 224 edit : function( data ) { 170 225 var frame, … … 184 239 }, 185 240 241 /** 242 * @summary Generates an video shortcode. 243 * 244 * @since 4.2.0 245 * 246 * @param {Array} model Array with attributes for the shortcode. 247 * @returns {wp.shortcode} The video shortcode object. 248 */ 186 249 shortcode : function( model ) { 187 250 var content;
Note: See TracChangeset
for help on using the changeset viewer.