versatica/JsSIP — pull request #231 by mEkblom (2014-06-23 16:43:43+00:00)
Title: Media events for success or failure of getUserMedia

Hi,

I noticed it's hard to provide good user feedback when requesting media access. There is currently no way of knowing if something went wrong during media retrieval. For this I've added three events to monitor media access:
- mediaRequested: fires straight after getUserMedia has been called (can instruct user of the need to approve)
- mediaGranted: media with the constraints requested was successful (user may be informed)
- mediaDenied: media access was denied either by user action or lacking capability (error message can be displayed)

These kind of events are really necessary to build robust and user friendly applications with JsSIP so please consider merging this commit into the next release branch. Feel free to tweak it to be consistent with the application in general.