index.js
function stop () {
    if (this.state === 'inactive') {
      return this.em.dispatchEvent(error('stop'))
    }

    this.requestData()
    this.state = 'inactive'
    this.clone.getTracks().forEach(function (track) {
      track.stop()
    })
    return clearInterval(this.slicing)
  }
function stop () {
    if (this.state === 'inactive') {
      return this.em.dispatchEvent(error('stop'))
    }

    this.requestData()
    this.state = 'inactive'
    this.clone.getTracks().forEach(function (track) {
      track.stop()
    })
    return clearInterval(this.slicing)
  }
function stop ( ) { if ( this . state === 'inactive' ) { return this . em . dispatchEvent ( error ( 'stop' ) ) } this . requestData ( ) this . state = 'inactive' this . clone . getTracks ( ) . forEach ( function ( track ) { track . stop ( ) } ) return clearInterval ( this . slicing ) }
Stop media capture and raise `dataavailable` event with recorded data.

@return {undefined}

@example
finishButton.addEventListener('click', function () {
recorder.stop()
})
Stop media capture and raise dataavailable event with recorded data .