ID for the audio effect.
Get audio effect player index.
Available since: 1.16.0 Description: Get audio effect player index. When to call: It can be called after [createAudioEffectPlayer]. Restrictions: None.
Audio effect player index.
Get the total duration of the specified audio effect resource.
Available since: 1.16.0 Description: Get the total duration of the specified audio effect resource. Unit is millisecond. When to call: You should invoke this function after the audio effect resource already loaded, otherwise the return value is 0. Restrictions: It can be called after [createAudioEffectPlayer]. Related APIs: [start], [loadResource].
ID for the audio effect.
Unit is millisecond.
Load audio effect resource.
Available since: 1.16.0 Description: Load audio effect resource. Use cases: In a scene where the same sound effect is played frequently, the SDK provides the function of preloading the sound effect file into the memory in order to optimize the performance of repeatedly reading and decoding the file. When to call: It can be called after [createAudioEffectPlayer]. Restrictions: Preloading supports loading up to 15 sound effect files at the same time, and the duration of the sound effect files cannot exceed 30s, otherwise an error will be reported when loading.
ID for the audio effect.
the absolute path of the audio effect resource and cannot be null or "".
Value range: "assets://"、"ipod-library://" and network url are not supported.
Result for audio effect player loads resources
Unregister the event handler of mediaplayer
Event type.
Call back.
Register the event handler of mediaplayer
Event type.
Call back.
Pause playing audio effect.
Available since: 1.16.0 Description: Pause playing the specified audio effect [audioEffectID]. When to call: The specified [audioEffectID] is [start]. Restrictions: None.
ID for the audio effect.
Pause playing all audio effect.
Available since: 1.16.0 Description: Pause playing all audio effect. When to call: It can be called after [createAudioEffectPlayer]. Restrictions: None.
Resume playing audio effect.
Available since: 1.16.0 Description: Resume playing the specified audio effect [audioEffectID]. When to call: The specified [audioEffectID] is [pause]. Restrictions: None.
ID for the audio effect.
Resume playing all audio effect.
Available since: 1.16.0 Description: Resume playing all audio effect. When to call: It can be called after [pauseAll]. Restrictions: None.
Set the specified playback progress.
Available since: 1.16.0 Description: Set the specified audio effect playback progress. Unit is millisecond. When to call: The specified [audioEffectID] is[start], and not finished. Restrictions: None.
ID for the audio effect.
Point in time of specified playback progress.
Result for audio effect player seek to playback progress
Set volume for a single audio effect. Both the local play volume and the publish volume are set.
Available since: 1.16.0 Description: Set volume for a single audio effect. Both the local play volume and the publish volume are set. When to call: The specified [audioEffectID] is [start]. Restrictions: None.
ID for the audio effect.
Volume.
Value range: The range is 0 ~ 200.
Default value: The default is 100.
Set volume for all audio effect. Both the local play volume and the publish volume are set.
Available since: 1.16.0 Description: Set volume for all audio effect. Both the local play volume and the publish volume are set. When to call: It can be called after [createAudioEffectPlayer]. Restrictions: None.
Volume.
Value range: The range is 0 ~ 200.
Default value: The default is 100.
Start playing audio effect.
Available since: 1.16.0 Description: Start playing audio effect. The default is only played once and is not mixed into the publishing stream, if you want to change this please modify [config] param. Use cases: When you need to play short sound effects, such as applause, cheers, etc., you can use this interface to achieve, and further configure the number of plays through the [config] parameter, and mix the sound effects into the push stream. When to call: It can be called after [createAudioEffectPlayer]. Restrictions: None.
Description: ID for the audio effect. The SDK uses audioEffectID to control the playback of sound effects. The SDK does not force the user to pass in this parameter as a fixed value. It is best to ensure that each sound effect can have a unique ID. The recommended methods are static self-incrementing ID or the hash of the incoming sound effect file path.
The absolute path of the local resource.
Value range: "assets://"、"ipod-library://" and network url are not supported. Set path as null or "" if resource is loaded already using [loadResource].
Audio effect playback configuration.
Default value: Set null will only be played once, and will not be mixed into the publishing stream.
Stop playing audio effect.
Available since: 1.16.0 Description: Stop playing the specified audio effect [audioEffectID]. When to call: The specified [audioEffectID] is [start]. Restrictions: None.
ID for the audio effect.
Stop playing all audio effect.
Available since: 1.16.0 Description: Stop playing all audio effect. When to call: Some audio effects are Playing. Restrictions: None.
Unload audio effect resource.
Available since: 1.16.0 Description: Unload the specified audio effect resource. When to call: After the sound effects are used up, related resources can be released through this function; otherwise, the SDK will release the loaded resources when the AudioEffectPlayer instance is destroyed. Restrictions: None. Related APIs: [loadResource].
ID for the audio effect loaded.
Generated using TypeDoc
Get current playback progress.
Available since: 1.16.0 Description: Get current playback progress of the specified audio effect. Unit is millisecond. When to call: You should invoke this function after the audio effect resource already loaded, otherwise the return value is 0. Restrictions: None. Related APIs: [start], [loadResource].