api/easyrtc.js
function isActionAllowedInSignalingState(action, type, signalingState) {
  return {
    offer: {
      setLocalDescription: ['stable', 'have-local-offer'],
      setRemoteDescription: ['stable', 'have-remote-offer']
    },
    answer: {
      setLocalDescription: ['have-remote-offer', 'have-local-pranswer'],
      setRemoteDescription: ['have-local-offer', 'have-remote-pranswer']
    }
  }[type][action].indexOf(signalingState) !== -1;
}
function isActionAllowedInSignalingState(action, type, signalingState) {
  return {
    offer: {
      setLocalDescription: ['stable', 'have-local-offer'],
      setRemoteDescription: ['stable', 'have-remote-offer']
    },
    answer: {
      setLocalDescription: ['have-remote-offer', 'have-local-pranswer'],
      setRemoteDescription: ['have-local-offer', 'have-remote-pranswer']
    }
  }[type][action].indexOf(signalingState) !== -1;
}
function isActionAllowedInSignalingState ( action , type , signalingState ) { return { offer : { setLocalDescription : [ 'stable' , 'have-local-offer' ] , setRemoteDescription : [ 'stable' , 'have-remote-offer' ] } , answer : { setLocalDescription : [ 'have-remote-offer' , 'have-local-pranswer' ] , setRemoteDescription : [ 'have-local-offer' , 'have-remote-pranswer' ] } } [ type ] [ action ] . indexOf ( signalingState ) !== - 1 ; }
is action=setLocalDescription with type allowed in signalingState
is action = setLocalDescription with type allowed in signalingState