improve mediaplayer handling