I\'m looking to use the Youtube player API in my Youtube Chrome extension.
My goal is to be able to control the player\'s controls on Youtube website from my content scr
This should be saved in the manifest.json
{
"manifest_version": 2,
"name": "example",
"description": "Lorem Ipsum dollar sit amet",
"version": "0.0",
"browser_action": {
"default_icon": "icon.png",
"default_popup": "popup.html"
},
"permissions": [
"activeTab",
"tabs",
"content_security_policy"
]
}
Since the content script cant access the page javascript objects, inject a script in the page (the official docs explain how). That injected script has access to the objects and can then use messaging or writting on the dom to communicate with the content or popup.