3

I have made a Chrome extension (di.fm radio player), and I was wondering if there is a way to stop the playback if a tab with youtube video is opened and contionue when youtube tab is closed!?

da Vinci
  • 131
  • 11

1 Answers1

0

you will need to declare permissions to view the contents of the user's URL bar (maybe look into "activeTab", or "tabs" with ".onUpdate"), and then trigger your pause function when a URL matches a generic youtube format. keep in mind there are multiple formats, so this answer may be useful.

Community
  • 1
  • 1
Noam Hacker
  • 4,671
  • 7
  • 34
  • 55