+ /**
+ * Create an Audio shortcode string that is suitable for passing to the editor
+ *
+ * @param {Object} props Attachment details (align, link, size, etc).
+ * @param {Object} attachment The attachment object, media version of Post.
+ * @returns {string} The audio shortcode
+ */
+ audio: function( props, attachment ) {
+ return wp.media.string._audioVideo( 'audio', props, attachment );
+ },
+ /**
+ * Create a Video shortcode string that is suitable for passing to the editor
+ *
+ * @param {Object} props Attachment details (align, link, size, etc).
+ * @param {Object} attachment The attachment object, media version of Post.
+ * @returns {string} The video shortcode
+ */
+ video: function( props, attachment ) {
+ return wp.media.string._audioVideo( 'video', props, attachment );
+ },
+ /**
+ * Helper function to create a media shortcode string
+ *
+ * @access private
+ *
+ * @global wp.shortcode
+ * @global wp.media.view.settings
+ *
+ * @param {string} type The shortcode tag name: 'audio' or 'video'.
+ * @param {Object} props Attachment details (align, link, size, etc).
+ * @param {Object} attachment The attachment object, media version of Post.
+ * @returns {string} The media shortcode
+ */
+ _audioVideo: function( type, props, attachment ) {
+ var shortcode, html, extension;
+
+ props = wp.media.string.props( props, attachment );
+ if ( props.link !== 'embed' )
+ return wp.media.string.link( props );