Making attachMediaStream and reattachMediaStream helpers