createInnerAudioContext
Requires:
BaseKit≥2.3.2@ray-js/ray≥0.3.23
Platforms:
iOSAndroid
Method signature
createInnerAudioContext(params: )Minimum SDK versions
- iOS
ThingSmartBaseKitBizBundle - ≥ 5.2.1
- Android
com.thingclips.smart:thingsmart-bizbundle-basekit - ≥ 5.2.0
Description
Create an InnerAudioContext object
Parameters
| Property | Type | Required | Description |
|---|---|---|---|
complete | () => void | No | Completion callback (executed on both success and failure) |
success | () => void | No | Callback on successful API call |
fail | (params: Object) => void | No | Failure callback |
fail callback parameters
| Property | Type | Description |
|---|---|---|
errorMsg | string | Error message |
errorCode | string | number | Error code |
| Error extension |
Return Value
Type: InnerAudioContext
InnerAudioContext
| Property | Type | Description | BaseKit Since | Minimum SDK versions |
|---|---|---|---|---|
pause | function | Pause | - | — |
resume | function | Resume | - | — |
play | function | Play | - | — |
seek | function | Seek to the specified position | - | — |
stop | function | Stop. After stopping, playback restarts from the beginning. | - | — |
destroyDeprecated | function | Destroy the current instance ↳ destroyPlayer | - | — |
destroyPlayer | function | Destroy the current instance | v3.17.4 |
|
onTimeUpdate | function | Listen for audio playback progress updates (progress is returned by the system and may differ across platforms) | v2.4.3 | — |
offTimeUpdate | function | Stop listening for audio playback progress updates | v3.19.0 |
|
onPlayerStatusUpdate | function | Listen for audio playback status events | v3.19.0 |
|
offPlayerStatusUpdate | function | Stop listening for audio playback status events | v3.19.0 |
|