* `removePlayer()` is an alternative to MediaElement's player removal method that does not re-add the audio|video element back to the DOM.
* `unsetPlayer()` will check for an existing `player` property on the passed instance and pause all players before calling `unsetPlayer()`
See #27389.
git-svn-id: https://develop.svn.wordpress.org/trunk@27538 602fd350-edb4-49c9-b593-d223f7449a82
Assuming someone had implemented players in the editor, pause all players when switching between editor tabs. A method, `pauseAllPlayers`, has been added to `wp.media.mixin`.
See #27389.
git-svn-id: https://develop.svn.wordpress.org/trunk@27537 602fd350-edb4-49c9-b593-d223f7449a82
* `src` is set, and 'Add a Source' results in the same file (or a file with the same extension) being added
* `src` is set, and 'Replace Audio|Video' is used, which will add a model property named by the attachment's extension
... call `model.unset( 'src' )`.
See #27389.
git-svn-id: https://develop.svn.wordpress.org/trunk@27536 602fd350-edb4-49c9-b593-d223f7449a82
Future JS templates can follow the convention of expecting `data` to be passed to them containing a `model` property.
See #27389.
git-svn-id: https://develop.svn.wordpress.org/trunk@27533 602fd350-edb4-49c9-b593-d223f7449a82
* Move TinyMCE shortcode handling from `wpgallery` plugin to `mce-view.js`
* Force `preload="none"` when rendering media in the editor to ensure fast loading (I realize this sounds illogical)
* Move audio and video tag builder logic in `media-template.php` into PHP funcs that can be reused by any code passing `data.model` to an Underscore template
* Pause all players when moving between editor tabs and when moving from the editor to editing in the media modal.
* Rename `wp.media.audio|video.shortcode()` to the more appropriate `wp.media.audio|video.update()` that now returns a `wp.shortcode` object instead of a string.
* Add necessary MediaElement css files to `$mce_css`
* In `wp.mce.View.render()`, support multiple instances of the same shortcode
* When rendering `wp.mce.View`s, fire a ready event that passes the current MCE View root element as context
See #27389.
git-svn-id: https://develop.svn.wordpress.org/trunk@27528 602fd350-edb4-49c9-b593-d223f7449a82
Let _wp_customize_include() handle customizer initialisation.
Sets also the priority for the Add Widget and Reorder buttons and removes debug cruft.
props westonruter.
fixes#27291.
git-svn-id: https://develop.svn.wordpress.org/trunk@27524 602fd350-edb4-49c9-b593-d223f7449a82
* Add an action, `wp_playlist_scripts`, where a user can turn off all default script and style loading for playlists and roll their own.
* Move the script and style loading for playlists to a function, `wp_playlist_scripts( $type )`, that hooks into `wp_playlist_scripts`.
* Make the `<noscript>` playlist output an `<ol>`, instead of a list of links with no surrounding markup.
See #26631.
git-svn-id: https://develop.svn.wordpress.org/trunk@27486 602fd350-edb4-49c9-b593-d223f7449a82
Turn the logic used by wp_get_current_user() into a determine_current_user filter.
props rmccue.
fixes#26706.
git-svn-id: https://develop.svn.wordpress.org/trunk@27484 602fd350-edb4-49c9-b593-d223f7449a82
* Add a state: `Add Subititles`
* Add `text/vtt` to the list of allowed mime-types, files end in `.vtt`. `.srt` files are served as `text/plain`.
* The content body of a video shortcode should be used for adding `<track>` elements only. This happens dynamically in the modal. If added by hand, they can still be parsed and managed.
See #27016.
git-svn-id: https://develop.svn.wordpress.org/trunk@27481 602fd350-edb4-49c9-b593-d223f7449a82
* Make a generic model, `wp.media.model.PostMedia`, which replaces `wp.media.model.PostAudio` and `wp.media.model.PostVideo`
* Make a generic library, `wp.media.controller.MediaLibrary`, which replaces `wp.media.controller.ReplaceVideo` and `wp.media.controller.ReplaceAudio`
* `wp.media.controller.MediaLibrary` is used to create new states that want to load a library filtered by type, making it incredibly simple to add states to frames. See `wp.media.view.MediaFrame.VideoDetails` and `wp.media.view.MediaFrame.AudioDetails`.
UX changes:
* Add the ability to manage HTML5 fallbacks - add additional `<source>`s or remove specific `<source>`s
* In the Video Details state, add the ability to select a poster image
See #27016.
git-svn-id: https://develop.svn.wordpress.org/trunk@27478 602fd350-edb4-49c9-b593-d223f7449a82
* Add `embedMimes` to `_wpMediaViewsL10n`
* Use `escape` instead of `interpolate` when setting attributes in Underscore templates
* When creating the `<audio>` and `<video>` tags dynamically, set inner `<source>` nodes instead of the `src` attribute and properly set the mime-type per source as the `type` attribute. This is also drastically reduces the amount of code used to generate the tags.
See #27016.
git-svn-id: https://develop.svn.wordpress.org/trunk@27476 602fd350-edb4-49c9-b593-d223f7449a82