Yes, you can put music (via youtube) into games. When doing so, there are a number of considerations.
First and foremost, should be - is the music so jarring that it makes it hard to read the game?
Seriously, most music in the background actually disrupts the flow of the text.
If the music fits, then you have to decide whether to autoplay it or have the player click to start it and whether to hide the video or have it visible. You could also have it pop up or stay embedded on the pages, though if you do that, then it shuts off when you leave the page it is on.