MobileTogether's Audio Recording feature enables audio to be recorded via the client device's audio recording app and be saved to a file on the client device.
Audio recording is started via the Audio Recording (Start) action (see screenshot below) and stopped via the Audio Recording (Stop) action. See the description of the Audio Recording action for details. Typically, each Audio Recording action will be assigned to a control event, such as a button click. When the event occurs, the Audio Recording action is triggered. For example, one button can be used to start the recording and another can be used to stop the recording. Recording is also automatically stopped when the end user leaves the page on which the audio recording was started or when the solution is suspended.
The Audio Recording feature works as follows:
•When the Audio Recording Start action is triggered, the device's recording app is started and audio is recorded to the file named in the action (see screenshot above). This file must be on the client device.
•You can specify which encoder (codec) is used for each operating system. If you leave these settings blank, then the default codec on each device will be used. For Android systems, you can also specify the file format of the recorded file.
•You can specify the file size and recording duration of files that are recorded. If one of these limits is reached, then recording is stopped and is considered to have been completed.
•You can also specify the sampling rate and encoding bitrate of recordings. If you leave these settings blank, then the default settings of the recording codec will be used. If you wish to specify your own settings, be sure to consult the related audio encoding standard or the encoder specifications.
•The Audio Recording Stop action stops any audio recording that was started on that page.
|Note:||If audio is being recorded when the end user leaves the page or when a solution is suspended, then recording is stopped. If a second recording action is started while one is in progress, then the first recording action is stopped. The first recording action is considered to be interrupted, that is, unfinished.|
|Note:||Audio should not be recorded at the same time as audio/video is being played back as this could result in problems with the playback state, particularly on iOS devices.|
Audio recording events
Audio Recording events are defined per page. Two events are available: OnAudioRecordingError and OnAudioRecordingFinished. The actions that are defined for these events apply to all Audio Recordings on the page. You can access these events by either (i) clicking the Additional Dialog button of the Audio Recording Actions property, or (ii) right-clicking in the design and selecting Page Audio Recording Actions. For each event, you can define the actions to perform by dragging and dropping actions from the left-hand Actions pane into the event's tab.
•OnAudioRecordingError: Possible errors could be: File not Found, a file format error, or a recording interruption. Information about the error can be retrieved with the MobileTogether XPath extension function mt-external-error. If actions are defined for the event, these actions are executed. Otherwise, the error is shown in a message box.
•OnAudioRecordingFinished: Audio recording is considered to be finished when the maximum file size (Max File Size) or maximum duration (Max Recording Duration) has been reached (see screenshot above).
Audio-recording-related MobileTogether XPath extension functions
The following audio-recording-related MobileTogether XPath extension function is available:
•mt-audio-is-recording() as xs:boolean
You can use this function in XPath expressions, for example, to specify processing that is conditional on whether audio is currently recording or not.