https://github.com/webrtc/samples/blob/gh-pages/src/content/insertable-streams/endtoend-encryption/js/main.js Let me know what you think of this. If we use this, then we can't use peer js.