It kept on showing the NullPointerException. I added the component after all the GUI elements were created, but a rectangle without controls was displayed. Then I even tried the play() method without avail.
I ended up using Vaadin’s own Audio component.