Review WebRTC frontend code

Mozilla Firefox compatibility is not OK yet. If someone could take a look at it it's great thanks.