Youtube player API in Chrome extension

后端 未结 2 1339
闹比i
闹比i 2020-12-18 14:14

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

相关标签:
2条回答
  • 2020-12-18 15:08

    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"
    ]
    }
    
    0 讨论(0)
  • 2020-12-18 15:09

    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.

    0 讨论(0)
提交回复
热议问题