The Tracker issue for the same was MDL-50176 and is fixed for Moodle 2.8 onwards, but for Moodle sites which are using the LTS version of Moodle i.e. Moodle 2.7 the YouTube repository seems to be not working by applying the patch.
So Eloy Lafuente (stronk7) has come up with a new plugin m27tube, which workarounds the problem by embedding the new Google libraries within the plugin, making it 100% self-contained and avoiding the use of the google libraries (outdated) available in core.
Please note that this plugin should be only used as an interim replacement for Moodle 2.7. It’s highly advisable to upgrade to more recent, fully supported versions ASAP.