handle onfinish in player