Play an audio file on local storage of device or on remote server.
A string value indicates the fully qualified name of the file to play.
A string value indicates the URL of audio file
Start recording.
Stop recording.
Triggered when playback is started.
Name | Type | Description |
|---|---|---|
Status | Enum | See Status Code |
Triggered when the playback of entire audio file has completed.
Name | Type | Description |
|---|---|---|
Status | Enum | See Status Code |
Message | String |
Triggered when playback has been stopped
Name | Type | Description |
|---|---|---|
Status | Enum | See Status Code |
Define_Com Class(#xDeviceAudioPlayback) Name(#AudioPlayback) Evtroutine Handling(#COM_OWNER.Initialize) #Play.Enabled := false #Stop.Enabled := false Endroutine Evtroutine Handling(#AudioPlayback.Initialize) #Play.Enabled := true #Stop.Enabled := true Endroutine Evtroutine Handling(#Play.Click) #AudioPlayback.File := 'MyVoice' #AudioPlayback.Play() Endroutine Evtroutine Handling(#Stop.Click) #AudioPlayback.Stop Endroutine Evtroutine Handling(#AudioPlayback.Started) Status(#lstatus) If (#lstatus = 'OK') #Status := 'Playback started' Else #Status := 'Error starting playback: ' + #lstatus Endif Endroutine Evtroutine Handling(#AudioPlayback.Stopped) Status(#lstatus) If (#lstatus = OK) #Status := 'Playback stopped' Else #Status := 'Error stopping playback: ' + #lstatus Endif Endroutine Evtroutine Handling(#AudioPlayback.Completed) Status(#lstatus) If (#lstatus = OK) #Status := 'Playback completed' Else #Status := 'Playback completed with error: ' + #lstatus Endif Endroutine