Update peerconnection.js

change peerconnection to index