Restructured example, more flexible and not dependant on rtc-media