I got the error "player.getAvailableAudioTracks is not a function", with GreaseMonkey on Firefox. It seems that the returned player object is a copy made at a certain point that isn't synced with the real object, no matter how much time I wait before calling getPlayer(), I get an object but without the YT properties, while calling getAvailableAudioTracks() totally works in console. I fixed it by editing getPlayer(), prepending "unsafeWindow." before "document.querySelector(...)". Otherwise it does its job fine, thanks for scratching this itch ;)
I got the error "player.getAvailableAudioTracks is not a function", with GreaseMonkey on Firefox. It seems that the returned player object is a copy made at a certain point that isn't synced with the real object, no matter how much time I wait before calling getPlayer(), I get an object but without the YT properties, while calling getAvailableAudioTracks() totally works in console. I fixed it by editing getPlayer(), prepending "unsafeWindow." before "document.querySelector(...)". Otherwise it does its job fine, thanks for scratching this itch ;)