UPDATE: Solved by replacing the youtube section in media.php with:
if ( $video_url['host'] == 'youtube.com' || $video_url['host'] == 'www.youtube.com' ) {
$video_url = str_replace('&','&',$video_url);
parse_str( $video_url['query'], $youtube );
if ($youtube['autoplay'] == '1') { $autoplay = '?autoplay=1'; }
$id = uniqid( '', false );
$return = '
<iframe width="' . $width . '" height="' . $height . '" src="https://www.youtube.com/embed/' . $youtube['v'] . $autoplay . '" frameborder="0" allowfullscreen="true"></iframe>
';
}