Added mediaEvents switch