Index: wp-includes/js/media-editor.js
===================================================================
--- wp-includes/js/media-editor.js	(revision 24741)
+++ wp-includes/js/media-editor.js	(working copy)
@@ -44,7 +44,7 @@
 
 			props.title = props.title || attachment.title;
 
-			link = props.link || defaultProps.link || getUserSetting( 'urlbutton', 'file' );
+			link = props.embed || props.link || defaultProps.link || getUserSetting( 'urlbutton', 'file' );
 			if ( 'file' === link )
 				linkUrl = attachment.url;
 			else if ( 'post' === link )
@@ -102,12 +102,15 @@
 			props = wp.media.string.props( props, attachment );
 			shortcode = {};
 
+			if ( props.embed !== 'embed' )
+				return wp.media.string.link( props );
+
 			if ( props.mime ) {
 				switch ( props.mime ) {
 				case 'audio/mpeg':
-					if ( attachment.url.indexOf( 'mp3' ) )
+					if ( attachment.filename.indexOf( 'mp3' ) )
 						shortcode.mp3 = attachment.url;
-					else if ( attachment.url.indexOf( 'm4a' ) )
+					else if ( attachment.filename.indexOf( 'm4a' ) )
 						shortcode.m4a = attachment.url;
 					break;
 				case 'audio/mp3':
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,18 @@
 			return this;
 		},
 
+		canEmbed: function( attachment ) {
+			var subtype, type = attachment.get('type');
+			if ( type !== 'audio' && type !== 'video' )
+				return false;
+
+			subtype = attachment.get('subtype');
+			if ( 'audio' === type )
+				return _.contains( [ 'mpeg', 'mp3', 'm4a', 'wav', 'ogg', 'x-ms-wma', 'wma' ], subtype );
+			else
+				return _.contains( [ 'mp4', 'm4v', 'webm', 'ogg', 'x-ms-wmv', 'wmv', 'asf', 'flv', 'x-flv' ], subtype );
+		},
+
 		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>
@@ -305,6 +329,8 @@
 			<input type="text" class="link-to-custom" data-setting="linkUrl" />
 		</div>
 
+		<# } #>
+
 		<# if ( 'undefined' !== typeof data.sizes ) { #>
 			<label class="setting">
 				<span><?php _e('Size'); ?></span>
