MCPcopy
hub / github.com/feross/simple-peer / _needsNegotiation

Method _needsNegotiation

index.js:382–396  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

380 }
381
382 _needsNegotiation () {
383 this._debug('_needsNegotiation')
384 if (this._batchedNegotiation) return // batch synchronous renegotiations
385 this._batchedNegotiation = true
386 queueMicrotask(() => {
387 this._batchedNegotiation = false
388 if (this.initiator || !this._firstNegotiation) {
389 this._debug('starting batched negotiation')
390 this.negotiate()
391 } else {
392 this._debug('non-initiator initial negotiation request discarded')
393 }
394 this._firstNegotiation = false
395 })
396 }
397
398 negotiate () {
399 if (this.destroying) return

Callers 6

constructorMethod · 0.95
signalMethod · 0.95
addTransceiverMethod · 0.95
addTrackMethod · 0.95
removeTrackMethod · 0.95

Calls 2

_debugMethod · 0.95
negotiateMethod · 0.95

Tested by

no test coverage detected