Above method by @hakubo should work OK
I have done similar (for embeding Gain Control), but my code was inserted above buttonContainer tag