mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-12 21:00:21 +00:00
Video editing in the media modal:
* 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
This commit is contained in:
@@ -97,11 +97,14 @@ tinymce.PluginManager.add('wpgallery', function( editor ) {
|
||||
frame.on( 'close', function () {
|
||||
frame.detach();
|
||||
} );
|
||||
frame.state( 'video-details' ).on( 'update replace add-source select-poster-image', function ( selection ) {
|
||||
var shortcode = wp.media.video.shortcode( selection );
|
||||
editor.dom.setAttrib( node, 'data-wp-media', window.encodeURIComponent( shortcode ) );
|
||||
frame.detach();
|
||||
} );
|
||||
frame.state( 'video-details' ).on(
|
||||
'update replace add-source select-poster-image add-track',
|
||||
function ( selection ) {
|
||||
var shortcode = wp.media.video.shortcode( selection );
|
||||
editor.dom.setAttrib( node, 'data-wp-media', window.encodeURIComponent( shortcode ) );
|
||||
frame.detach();
|
||||
}
|
||||
);
|
||||
frame.open();
|
||||
} else if ( editor.dom.hasClass( node, 'wp-audio' ) ) {
|
||||
frame = wp.media.audio.edit( data );
|
||||
|
||||
Reference in New Issue
Block a user