AIPlayer Callback
1. onAIPlayerErrorV2
Callback for errors during AIPlayer operation. See AIError.
For token errors 1402 / 1407, see Troubleshooting — call generateToken()
then reconnect(); do not release().
AI_PLAYER.onAIPlayerErrorV2 = function (aiError) {
console.log("onAIPlayerErrorV2", aiError.code, aiError.message);
};
2. onAIPlayerEvent
Callback for AIPlayer events. See AIEvent.
AI_PLAYER.onAIPlayerEvent = function (aiEvent) {
console.log("event", aiEvent.type);
};
3. onAIPlayerLoadingProgressed
Callback for resource loading progress.
AI_PLAYER.onAIPlayerLoadingProgressed = function (result) {
console.log(`loading process: ${result.loading || 0}%`);
};