moving webrtc initialization to window.onload to support bowser on ios