SDK Reference · Type
STMediaFunction
Identifies the media subsystem or activity associated with an STMediaEvent.
Overview
This value identifies which media activity produced an event, allowing applications to distinguish playback, recording, recognition, and other runtime functions. Combine it with the event type and operation identifiers when dispatching callbacks.
public enum STMediaFunction {
case unknown
case audioPlayback
case audioRecording
case audioSegmentPlayback
case speechRecognition
case applicationState
case systemState
case audioEnvironment
case mediaPermission
case mediaAvailability
}
Use function together with STMediaEvent.type and STMediaEvent.data to interpret an event.