AIPlayer Callback
1. onAIPlayerError
Callback for Errors during AIPlayer operation
| Param | Type | Description |
|---|---|---|
json | Object | arguments of the onAIPlayerError |
json.error | String | error information |
json.errorCode | Number | error code |
json.description | String | Error Description |
json.detail | String | Error Detail |
- Example
AI_PLAYER.onAIPlayerError = function (err) {
// err => { errorCode: 1400, error: "...", description: "...", detail: "..." }
};
2. onAIPlayerStateChanged
Callback for AIPlayer State Change
-
Callback Parameter
Param Type Value Description stateString'playerLoadStarted'|'playerLoadComplete'|'speakingPrepareStarted'|'speakingPrepareComplete'|'speakingStarted'|'speakingComplete'|AIPlayer state -
Example
AI_PLAYER.onAIPlayerStateChanged = function (state) {
if (state === "playerLoadStarted") {
// ...
}
// ...
};