Make sure to check if the player is set before triggering durationchange.