Index: package-lock.json
===================================================================
--- package-lock.json	(revision 43519)
+++ package-lock.json	(working copy)
@@ -3643,6 +3643,7 @@
 					"version": "1.0.5",
 					"bundled": true,
 					"dev": true,
+					"optional": true,
 					"requires": {
 						"delayed-stream": "~1.0.0"
 					}
@@ -3705,7 +3706,8 @@
 				"delayed-stream": {
 					"version": "1.0.0",
 					"bundled": true,
-					"dev": true
+					"dev": true,
+					"optional": true
 				},
 				"delegates": {
 					"version": "1.0.0",
@@ -3993,12 +3995,14 @@
 				"mime-db": {
 					"version": "1.27.0",
 					"bundled": true,
-					"dev": true
+					"dev": true,
+					"optional": true
 				},
 				"mime-types": {
 					"version": "2.1.15",
 					"bundled": true,
 					"dev": true,
+					"optional": true,
 					"requires": {
 						"mime-db": "~1.27.0"
 					}
@@ -4074,7 +4078,8 @@
 				"number-is-nan": {
 					"version": "1.0.1",
 					"bundled": true,
-					"dev": true
+					"dev": true,
+					"optional": true
 				},
 				"oauth-sign": {
 					"version": "0.8.2",
Index: src/js/_enqueues/wp/custom-header.js
===================================================================
--- src/js/_enqueues/wp/custom-header.js	(revision 43519)
+++ src/js/_enqueues/wp/custom-header.js	(working copy)
@@ -389,7 +389,8 @@
 				height: this.settings.height,
 				width: this.settings.width,
 				videoId: this.settings.videoUrl.match( VIDEO_ID_REGEX )[1],
-				events: {
+				host: location.protocol + ((this.settings.videoUrl.indexOf("youtube-nocookie") !== -1) ? "//www.youtube-nocookie.com" : "//www.youtube.com"),
+				events: {	
 					onReady: function( e ) {
 						e.target.mute();
 						handler.showControls();
Index: src/wp-includes/class-oembed.php
===================================================================
--- src/wp-includes/class-oembed.php	(revision 43519)
+++ src/wp-includes/class-oembed.php	(working copy)
@@ -50,7 +50,7 @@
 	public function __construct() {
 		$host      = urlencode( home_url() );
 		$providers = array(
-			'#https?://((m|www)\.)?youtube\.com/watch.*#i' => array( 'https://www.youtube.com/oembed', true ),
+			'#https?://((m|www)\.)?youtube(-nocookie)?\.com/watch.*#i' => array( 'https://www.youtube.com/oembed', true ),
 			'#https?://((m|www)\.)?youtube\.com/playlist.*#i' => array( 'https://www.youtube.com/oembed', true ),
 			'#https?://youtu\.be/.*#i'                     => array( 'https://www.youtube.com/oembed', true ),
 			'#https?://(.+\.)?vimeo\.com/.*#i'             => array( 'https://vimeo.com/api/oembed.{format}', true ),
Index: src/wp-includes/class-wp-customize-manager.php
===================================================================
--- src/wp-includes/class-wp-customize-manager.php	(revision 43519)
+++ src/wp-includes/class-wp-customize-manager.php	(working copy)
@@ -5853,13 +5853,13 @@
 	 * @return mixed
 	 */
 	public function _validate_external_header_video( $validity, $value ) {
-		$video = esc_url_raw( $value );
-		if ( $video ) {
-			if ( ! preg_match( '#^https?://(?:www\.)?(?:youtube\.com/watch|youtu\.be/)#', $video ) ) {
+        $video = esc_url_raw( $value );
+        if ( $video ) {
+			if ( ! preg_match( '#^https?://(?:www\.)?(youtube|youtube-nocookie)\.com/(watch|embed|youtu\.be/)#', $video ) ) {
 				$validity->add( 'invalid_url', __( 'Please enter a valid YouTube URL.' ) );
 			}
-		}
-		return $validity;
+        }
+        return $validity;
 	}
 
 	/**
Index: src/wp-includes/embed.php
===================================================================
--- src/wp-includes/embed.php	(revision 43519)
+++ src/wp-includes/embed.php	(working copy)
@@ -189,7 +189,7 @@
 		return;
 	}
 
-	wp_embed_register_handler( 'youtube_embed_url', '#https?://(www.)?youtube\.com/(?:v|embed)/([^/]+)#i', 'wp_embed_handler_youtube' );
+	wp_embed_register_handler( 'youtube_embed_url', '#https?://(www.)?youtube(-nocookie)?\.com/(?:v|embed)/([^/]+)#i', 'wp_embed_handler_youtube' );
 
 	/**
 	 * Filters the audio embed handler callback.
@@ -228,7 +228,13 @@
  */
 function wp_embed_handler_youtube( $matches, $attr, $url, $rawattr ) {
 	global $wp_embed;
-	$embed = $wp_embed->autoembed( sprintf( 'https://youtube.com/watch?v=%s', urlencode( $matches[2] ) ) );
+	$youtube_no_cookie_url = strpos($matches[0], 'youtube-nocookie') !== false;
+	$protocol = stripos($_SERVER['SERVER_PROTOCOL'],'https') === true ? 'https://' : 'http://';
+	$host = $protocol . ($youtube_no_cookie_url ? 'youtube-nocookie.com' : 'youtube.com');
+	$embed = $wp_embed->autoembed( sprintf( '%s/watch?v=%s', $host, urlencode( $matches[3] ) ) );
+	if ($youtube_no_cookie_url) {
+		$embed = str_replace("youtube.com", "youtube-nocookie.com", $embed);
+	}
 
 	/**
 	 * Filters the YoutTube embed output.
Index: src/wp-includes/theme.php
===================================================================
--- src/wp-includes/theme.php	(revision 43519)
+++ src/wp-includes/theme.php	(working copy)
@@ -1461,7 +1461,7 @@
 		),
 	);
 
-	if ( preg_match( '#^https?://(?:www\.)?(?:youtube\.com/watch|youtu\.be/)#', $video_url ) ) {
+	if ( preg_match( '#^https?://(?:www\.)?(youtube|youtube-nocookie)\.com/(watch|embed|youtu\.be/)#', $video_url ) ) {
 		$settings['mimeType'] = 'video/x-youtube';
 	} elseif ( ! empty( $video_type['type'] ) ) {
 		$settings['mimeType'] = $video_type['type'];
