createInnerAudioContext

Requires:
BaseKit≥2.3.2@ray-js/ray≥0.3.23
Platforms:
iOSAndroid
import { createInnerAudioContext } from '@ray-js/ray';

// Promise usage
try {
  const res = await createInnerAudioContext();
  console.log(res);
} catch (err) {
  console.log(err.errorMsg);
}

Method signature
createInnerAudioContext(params: )
Minimum SDK versions
iOSThingSmartBaseKitBizBundle
≥ 5.2.1
Androidcom.thingclips.smart:thingsmart-bizbundle-basekit
≥ 5.2.0

Description

Create an InnerAudioContext object

Parameters

PropertyTypeRequiredDescription
complete() => voidNoCompletion callback (executed on both success and failure)
success() => voidNoCallback on successful API call
fail(params: Object) => voidNoFailure callback
fail callback parameters
PropertyTypeDescription
errorMsgstringError message
errorCodestring | numberError code
Error extension

Return Value

Type: InnerAudioContext
InnerAudioContext
PropertyTypeDescriptionBaseKit SinceMinimum SDK versions
pausefunctionPause-—
resumefunctionResume-—
playfunctionPlay-—
seekfunctionSeek to the specified position-—
stopfunctionStop. After stopping, playback restarts from the beginning.-—
destroyDeprecatedfunctionDestroy the current instance
↳ destroyPlayer
-—
destroyPlayerfunctionDestroy the current instancev3.17.4
iOSThingSmartBaseKitBizBundle
≥ 6.2.0
Androidcom.thingclips.smart:thingsmart-bizbundle-basekit
≥ 6.2.0
onTimeUpdatefunctionListen for audio playback progress updates (progress is returned by the system and may differ across platforms)v2.4.3—
offTimeUpdatefunctionStop listening for audio playback progress updatesv3.19.0
iOSThingSmartBaseKitBizBundle
≥ 6.7.0
Androidcom.thingclips.smart:thingsmart-bizbundle-basekit
≥ 6.7.0
onPlayerStatusUpdatefunctionListen for audio playback status eventsv3.19.0
iOSThingSmartBaseKitBizBundle
≥ 6.7.0
Androidcom.thingclips.smart:thingsmart-bizbundle-basekit
≥ 6.7.0
offPlayerStatusUpdatefunctionStop listening for audio playback status eventsv3.19.0
iOSThingSmartBaseKitBizBundle
≥ 6.7.0
Androidcom.thingclips.smart:thingsmart-bizbundle-basekit
≥ 6.7.0

Examples

import { createInnerAudioContext } from '@ray-js/ray'

const manager = await createInnerAudioContext();