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!?
Asked
Active
Viewed 53 times
1 Answers
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