JSFiddle - React, Tailwind, and code Playground

by juberti

JavaScript

async function foo() {
  pc = new RTCPeerConnection()
  console.log("created PC")
  pc.onicecandidate = e => console.log('candidate ', e.candidate)
  pc.addTransceiver("audio")
  const offer = await pc.createOffer()
  await pc.setLocalDescription(offer)
  console.log("setLocal PC")
  pc.close()
  console.log("closed PC")
}

foo()