Implemented the durationchange event