Added a new setmedia event, when setMedia is used.