The microphone component allows JSF applications to access a mobile device audio recorder. The component renders a simple button that, when pressed, activates a native interface that captures audio using the device microphone. Audio data captured by the device is inserted into the calling form and data is submitted to the server via a standard JSF form post.

The button label can be changed after audio has been recorded to notify the user. The 'buttonLabel' attribute is first displayed, and after the audio has been captured, the 'captureMessageLabel' attribute value is then shown as the button label.

Value binding is achieved via a Map object so that other important sound data can be stored along with the sound file data. A typical microphone component setup looks as follows:

    <mobi:microphone
      duration="10"
      buttonLabel="Record Audio"
      captureMessageLabel="Audio recorded"
      value="#{bean.audioFileMap}"/>

Device audio recording access is only available if the application is running in an ICEmobile device container or if ICEmobile SX has been registered, otherwise the component will display a file upload input component.