Vox Implant. Blog

Tag Archives: activity

Web SDK: Microphone Activity Visualization

Mic Activity

If you are embedding VoIP functionality into your web application then it’s a good idea to show end user some feedback from the system about his audio settings, especially related to his microphone / audio recording device. Combining the power of WebRTC , HTML5 and Web we can visualize audio stream coming from microphone after user allowed access to the device. The last version of Web SDK (3.6.294) provides developers with access to MediaStream object – it’s available as stream property of MicAccessResult event, or as successCallback function argument which itself is an argument of the following functions attachRecordingDevice, useAudioSource, useVideoSource, setVideoSettings.

Microphone activity event

Mic Activity

Measuring microphone activity can be useful in many cases. For example, in case of audio conference it lets developer highlight conference participant who is talking at the moment, or another useful scenario example – measuring call participant’s speech length. Now VoxImplant developers can detect microphone activity at VoxEngine scenarios level, we’ve implement new method for Call class – handleMicStatus , set handle to true and then use new CallEvents.MicStatusChange event to receive the information about microphone activity. Please check the usage example below:

  1. // Inbound call processing
  2. VoxEngine.addEventListener(AppEvents.CallAlerting, function(e) {
  3. var call = e.call;
  4. // Enable mic status tracking
  5. call.handleMicStatus(true);
  6. call.addEventListener(CallEvents.Connected, handleCallConnected);
  7. // Add event listener for mic activity events
  8. call.addEventListener(CallEvents.MicStatusChange, handleMicStatusChange);
  9. call.answer();
  10. });
  11.  
  12. function handleMicStatusChange(e) {
  13. // Write mic activity info into log file
  14. Logger.write("Mic active: "+e.active);
  15. }
  16.  
  17. function handleCallConnected(e) {
  18. Logger.write("Call connected");
  19. }

Categories

Recent Posts

May 02, 2017 12:08
H.264 video call recording is now available (in mp4 format)
Apr 17, 2017 10:58
Voximplant mobile SDK for Unity in now available
Feb 13, 2017 10:22
Authorization using tokens instead of passwords
Feb 03, 2017 01:45
Push Notifications for Android
Feb 03, 2017 01:45
Push Notifications for iOS
Jan 19, 2017 08:38
Speech-to-text: ASR
Jan 19, 2017 08:38
Speech-to-text: transcription
Jan 19, 2017 08:37
Audio Recording
Dec 28, 2016 12:47
VoIP Push Notifications support for iOS SDK has arrived
Dec 14, 2016 02:00
New billing for video calls running via servers

Archive

Tags