zego-express-engine-reactnative
Version:
React Native Zego Express Video for Android & iOS
820 lines • 50.5 kB
HTML
<!doctype html>
<html class="default no-js">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>ZegoAudioEffectPlayer | zego-express-engine-reactnative</title>
<meta name="description" content="Documentation for zego-express-engine-reactnative">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../assets/css/main.css">
</head>
<body>
<header>
<div class="tsd-page-toolbar">
<div class="container">
<div class="table-wrap">
<div class="table-cell" id="tsd-search" data-index="../assets/js/search.json" data-base="..">
<div class="field">
<label for="tsd-search-field" class="tsd-widget search no-caption">Search</label>
<input id="tsd-search-field" type="text" />
</div>
<ul class="results">
<li class="state loading">Preparing search index...</li>
<li class="state failure">The search index is not available</li>
</ul>
<a href="../index.html" class="title">zego-express-engine-reactnative</a>
</div>
<div class="table-cell" id="tsd-widgets">
<div id="tsd-filter">
<a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a>
<div class="tsd-filter-group">
<div class="tsd-select" id="tsd-filter-visibility">
<span class="tsd-select-label">All</span>
<ul class="tsd-select-list">
<li data-value="public">Public</li>
<li data-value="protected">Public/Protected</li>
<li data-value="private" class="selected">All</li>
</ul>
</div>
<input type="checkbox" id="tsd-filter-inherited" checked />
<label class="tsd-widget" for="tsd-filter-inherited">Inherited</label>
<input type="checkbox" id="tsd-filter-externals" checked />
<label class="tsd-widget" for="tsd-filter-externals">Externals</label>
<input type="checkbox" id="tsd-filter-only-exported" />
<label class="tsd-widget" for="tsd-filter-only-exported">Only exported</label>
</div>
</div>
<a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a>
</div>
</div>
</div>
</div>
<div class="tsd-page-title">
<div class="container">
<ul class="tsd-breadcrumb">
<li>
<a href="../globals.html">Globals</a>
</li>
<li>
<a href="../modules/_zegoexpressdefines_.html">"ZegoExpressDefines"</a>
</li>
<li>
<a href="_zegoexpressdefines_.zegoaudioeffectplayer.html">ZegoAudioEffectPlayer</a>
</li>
</ul>
<h1>Class ZegoAudioEffectPlayer</h1>
</div>
</div>
</header>
<div class="container container-main">
<div class="row">
<div class="col-8 col-content">
<section class="tsd-panel tsd-hierarchy">
<h3>Hierarchy</h3>
<ul class="tsd-hierarchy">
<li>
<span class="target">ZegoAudioEffectPlayer</span>
<ul class="tsd-hierarchy">
<li>
<a href="_impl_zegoexpressengineimpl_.zegoaudioeffectplayerimpl.html" class="tsd-signature-type">ZegoAudioEffectPlayerImpl</a>
</li>
</ul>
</li>
</ul>
</section>
<section class="tsd-panel-group tsd-index-group">
<h2>Index</h2>
<section class="tsd-panel tsd-index-panel">
<div class="tsd-index-content">
<section class="tsd-index-section tsd-is-external">
<h3>Methods</h3>
<ul class="tsd-index-list">
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="_zegoexpressdefines_.zegoaudioeffectplayer.html#getcurrentprogress" class="tsd-kind-icon">get<wbr>Current<wbr>Progress</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="_zegoexpressdefines_.zegoaudioeffectplayer.html#getindex" class="tsd-kind-icon">get<wbr>Index</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="_zegoexpressdefines_.zegoaudioeffectplayer.html#gettotalduration" class="tsd-kind-icon">get<wbr>Total<wbr>Duration</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="_zegoexpressdefines_.zegoaudioeffectplayer.html#loadresource" class="tsd-kind-icon">load<wbr>Resource</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-external"><a href="_zegoexpressdefines_.zegoaudioeffectplayer.html#off" class="tsd-kind-icon">off</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-external"><a href="_zegoexpressdefines_.zegoaudioeffectplayer.html#on" class="tsd-kind-icon">on</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="_zegoexpressdefines_.zegoaudioeffectplayer.html#pause" class="tsd-kind-icon">pause</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="_zegoexpressdefines_.zegoaudioeffectplayer.html#pauseall" class="tsd-kind-icon">pause<wbr>All</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="_zegoexpressdefines_.zegoaudioeffectplayer.html#resume" class="tsd-kind-icon">resume</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="_zegoexpressdefines_.zegoaudioeffectplayer.html#resumeall" class="tsd-kind-icon">resume<wbr>All</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="_zegoexpressdefines_.zegoaudioeffectplayer.html#seekto" class="tsd-kind-icon">seek<wbr>To</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="_zegoexpressdefines_.zegoaudioeffectplayer.html#setvolume" class="tsd-kind-icon">set<wbr>Volume</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="_zegoexpressdefines_.zegoaudioeffectplayer.html#setvolumeall" class="tsd-kind-icon">set<wbr>Volume<wbr>All</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="_zegoexpressdefines_.zegoaudioeffectplayer.html#start" class="tsd-kind-icon">start</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="_zegoexpressdefines_.zegoaudioeffectplayer.html#stop" class="tsd-kind-icon">stop</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="_zegoexpressdefines_.zegoaudioeffectplayer.html#stopall" class="tsd-kind-icon">stop<wbr>All</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="_zegoexpressdefines_.zegoaudioeffectplayer.html#unloadresource" class="tsd-kind-icon">unload<wbr>Resource</a></li>
</ul>
</section>
</div>
</section>
</section>
<section class="tsd-panel-group tsd-member-group tsd-is-external">
<h2>Methods</h2>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-external">
<a name="getcurrentprogress" class="tsd-anchor"></a>
<h3><span class="tsd-flag ts-flagAbstract">Abstract</span> get<wbr>Current<wbr>Progress</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-external">
<li class="tsd-signature tsd-kind-icon">get<wbr>Current<wbr>Progress<span class="tsd-signature-symbol">(</span>audioEffectID<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">></span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in ZegoExpressDefines.ts:2239</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Get current playback progress.</p>
</div>
<p>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].</p>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>audioEffectID: <span class="tsd-signature-type">number</span></h5>
<div class="tsd-comment tsd-typography">
<p>ID for the audio effect.</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">></span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-external">
<a name="getindex" class="tsd-anchor"></a>
<h3><span class="tsd-flag ts-flagAbstract">Abstract</span> get<wbr>Index</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-external">
<li class="tsd-signature tsd-kind-icon">get<wbr>Index<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in ZegoExpressDefines.ts:2279</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Get audio effect player index.</p>
</div>
<p>Available since: 1.16.0
Description: Get audio effect player index.
When to call: It can be called after [createAudioEffectPlayer].
Restrictions: None.</p>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4>
<p>Audio effect player index.</p>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-external">
<a name="gettotalduration" class="tsd-anchor"></a>
<h3><span class="tsd-flag ts-flagAbstract">Abstract</span> get<wbr>Total<wbr>Duration</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-external">
<li class="tsd-signature tsd-kind-icon">get<wbr>Total<wbr>Duration<span class="tsd-signature-symbol">(</span>audioEffectID<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">></span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in ZegoExpressDefines.ts:2227</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Get the total duration of the specified audio effect resource.</p>
</div>
<p>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].</p>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>audioEffectID: <span class="tsd-signature-type">number</span></h5>
<div class="tsd-comment tsd-typography">
<p>ID for the audio effect.</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">></span></h4>
<p>Unit is millisecond.</p>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-external">
<a name="loadresource" class="tsd-anchor"></a>
<h3><span class="tsd-flag ts-flagAbstract">Abstract</span> load<wbr>Resource</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-external">
<li class="tsd-signature tsd-kind-icon">load<wbr>Resource<span class="tsd-signature-symbol">(</span>audioEffectID<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, path<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><a href="../interfaces/_zegoexpressdefines_.zegoaudioeffectplayerloadresourceresult.html" class="tsd-signature-type">ZegoAudioEffectPlayerLoadResourceResult</a><span class="tsd-signature-symbol">></span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in ZegoExpressDefines.ts:2253</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Load audio effect resource.</p>
</div>
<p>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.</p>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>audioEffectID: <span class="tsd-signature-type">number</span></h5>
<div class="tsd-comment tsd-typography">
<p>ID for the audio effect.</p>
</div>
</li>
<li>
<h5>path: <span class="tsd-signature-type">string</span></h5>
<div class="tsd-comment tsd-typography">
<p>the absolute path of the audio effect resource and cannot be null or "". <br>Value range: "assets://"、"ipod-library://" and network url are not supported.</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><a href="../interfaces/_zegoexpressdefines_.zegoaudioeffectplayerloadresourceresult.html" class="tsd-signature-type">ZegoAudioEffectPlayerLoadResourceResult</a><span class="tsd-signature-symbol">></span></h4>
<p>Result for audio effect player loads resources</p>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-external">
<a name="off" class="tsd-anchor"></a>
<h3><span class="tsd-flag ts-flagAbstract">Abstract</span> off</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-external">
<li class="tsd-signature tsd-kind-icon">off<AudioEffectPlayerEventType><span class="tsd-signature-symbol">(</span>event<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">AudioEffectPlayerEventType</span>, callback<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">ZegoAudioEffectPlayerListener</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">AudioEffectPlayerEventType</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in ZegoExpressDefines.ts:2296</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Unregister the event handler of mediaplayer</p>
</div>
</div>
<h4 class="tsd-type-parameters-title">Type parameters</h4>
<ul class="tsd-type-parameters">
<li>
<h4>AudioEffectPlayerEventType<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">keyof </span><a href="../interfaces/_zegoexpresseventhandler_.zegoaudioeffectplayerlistener.html" class="tsd-signature-type">ZegoAudioEffectPlayerListener</a></h4>
</li>
</ul>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>event: <span class="tsd-signature-type">AudioEffectPlayerEventType</span></h5>
<div class="tsd-comment tsd-typography">
<p>Event type.</p>
</div>
</li>
<li>
<h5>callback: <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">ZegoAudioEffectPlayerListener</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">AudioEffectPlayerEventType</span><span class="tsd-signature-symbol">]</span></h5>
<div class="tsd-comment tsd-typography">
<p>Call back.</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-external">
<a name="on" class="tsd-anchor"></a>
<h3><span class="tsd-flag ts-flagAbstract">Abstract</span> on</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-external">
<li class="tsd-signature tsd-kind-icon">on<AudioEffectPlayerEventType><span class="tsd-signature-symbol">(</span>event<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">AudioEffectPlayerEventType</span>, callback<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">ZegoAudioEffectPlayerListener</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">AudioEffectPlayerEventType</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in ZegoExpressDefines.ts:2286</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Register the event handler of mediaplayer</p>
</div>
</div>
<h4 class="tsd-type-parameters-title">Type parameters</h4>
<ul class="tsd-type-parameters">
<li>
<h4>AudioEffectPlayerEventType<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">keyof </span><a href="../interfaces/_zegoexpresseventhandler_.zegoaudioeffectplayerlistener.html" class="tsd-signature-type">ZegoAudioEffectPlayerListener</a></h4>
</li>
</ul>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>event: <span class="tsd-signature-type">AudioEffectPlayerEventType</span></h5>
<div class="tsd-comment tsd-typography">
<p>Event type.</p>
</div>
</li>
<li>
<h5>callback: <span class="tsd-signature-type">ZegoAudioEffectPlayerListener</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">AudioEffectPlayerEventType</span><span class="tsd-signature-symbol">]</span></h5>
<div class="tsd-comment tsd-typography">
<p>Call back.</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-external">
<a name="pause" class="tsd-anchor"></a>
<h3><span class="tsd-flag ts-flagAbstract">Abstract</span> pause</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-external">
<li class="tsd-signature tsd-kind-icon">pause<span class="tsd-signature-symbol">(</span>audioEffectID<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in ZegoExpressDefines.ts:2137</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Pause playing audio effect.</p>
</div>
<p>Available since: 1.16.0
Description: Pause playing the specified audio effect [audioEffectID].
When to call: The specified [audioEffectID] is [start].
Restrictions: None.</p>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>audioEffectID: <span class="tsd-signature-type">number</span></h5>
<div class="tsd-comment tsd-typography">
<p>ID for the audio effect.</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-external">
<a name="pauseall" class="tsd-anchor"></a>
<h3><span class="tsd-flag ts-flagAbstract">Abstract</span> pause<wbr>All</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-external">
<li class="tsd-signature tsd-kind-icon">pause<wbr>All<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in ZegoExpressDefines.ts:2166</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Pause playing all audio effect.</p>
</div>
<p>Available since: 1.16.0
Description: Pause playing all audio effect.
When to call: It can be called after [createAudioEffectPlayer].
Restrictions: None.</p>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-external">
<a name="resume" class="tsd-anchor"></a>
<h3><span class="tsd-flag ts-flagAbstract">Abstract</span> resume</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-external">
<li class="tsd-signature tsd-kind-icon">resume<span class="tsd-signature-symbol">(</span>audioEffectID<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in ZegoExpressDefines.ts:2148</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Resume playing audio effect.</p>
</div>
<p>Available since: 1.16.0
Description: Resume playing the specified audio effect [audioEffectID].
When to call: The specified [audioEffectID] is [pause].
Restrictions: None.</p>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>audioEffectID: <span class="tsd-signature-type">number</span></h5>
<div class="tsd-comment tsd-typography">
<p>ID for the audio effect.</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-external">
<a name="resumeall" class="tsd-anchor"></a>
<h3><span class="tsd-flag ts-flagAbstract">Abstract</span> resume<wbr>All</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-external">
<li class="tsd-signature tsd-kind-icon">resume<wbr>All<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in ZegoExpressDefines.ts:2175</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Resume playing all audio effect.</p>
</div>
<p>Available since: 1.16.0
Description: Resume playing all audio effect.
When to call: It can be called after [pauseAll].
Restrictions: None.</p>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-external">
<a name="seekto" class="tsd-anchor"></a>
<h3><span class="tsd-flag ts-flagAbstract">Abstract</span> seek<wbr>To</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-external">
<li class="tsd-signature tsd-kind-icon">seek<wbr>To<span class="tsd-signature-symbol">(</span>audioEffectID<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, millisecond<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><a href="../interfaces/_zegoexpressdefines_.zegoaudioeffectplayerseektoresult.html" class="tsd-signature-type">ZegoAudioEffectPlayerSeekToResult</a><span class="tsd-signature-symbol">></span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in ZegoExpressDefines.ts:2188</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Set the specified playback progress.</p>
</div>
<p>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.</p>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>audioEffectID: <span class="tsd-signature-type">number</span></h5>
<div class="tsd-comment tsd-typography">
<p>ID for the audio effect.</p>
</div>
</li>
<li>
<h5>millisecond: <span class="tsd-signature-type">number</span></h5>
<div class="tsd-comment tsd-typography">
<p>Point in time of specified playback progress.</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><a href="../interfaces/_zegoexpressdefines_.zegoaudioeffectplayerseektoresult.html" class="tsd-signature-type">ZegoAudioEffectPlayerSeekToResult</a><span class="tsd-signature-symbol">></span></h4>
<p>Result for audio effect player seek to playback progress</p>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-external">
<a name="setvolume" class="tsd-anchor"></a>
<h3><span class="tsd-flag ts-flagAbstract">Abstract</span> set<wbr>Volume</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-external">
<li class="tsd-signature tsd-kind-icon">set<wbr>Volume<span class="tsd-signature-symbol">(</span>audioEffectID<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, volume<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in ZegoExpressDefines.ts:2203</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Set volume for a single audio effect. Both the local play volume and the publish volume are set.</p>
</div>
<p>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.</p>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>audioEffectID: <span class="tsd-signature-type">number</span></h5>
<div class="tsd-comment tsd-typography">
<p>ID for the audio effect.</p>
</div>
</li>
<li>
<h5>volume: <span class="tsd-signature-type">number</span></h5>
<div class="tsd-comment tsd-typography">
<p>Volume. <br>Value range: The range is 0 ~ 200. <br>Default value: The default is 100.</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-external">
<a name="setvolumeall" class="tsd-anchor"></a>
<h3><span class="tsd-flag ts-flagAbstract">Abstract</span> set<wbr>Volume<wbr>All</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-external">
<li class="tsd-signature tsd-kind-icon">set<wbr>Volume<wbr>All<span class="tsd-signature-symbol">(</span>volume<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in ZegoExpressDefines.ts:2214</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Set volume for all audio effect. Both the local play volume and the publish volume are set.</p>
</div>
<p>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.</p>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>volume: <span class="tsd-signature-type">number</span></h5>
<div class="tsd-comment tsd-typography">
<p>Volume. <br>Value range: The range is 0 ~ 200. <br>Default value: The default is 100.</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-external">
<a name="start" class="tsd-anchor"></a>
<h3><span class="tsd-flag ts-flagAbstract">Abstract</span> start</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-external">
<li class="tsd-signature tsd-kind-icon">start<span class="tsd-signature-symbol">(</span>audioEffectID<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, path<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">string</span>, config<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><a href="_zegoexpressdefines_.zegoaudioeffectplayconfig.html" class="tsd-signature-type">ZegoAudioEffectPlayConfig</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in ZegoExpressDefines.ts:2111</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Start playing audio effect.</p>
</div>
<p>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.</p>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>audioEffectID: <span class="tsd-signature-type">number</span></h5>
<div class="tsd-comment tsd-typography">
<p>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.</p>
</div>
</li>
<li>
<h5>path: <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">string</span></h5>
<div class="tsd-comment tsd-typography">
<p>The absolute path of the local resource. <br>Value range: "assets://"、"ipod-library://" and network url are not supported. Set path as null or "" if resource is loaded already using [loadResource].</p>
</div>
</li>
<li>
<h5>config: <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><a href="_zegoexpressdefines_.zegoaudioeffectplayconfig.html" class="tsd-signature-type">ZegoAudioEffectPlayConfig</a></h5>
<div class="tsd-comment tsd-typography">
<p>Audio effect playback configuration. <br>Default value: Set null will only be played once, and will not be mixed into the publishing stream.</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-external">
<a name="stop" class="tsd-anchor"></a>
<h3><span class="tsd-flag ts-flagAbstract">Abstract</span> stop</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-external">
<li class="tsd-signature tsd-kind-icon">stop<span class="tsd-signature-symbol">(</span>audioEffectID<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in ZegoExpressDefines.ts:2126</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Stop playing audio effect.</p>
</div>
<p>Available since: 1.16.0
Description: Stop playing the specified audio effect [audioEffectID].
When to call: The specified [audioEffectID] is [start].
Restrictions: None.</p>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>audioEffectID: <span class="tsd-signature-type">number</span></h5>
<div class="tsd-comment tsd-typography">
<p>ID for the audio effect.</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-external">
<a name="stopall" class="tsd-anchor"></a>
<h3><span class="tsd-flag ts-flagAbstract">Abstract</span> stop<wbr>All</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-external">
<li class="tsd-signature tsd-kind-icon">stop<wbr>All<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in ZegoExpressDefines.ts:2157</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Stop playing all audio effect.</p>
</div>
<p>Available since: 1.16.0
Description: Stop playing all audio effect.
When to call: Some audio effects are Playing.
Restrictions: None.</p>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-external">
<a name="unloadresource" class="tsd-anchor"></a>
<h3><span class="tsd-flag ts-flagAbstract">Abstract</span> unload<wbr>Resource</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-external">
<li class="tsd-signature tsd-kind-icon">unload<wbr>Resource<span class="tsd-signature-symbol">(</span>audioEffectID<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in ZegoExpressDefines.ts:2268</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Unload audio effect resource.</p>
</div>
<p>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].</p>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>audioEffectID: <span class="tsd-signature-type">number</span></h5>
<div class="tsd-comment tsd-typography">
<p>ID for the audio effect loaded.</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></h4>
</li>
</ul>
</section>
</section>
</div>
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
<nav class="tsd-navigation primary">
<ul>
<li class="globals ">
<a href="../globals.html"><em>Globals</em></a>
</li>
<li class="label tsd-is-external">
<span>Internals</span>
</li>
<li class=" tsd-kind-module">
<a href="../modules/_index_.html">"index"</a>
</li>
<li class="label tsd-is-external">
<span>Externals</span>
</li>
<li class="current tsd-kind-module tsd-is-external">
<a href="../modules/_zegoexpressdefines_.html">"<wbr>Zego<wbr>Express<wbr>Defines"</a>
</li>
<li class=" tsd-kind-module tsd-is-external">
<a href="../modules/_zegoexpressengine_.html">"<wbr>Zego<wbr>Express<wbr>Engine"</a>
</li>
<li class=" tsd-kind-module tsd-is-external">
<a href="../modules/_zegoexpresseventhandler_.html">"<wbr>Zego<wbr>Express<wbr>Event<wbr>Handler"</a>
</li>
<li class=" tsd-kind-module tsd-is-external">
<a href="../modules/_zegorenderview_.html">"<wbr>Zego<wbr>Render<wbr>View"</a>
</li>
<li class=" tsd-kind-module tsd-is-external">
<a href="../modules/_impl_zegoexpressengineimpl_.html">"impl/<wbr>Zego<wbr>Express<wbr>Engine<wbr>Impl"</a>
</li>
</ul>
</nav>
<nav class="tsd-navigation secondary menu-sticky">
<ul class="before-current">
</ul>
<ul class="current">
<li class="current tsd-kind-class tsd-parent-kind-module tsd-is-external">
<a href="_zegoexpressdefines_.zegoaudioeffectplayer.html" class="tsd-kind-icon">Zego<wbr>Audio<wbr>Effect<wbr>Player</a>
<ul>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-external">
<a href="_zegoexpressdefines_.zegoaudioeffectplayer.html#getcurrentprogress" class="tsd-kind-icon">get<wbr>Current<wbr>Progress</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-external">
<a href="_zegoexpressdefines_.zegoaudioeffectplayer.html#getindex" class="tsd-kind-icon">get<wbr>Index</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-external">
<a href="_zegoexpressdefines_.zegoaudioeffectplayer.html#gettotalduration" class="tsd-kind-icon">get<wbr>Total<wbr>Duration</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-external">
<a href="_zegoexpressdefines_.zegoaudioeffectplayer.html#loadresource" class="tsd-kind-icon">load<wbr>Resource</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-external">
<a href="_zegoexpressdefines_.zegoaudioeffectplayer.html#off" class="tsd-kind-icon">off</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-external">
<a href="_zegoexpressdefines_.zegoaudioeffectplayer.html#on" class="tsd-kind-icon">on</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-external">
<a href="_zegoexpressdefines_.zegoaudioeffectplayer.html#pause" class="tsd-kind-icon">pause</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-external">
<a href="_zegoexpressdefines_.zegoaudioeffectplayer.html#pauseall" class="tsd-kind-icon">pause<wbr>All</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-external">
<a href="_zegoexpressdefines_.zegoaudioeffectplayer.html#resume" class="tsd-kind-icon">resume</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-external">
<a href="_zegoexpressdefines_.zegoaudioeffectplayer.html#resumeall" class="tsd-kind-icon">resume<wbr>All</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-external">
<a href="_zegoexpressdefines_.zegoaudioeffectplayer.html#seekto" class="tsd-kind-icon">seek<wbr>To</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-external">
<a href="_zegoexpressdefines_.zegoaudioeffectplayer.html#setvolume" class="tsd-kind-icon">set<wbr>Volume</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-external">
<a href="_zegoexpressdefines_.zegoaudioeffectplayer.html#setvolumeall" class="tsd-kind-icon">set<wbr>Volume<wbr>All</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-external">
<a href="_zegoexpressdefines_.zegoaudioeffectplayer.html#start" class="tsd-kind-icon">start</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-external">
<a href="_zegoexpressdefines_.zegoaudioeffectplayer.html#stop" class="tsd-kind-icon">stop</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-external">
<a href="_zegoexpressdefines_.zegoaudioeffectplayer.html#stopall" class="tsd-kind-icon">stop<wbr>All</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-external">
<a href="_zegoexpressdefines_.zegoaudioeffectplayer.html#unloadresour