Youtube IFrame API & Chrome extensions, issues with Manifest Version 2
===

We have a chrome extension that uses the Javascript Player API for IFrame Embeds to show videos to the user. Since Chrome extensions are moving to manifest version 2 we are updating our extension for the same. 
In manifest version 2, the browser is restricting the injection of javascript files from 'http' sources. Only 'https' sources are allowed.

The issue we are facing is that when we insert the youtube api script from 

> 'https://www.youtube.com/player_api'

it inserts a new script (the latest build of the API) based on the current document protocol. Like this,

    var p = document.location.protocol == 'https:' ? 'https:' : 'http:';
    var s = p + '//s.ytimg.com/yt/jsbin/www-widgetapi-vflr5t-6k.js'

Since chrome extensions have protocol 'chrome-extension://'. the 'http' script is being loaded which is being rejected because of manifest version 2.

Is there any way to resolve this.

A followup question to this is that js file "www-widgetapi-vflr5t-6k.js"  uses eval in line 7:536

Use of eval is not allowed in manifest version 2 - Content Security Policy. We have been used manifest version 1 and adding 'unsafe-eval' in the script-src for Content Security Policy.
Anyone knows how to solve this issue.