There is nothing “wrong” with you code. That I can fine.
The problem is that the user/viewer has to have interacted with the player first.
Before control is granted. (Tested in google chrome)
- Open the code
- Change the player volume once as a user
- Progmatic changes now work
But for me the player is starting muted so I don’t need to mute it.
This is due to changes in how browsers deal with auto play.