Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export const initOffer = (endpoint, offerSdp) => {
const offer = SDPInfo.process(offerSdp)
// transport :: Transport
const transport = endpoint.createTransport({
dtls: offer.getDTLS(),
ice: offer.getICE()
})
transport.setRemoteProperties({
audio: offer.getMedia('audio'),
video: offer.getMedia('video')
})
// answer :: SDPInfo
const answer = new SDPInfo()
// dtlsInfo :: DTLSInfo