Index: wp-includes/js/media-editor.js
===================================================================
--- wp-includes/js/media-editor.js	(revision 24769)
+++ wp-includes/js/media-editor.js	(working copy)
@@ -45,7 +45,7 @@
 			props.title = props.title || attachment.title;
 
 			link = props.link || defaultProps.link || getUserSetting( 'urlbutton', 'file' );
-			if ( 'file' === link )
+			if ( 'file' === link || 'embed' === link )
 				linkUrl = attachment.url;
 			else if ( 'post' === link )
 				linkUrl = attachment.link;
@@ -97,90 +97,41 @@
 		},
 
 		audio: function( props, attachment ) {
-			var shortcode, html;
-
-			props = wp.media.string.props( props, attachment );
-			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 );
-				}
-			}
-
-			html = wp.shortcode.string({
-				tag:     'audio',
-				attrs:   shortcode
-			});
-
-			return html;
+			return wp.media.string._audioVideo( 'audio', props, attachment );
 		},
 
 		video: function( props, attachment ) {
-			var shortcode, html;
+			return wp.media.string._audioVideo( 'video', props, attachment );
+		},
 
+		_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 );
 
 			shortcode = {};
 
-			if ( attachment.width )
-				shortcode.width = attachment.width;
+			if ( 'video' === type ) {
+				if ( attachment.width )
+					shortcode.width = attachment.width;
 
-			if ( attachment.height )
-				shortcode.height = attachment.height;
+				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;
-				}
+			extension = attachment.filename.split('.').pop();
+
+			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:     type,
 				attrs:   shortcode
 			});
 
Index: wp-includes/js/media-views.js
===================================================================
--- wp-includes/js/media-views.js	(revision 24769)
+++ wp-includes/js/media-views.js	(working copy)
@@ -449,11 +449,26 @@
 			var displays = this._displays;
 
 			if ( ! displays[ attachment.cid ] )
-				displays[ attachment.cid ] = new Backbone.Model( this._defaultDisplaySettings );
+				displays[ attachment.cid ] = new Backbone.Model( this.defaultDisplaySettings( attachment ) );
 
 			return displays[ attachment.cid ];
 		},
 
+		defaultDisplaySettings: function( attachment ) {
+			settings = this._defaultDisplaySettings;
+			if ( settings.canEmbed = this.canEmbed( attachment ) )
+				settings.link = 'embed';
+			return settings;
+		},
+
+		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() );
+		},
+
 		syncSelection: function() {
 			var selection = this.get('selection'),
 				manager = this.frame._selection;
@@ -3666,7 +3681,7 @@
 				$input = this.$('.link-to-custom'),
 				attachment = this.options.attachment;
 
-			if ( 'none' === linkTo || ( ! attachment && 'custom' !== linkTo ) ) {
+			if ( 'none' === linkTo || 'embed' === linkTo || ( ! attachment && 'custom' !== linkTo ) ) {
 				$input.hide();
 				return;
 			}
Index: wp-includes/media-template.php
===================================================================
--- wp-includes/media-template.php	(revision 24769)
+++ wp-includes/media-template.php	(working copy)
@@ -281,25 +281,52 @@
 
 		<div class="setting">
 			<label>
-				<span><?php _e('Link To'); ?></span>
+				<# if ( data.model.canEmbed ) { #>
+					<span><?php _e('Embed or Link'); ?></span>
+				<# } else { #>
+					<span><?php _e('Link To'); ?></span>
+				<# } #>
+
 				<select class="link-to"
 					data-setting="link"
-					<# if ( data.userSettings ) { #>
+					<# if ( data.userSettings && ! data.model.canEmbed ) { #>
 						data-user-setting="urlbutton"
 					<# } #>>
 
-					<option value="custom">
-						<?php esc_attr_e('Custom URL'); ?>
+				<# if ( data.model.canEmbed && 'audio' === data.type ) { #>
+					<option value="embed" selected>
+						<?php esc_attr_e('Embed Audio Player'); ?>
 					</option>
+					<option value="file">
+				<# } else if ( data.model.canEmbed && 'video' === data.type ) { #>
+					<option value="embed" selected>
+						<?php esc_attr_e('Embed Video Player'); ?>
+					</option>
+					<option value="file">
+				<# } else { #>
 					<option value="file" selected>
+				<# } #>
+					<# if ( data.model.canEmbed ) { #>
+						<?php esc_attr_e('Link to Media File'); ?>
+					<# } else { #>
 						<?php esc_attr_e('Media File'); ?>
+					<# } #>
 					</option>
 					<option value="post">
+					<# if ( data.model.canEmbed ) { #>
+						<?php esc_attr_e('Link to Attachment Page'); ?>
+					<# } else { #>
 						<?php esc_attr_e('Attachment Page'); ?>
+					<# } #>
 					</option>
+				<# if ( 'image' === data.type ) { #>
+					<option value="custom">
+						<?php esc_attr_e('Custom URL'); ?>
+					</option>
 					<option value="none">
 						<?php esc_attr_e('None'); ?>
 					</option>
+				<# } #>
 				</select>
 			</label>
 			<input type="text" class="link-to-custom" data-setting="linkUrl" />
Index: wp-includes/media.php
===================================================================
--- wp-includes/media.php	(revision 24769)
+++ 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;
