Index: wp-includes/js/media-editor.js
===================================================================
--- wp-includes/js/media-editor.js	(revision 24741)
+++ wp-includes/js/media-editor.js	(working copy)
@@ -45,6 +45,11 @@
 			props.title = props.title || attachment.title;
 
 			link = props.link || defaultProps.link || getUserSetting( 'urlbutton', 'file' );
+			if ( props.embed !== 'embed'
+				&& ( props.type === 'video' || props.type === 'audio' )
+				&& _.contains( wp.media.view.settings.embedExts, attachment.filename.split('.').pop() ) )
+					link = props.embed;
+
 			if ( 'file' === link )
 				linkUrl = attachment.url;
 			else if ( 'post' === link )
@@ -97,90 +102,33 @@
 		},
 
 		audio: function( props, attachment ) {
-			var shortcode, html;
+			var shortcode, html, extension;
 
 			props = wp.media.string.props( props, attachment );
+			if ( props.embed !== 'embed' )
+				return wp.media.string.link( props );
+
 			shortcode = {};
 
-			if ( props.mime ) {
-				switch ( props.mime ) {
-				case 'audio/mpeg':
-					if ( attachment.url.indexOf( 'mp3' ) )
-						shortcode.mp3 = attachment.url;
-					else if ( attachment.url.indexOf( 'm4a' ) )
-						shortcode.m4a = attachment.url;
-					break;
-				case 'audio/mp3':
-					shortcode.mp3 = attachment.url;
-					break;
-				case 'audio/m4a':
-					shortcode.m4a = attachment.url;
-					break;
-				case 'audio/wav':
-					shortcode.wav = attachment.url;
-					break;
-				case 'audio/ogg':
-					shortcode.ogg = attachment.url;
-					break;
-				case 'audio/x-ms-wma':
-				case 'audio/wma':
-					shortcode.wma = attachment.url;
-					break;
-				default:
-					// Render unsupported audio files as links.
-					return wp.media.string.link( props );
-				}
+			if ( 'video' === attachment.type ) {		
+				if ( attachment.width )
+					shortcode.width = attachment.width;
+
+				if ( attachment.height )
+					shortcode.height = attachment.height;	
 			}
 
-			html = wp.shortcode.string({
-				tag:     'audio',
-				attrs:   shortcode
-			});
+			extension = attachment.filename.split('.').pop();
 
-			return html;
-		},
-
-		video: function( props, attachment ) {
-			var shortcode, html;
-
-			props = wp.media.string.props( props, attachment );
-
-			shortcode = {};
-
-			if ( attachment.width )
-				shortcode.width = attachment.width;
-
-			if ( attachment.height )
-				shortcode.height = attachment.height;
-
-			if ( props.mime ) {
-				switch ( props.mime ) {
-				case 'video/mp4':
-					shortcode.mp4 = attachment.url;
-					break;
-				case 'video/m4v':
-					shortcode.m4v = attachment.url;
-					break;
-				case 'video/webm':
-					shortcode.webm = attachment.url;
-					break;
-				case 'video/ogg':
-					shortcode.ogv = attachment.url;
-					break;
-				case 'video/x-ms-wmv':
-				case 'video/wmv':
-				case 'video/asf':
-					shortcode.wmv = attachment.url;
-					break;
-				case 'video/flv':
-				case 'video/x-flv':
-					shortcode.flv = attachment.url;
-					break;
-				}
+			if ( _.contains( wp.media.view.settings.embedExts, extension ) ) {
+				shortcode[extension] = attachment.url;
+			} else {
+				// Render unsupported audio and video files as links.
+				return wp.media.string.link( props );
 			}
 
 			html = wp.shortcode.string({
-				tag:     'video',
+				tag:     'video' === attachment.type ? 'video' : 'audio',
 				attrs:   shortcode
 			});
 
@@ -187,6 +135,10 @@
 			return html;
 		},
 
+		video: function( props, attachment ) {
+			return wp.media.string.audio( props, attachment );
+		},
+
 		image: function( props, attachment ) {
 			var img = {},
 				options, classes, shortcode, html;
Index: wp-includes/js/media-views.js
===================================================================
--- wp-includes/js/media-views.js	(revision 24741)
+++ wp-includes/js/media-views.js	(working copy)
@@ -441,7 +441,8 @@
 			this._defaultDisplaySettings = {
 				align: defaultProps.align || getUserSetting( 'align', 'none' ),
 				size:  defaultProps.size  || getUserSetting( 'imgsize', 'medium' ),
-				link:  defaultProps.link  || getUserSetting( 'urlbutton', 'file' )
+				link:  defaultProps.link  || getUserSetting( 'urlbutton', 'file' ),
+				embed: 'embed'
 			};
 		},
 
@@ -3652,7 +3653,8 @@
 			if ( attachment ) {
 				_.extend( this.options, {
 					sizes: attachment.get('sizes'),
-					type:  attachment.get('type')
+					type:  attachment.get('type'),
+					canEmbed: this.canEmbed( attachment )
 				});
 			}
 
@@ -3661,6 +3663,14 @@
 			return this;
 		},
 
+		canEmbed: function( attachment ) {
+			var type = attachment.get('type');
+			if ( type !== 'audio' && type !== 'video' )
+				return false;
+
+			return _.contains( media.view.settings.embedExts, attachment.get('filename').split('.').pop() );
+		},
+
 		updateLinkTo: function() {
 			var linkTo = this.model.get('link'),
 				$input = this.$('.link-to-custom'),
Index: wp-includes/media-template.php
===================================================================
--- wp-includes/media-template.php	(revision 24741)
+++ wp-includes/media-template.php	(working copy)
@@ -279,6 +279,30 @@
 			</label>
 		<# } #>
 
+		<# if ( data.canEmbed ) { #>
+			<label class="setting">
+				<span><?php _e('Embed or Link'); ?></span>
+				<select class="embed-or-link"
+					data-setting="embed">
+				<# if ( 'audio' === data.type ) { #>
+					<option value="embed" selected>
+						<?php esc_attr_e('Embed Audio Player'); ?>
+					</option>
+				<# } else { #>
+					<option value="embed" selected>
+						<?php esc_attr_e('Embed as Video Player'); ?>
+					</option>
+				<# } #>
+					<option value="file">
+						<?php esc_attr_e('Link to Media File'); ?>
+					</option>
+					<option value="post">
+						<?php esc_attr_e('Link to Attachment Page'); ?>
+					</option>
+				</select>
+			</label>
+		<# } else { #>
+
 		<div class="setting">
 			<label>
 				<span><?php _e('Link To'); ?></span>
@@ -288,9 +312,11 @@
 						data-user-setting="urlbutton"
 					<# } #>>
 
+				<# if ( 'image' === data.type ) { #>
 					<option value="custom">
 						<?php esc_attr_e('Custom URL'); ?>
 					</option>
+				<# } #>
 					<option value="file" selected>
 						<?php esc_attr_e('Media File'); ?>
 					</option>
@@ -297,14 +323,18 @@
 					<option value="post">
 						<?php esc_attr_e('Attachment Page'); ?>
 					</option>
+				<# if ( 'image' === data.type ) { #>
 					<option value="none">
 						<?php esc_attr_e('None'); ?>
 					</option>
+				<# } #>
 				</select>
 			</label>
 			<input type="text" class="link-to-custom" data-setting="linkUrl" />
 		</div>
 
+		<# } #>
+
 		<# if ( 'undefined' !== typeof data.sizes ) { #>
 			<label class="setting">
 				<span><?php _e('Size'); ?></span>
Index: wp-includes/media.php
===================================================================
--- wp-includes/media.php	(revision 24741)
+++ wp-includes/media.php	(working copy)
@@ -1753,6 +1753,7 @@
 			'id' => 0,
 		),
 		'defaultProps' => $props,
+		'embedExts'    => array_merge( wp_get_audio_extensions(), wp_get_video_extensions() ),
 	);
 
 	$post = null;
