How to play audio on Chrome extension? -
i writing mini addon chrome. in addon, have inserted code play audio ajax success. doesn't work websites use https, works fine on websites use http. can me edit it.
manifest.json
mystyle.js
for full resolution of images:
at first glance, there 2 issues code:
- you shouldn't put - chrome.tabs.getselected,- chrome.browseractionin- mystyle.js.- mystyle.jscontent script, can access limited chrome api.- however, content scripts have limitations. cannot: - use chrome.* apis, exception of: - extension ( geturl , inincognitocontext , lasterror , onrequest , sendrequest )
- i18n
- runtime ( connect , getmanifest , geturl , id , onconnect , onmessage , sendmessage )
- storage
 
- use variables or functions defined extension's pages 
- use variables or functions defined web pages or other content scripts
 
- you can't send http request https web page, since it's restricted sop , it's browser behavior. solve this, should move http request logic background page , add server url permissions, see following answer more info. 


Comments
Post a Comment