We have a chrome extension that uses the IFrame API 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-vflhJ8ZTS.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 from our end?
ThanksUdbhav Rai You received this message because you are subscribed to the Google Groups "YouTube APIs Developer Forum" group.
To post to this group, send email to youtube-api-gdata@googlegroups.com.
To unsubscribe from this group, send email to youtube-api-gdata+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/youtube-api-gdata?hl=en.
No comments:
Post a Comment