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

Method removeStream

index.js:372–380  ·  view source on GitHub ↗

* Remove a MediaStream from the connection. * @param {MediaStream} stream

(stream)

Source from the content-addressed store, hash-verified

370 * @param {MediaStream} stream
371 */
372 removeStream (stream) {
373 if (this.destroying) return
374 if (this.destroyed) throw errCode(new Error('cannot removeStream after peer is destroyed'), 'ERR_DESTROYED')
375 this._debug('removeSenders()')
376
377 stream.getTracks().forEach(track => {
378 this.removeTrack(track, stream)
379 })
380 }
381
382 _needsNegotiation () {
383 this._debug('_needsNegotiation')

Callers 1

multistream.jsFile · 0.45

Calls 2

_debugMethod · 0.95
removeTrackMethod · 0.95

Tested by

no test coverage detected