diff --git wp-includes/functions.php wp-includes/functions.php
index b09ed84..4f7f19d 100644
--- wp-includes/functions.php
+++ wp-includes/functions.php
@@ -2074,6 +2074,22 @@ function wp_check_filetype( $filename, $mimes = null ) {
 }
 
 /**
+ * Retrieve the file type from the URL.
+ *
+ * You can optionally define the mime array, if needed.
+ *
+ * @since 4.3 
+ *
+ * @param string $url URL of file.
+ * @param array  $mimes    Optional. Key is the file extension with value as the mime type.
+ * @return array Values with extension first and mime type.
+ */
+function wp_check_url_filetype( $url, $mimes = null ) {
+	$filename = parse_url( $url, PHP_URL_PATH );
+	return wp_check_filetype( $filename, $mimes );
+}
+
+/**
  * Attempt to determine the real file type of a file.
  *
  * If unable to, the file name extension will be used to determine type.
diff --git wp-includes/media.php wp-includes/media.php
index 4007fec..fc16baa 100644
--- wp-includes/media.php
+++ wp-includes/media.php
@@ -1344,7 +1344,7 @@ function wp_playlist_shortcode( $attr ) {
 	$tracks = array();
 	foreach ( $attachments as $attachment ) {
 		$url = wp_get_attachment_url( $attachment->ID );
-		$ftype = wp_check_filetype( $url, wp_get_mime_types() );
+		$ftype = wp_check_url_filetype( $url, wp_get_mime_types() );
 		$track = array(
 			'src' => $url,
 			'type' => $ftype['type'],
@@ -1584,7 +1584,7 @@ function wp_audio_shortcode( $attr, $content = '' ) {
 
 	$primary = false;
 	if ( ! empty( $atts['src'] ) ) {
-		$type = wp_check_filetype( $atts['src'], wp_get_mime_types() );
+		$type = wp_check_url_filetype( $atts['src'], wp_get_mime_types() );
 		if ( ! in_array( strtolower( $type['ext'] ), $default_types ) ) {
 			return sprintf( '<a class="wp-embedded-audio" href="%s">%s</a>', esc_url( $atts['src'] ), esc_html( $atts['src'] ) );
 		}
@@ -1593,7 +1593,7 @@ function wp_audio_shortcode( $attr, $content = '' ) {
 	} else {
 		foreach ( $default_types as $ext ) {
 			if ( ! empty( $atts[ $ext ] ) ) {
-				$type = wp_check_filetype( $atts[ $ext ], wp_get_mime_types() );
+				$type = wp_check_url_filetype( $atts[ $ext ], wp_get_mime_types() );
 				if ( strtolower( $type['ext'] ) === $ext ) {
 					$primary = true;
 				}
@@ -1670,7 +1670,7 @@ function wp_audio_shortcode( $attr, $content = '' ) {
 			if ( empty( $fileurl ) ) {
 				$fileurl = $atts[ $fallback ];
 			}
-			$type = wp_check_filetype( $atts[ $fallback ], wp_get_mime_types() );
+			$type = wp_check_url_filetype( $atts[ $fallback ], wp_get_mime_types() );
 			$url = add_query_arg( '_', $instance, $atts[ $fallback ] );
 			$html .= sprintf( $source, $type['type'], esc_url( $url ) );
 		}
@@ -1814,7 +1814,7 @@ function wp_video_shortcode( $attr, $content = '' ) {
 		$is_vimeo = ( preg_match( $vimeo_pattern, $atts['src'] ) );
 		$is_youtube = (  preg_match( $yt_pattern, $atts['src'] ) );
 		if ( ! $is_youtube && ! $is_vimeo ) {
-			$type = wp_check_filetype( $atts['src'], wp_get_mime_types() );
+			$type = wp_check_url_filetype( $atts['src'], wp_get_mime_types() );
 			if ( ! in_array( strtolower( $type['ext'] ), $default_types ) ) {
 				return sprintf( '<a class="wp-embedded-video" href="%s">%s</a>', esc_url( $atts['src'] ), esc_html( $atts['src'] ) );
 			}
@@ -1829,7 +1829,7 @@ function wp_video_shortcode( $attr, $content = '' ) {
 	} else {
 		foreach ( $default_types as $ext ) {
 			if ( ! empty( $atts[ $ext ] ) ) {
-				$type = wp_check_filetype( $atts[ $ext ], wp_get_mime_types() );
+				$type = wp_check_url_filetype( $atts[ $ext ], wp_get_mime_types() );
 				if ( strtolower( $type['ext'] ) === $ext ) {
 					$primary = true;
 				}
@@ -1913,7 +1913,7 @@ function wp_video_shortcode( $attr, $content = '' ) {
 			} elseif ( 'src' === $fallback && $is_vimeo ) {
 				$type = array( 'type' => 'video/vimeo' );
 			} else {
-				$type = wp_check_filetype( $atts[ $fallback ], wp_get_mime_types() );
+				$type = wp_check_url_filetype( $atts[ $fallback ], wp_get_mime_types() );
 			}
 			$url = add_query_arg( '_', $instance, $atts[ $fallback ] );
 			$html .= sprintf( $source, $type['type'], esc_url( $url ) );
