Problem sound extension

Hello, i trying actually to create an add on for firefox (for my personnal using for the moment), my idea is :
An Lo-Fi radio addon who plays in the background the sound of a live youtube lofi, so I made sure that when I click on the extension it opens an html file containing the live video, my problem is that : if I close the addon, or I change tab, the sound stops, how to make so that the sound plays continuously without having to keep the extension “open”, to summarize I try to achieve a result similar to the extension "Nook ", I send screenshots of my code below

You likely want to have the stream open in the background page - though I’m not sure if it’s allowed to have a YT embed in the background page.

Alternatives would be using a sidebar or a hidden tab.