Your createWorker is an async function, thus it returns a Promise, and you are trying to call createWebRtcServer as a method of this Promise.
createWorker
Promise
createWebRtcServer