try saving the ice candidates in an array and add them after creating a peerconnection