update code with waiting icon

add waiting icon
add play/pause and stop functionality
resolve null pointer issue