Skip to content

Commit

Permalink
New translations
Browse files Browse the repository at this point in the history
  • Loading branch information
Cilla-luodan committed May 9, 2024
1 parent 639b691 commit 93d914e
Show file tree
Hide file tree
Showing 6 changed files with 127 additions and 91 deletions.
31 changes: 18 additions & 13 deletions en-US/dita/RTC-NG/API/api_irtcengine_disableaudio.dita
Original file line number Diff line number Diff line change
Expand Up @@ -16,33 +16,38 @@
<codeblock props="android" outputclass="language-java">public abstract int disableAudio();</codeblock>
<codeblock props="ios mac" outputclass="language-objectivec">- (int)disableAudio;</codeblock>
<codeblock props="cpp unreal" outputclass="language-cpp">virtual int disableAudio() = 0;</codeblock>
<codeblock props="bp" outputclass="language-cpp">UFUNCTION(BlueprintCallable, Category = &quot;Agora|RtcEngineProxy&quot;)
<codeblock props="bp" outputclass="language-cpp">UFUNCTION(BlueprintCallable, Category = &quot;Agora|RtcEngineProxy&quot;)
int DisableAudio();</codeblock>
<codeblock props="electron" outputclass="language-typescript">abstract disableAudio(): number;</codeblock>
<codeblock props="unity cs" outputclass="language-csharp">public abstract int DisableAudio();</codeblock>
<codeblock props="rn" outputclass="language-typescript">abstract disableAudio(): number;</codeblock>
<codeblock props="flutter" outputclass="language-dart">Future&lt;void&gt; disableAudio();</codeblock>
<codeblock props="reserve" outputclass="language-cpp"></codeblock></p>
</section>
<section id="detailed_desc">
<title>Details</title>
<note type="attention" id="note">
<ul>
<li>This method disables the internal engine and can be called anytime after initialization. It is still valid after one leaves channel.</li>
<li>This method resets the internal engine and takes some time to take effect. Agora recommends using the following API methods to control the audio modules separately:<ul>
<section id="detailed_desc" deliveryTarget="details" otherprops="no-title">
<p>音频模块默认开启,你可以调用该方法关闭音频模块。</p>
</section>
<section id="timing" deliveryTarget="details">
<title>Call timing</title>
<p>It can be called either before or after joining the channel. It is still valid after one leaves channel.</p>
</section>
<section id="restriction" deliveryTarget="details">
<title>Restrictions</title>
<p>This method resets the internal engine and takes some time to take effect. Agora recommends using the following API methods to control the audio modules separately:<ul>
<li><xref keyref="enableLocalAudio"/>: Whether to enable the microphone to create the local audio stream.</li>
<li props="mac cpp unity flutter electron unreal bp cs"><xref keyref="enableLoopbackRecording"/>: Whether to enable loopback audio capturing.</li>
<li><xref keyref="muteLocalAudioStream" />: Whether to publish the local audio stream.</li>
<li><xref keyref="muteRemoteAudioStream" />: Whether to subscribe and play the remote audio stream.</li>
<li><xref keyref="muteAllRemoteAudioStreams" />: Whether to subscribe to and play all remote audio streams.</li>
</ul></li>
</ul></note> </section>
</ul>
</p>
</section>
<section id="return_values">
<title><ph keyref="return-section-title"/></title>
<p props="flutter">When the method call succeeds, there is no return value; when fails, the <xref keyref="AgoraRtcException"/> exception is thrown. You need to catch the exception and handle it accordingly. <ph props="cn">See <xref keyref="error-code-link"/> for details and resolution suggestions.</ph></p>
<ul props="native unreal bp electron unity rn cs">
<li>0: Success.</li>
<li>&lt; 0: Failure. <ph props="cn">See <xref keyref="error-code-link"/> for details and resolution suggestions.</ph></li>
<li>0: Success.</li>
<li>&lt; 0: Failure. <ph props="cn">See <xref keyref="error-code-link"/> for details and resolution suggestions.</ph></li>
</ul> </section>
</refbody>
</reference>
</refbody>
</reference>
27 changes: 16 additions & 11 deletions en-US/dita/RTC-NG/API/api_irtcengine_enableaudio.dita
Original file line number Diff line number Diff line change
Expand Up @@ -16,34 +16,39 @@
<codeblock props="android" outputclass="language-java">public abstract int enableAudio();</codeblock>
<codeblock props="ios mac" outputclass="language-objectivec">- (int)enableAudio;</codeblock>
<codeblock props="cpp unreal" outputclass="language-cpp">virtual int enableAudio() = 0;</codeblock>
<codeblock props="bp" outputclass="language-cpp">UFUNCTION(BlueprintCallable, Category = &quot;Agora|RtcEngineProxy&quot;)
<codeblock props="bp" outputclass="language-cpp">UFUNCTION(BlueprintCallable, Category = &quot;Agora|RtcEngineProxy&quot;)
int EnableAudio();</codeblock>
<codeblock props="electron" outputclass="language-typescript">abstract enableAudio(): number;</codeblock>
<codeblock props="unity cs" outputclass="language-csharp">public abstract int EnableAudio();</codeblock>
<codeblock props="rn" outputclass="language-typescript">abstract enableAudio(): number;</codeblock>
<codeblock props="flutter" outputclass="language-dart">Future&lt;void&gt; enableAudio();</codeblock>
<codeblock props="reserve" outputclass="language-cpp"></codeblock></p>
</section>
<section id="detailed_desc">
<title>Details</title>
<p id="desc">The audio mode is enabled by default.</p>
<note type="attention">
<section id="detailed_desc" deliveryTarget="details" otherprops="no-title">
<p id="desc">音频模块默认开启。 如果你调用 <xref keyref="disableAudio"/> 关闭了音频模块,可调用该方法重新开启。</p>
</section>
<section id="timing" deliveryTarget="details">
<title>Call timing</title>
<p>It can be called either before or after joining the channel. It is still valid after one leaves channel.</p>
</section>
<section id="restriction" deliveryTarget="details">
<title>Restrictions</title>
<ul>
<li>This method enables the internal engine and can be called anytime after initialization. It is still valid after one leaves channel.</li>
<li>Calling this method will reset the entire engine, resulting in a slow response time. Instead of callling this method, you can independently control a specific audio module based on your actual needs using the following methods:<ul>
<li><xref keyref="enableLocalAudio" />: Whether to enable the microphone to create the local audio stream.</li>
<li><xref keyref="muteLocalAudioStream" />: Whether to publish the local audio stream.</li>
<li><xref keyref="muteRemoteAudioStream" />: Whether to subscribe and play the remote audio stream.</li>
<li><xref keyref="muteAllRemoteAudioStreams" />: Whether to subscribe to and play all remote audio streams.</li>
</ul></li>
<li>A successful call of this method resets <apiname keyref="enableLocalAudio" />, <apiname keyref="muteRemoteAudioStream" />, and <apiname keyref="muteAllRemoteAudioStreams" />. Proceed it with caution.</li>
</ul></note> </section>
</ul>
</section>
<section id="return_values">
<title><ph keyref="return-section-title"/></title>
<p props="flutter">When the method call succeeds, there is no return value; when fails, the <xref keyref="AgoraRtcException"/> exception is thrown. You need to catch the exception and handle it accordingly. <ph props="cn">See <xref keyref="error-code-link"/> for details and resolution suggestions.</ph></p>
<ul props="native unreal bp electron unity rn cs">
<li>0: Success.</li>
<li>&lt; 0: Failure. <ph props="cn">See <xref keyref="error-code-link"/> for details and resolution suggestions.</ph></li>
<li>0: Success.</li>
<li>&lt; 0: Failure. <ph props="cn">See <xref keyref="error-code-link"/> for details and resolution suggestions.</ph></li>
</ul> </section>
</refbody>
</reference>
</refbody>
</reference>
41 changes: 25 additions & 16 deletions en-US/dita/RTC-NG/API/api_irtcengine_enablelocalaudio.dita
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<!DOCTYPE reference PUBLIC "-//OASIS//DTD DITA Reference//EN" "reference.dtd">
<reference id="api_irtcengine_enablelocalaudio">
<title><ph keyref="enableLocalAudio" /></title>
<shortdesc id="short"><ph id="shortdesc">Enables or disables the local audio capture.</ph></shortdesc>
<shortdesc id="short"><ph id="shortdesc">Enables or disables the local audio.</ph></shortdesc>
<prolog>
<metadata>
<keywords>
Expand All @@ -16,38 +16,47 @@
<codeblock props="android" outputclass="language-java">public abstract int enableLocalAudio(boolean enabled);</codeblock>
<codeblock props="ios mac" outputclass="language-objectivec">- (int)enableLocalAudio:(BOOL)enabled;</codeblock>
<codeblock props="cpp unreal" outputclass="language-cpp">virtual int enableLocalAudio(bool enabled) = 0;</codeblock>
<codeblock props="bp" outputclass="language-cpp">UFUNCTION(BlueprintCallable, Category = &quot;Agora|RtcEngineProxy&quot;)
<codeblock props="bp" outputclass="language-cpp">UFUNCTION(BlueprintCallable, Category = &quot;Agora|RtcEngineProxy&quot;)
int EnableLocalAudio(bool enabled);</codeblock>
<codeblock props="electron" outputclass="language-typescript">abstract enableLocalAudio(enabled: boolean): number;</codeblock>
<codeblock props="unity cs" outputclass="language-csharp">public abstract int EnableLocalAudio(bool enabled);</codeblock>
<codeblock props="rn" outputclass="language-typescript">abstract enableLocalAudio(enabled: boolean): number;</codeblock>
<codeblock props="flutter" outputclass="language-dart">Future&lt;void&gt; enableLocalAudio(bool enabled);</codeblock>
<codeblock props="reserve" outputclass="language-cpp"></codeblock></p>
</section>
<section id="detailed_desc">
<title>Details</title>
<section id="detailed_desc" deliveryTarget="details" otherprops="no-title">
<p>The audio function is enabled by default when users joining a channel. This method disables or re-enables the local audio function to stop or restart local audio capturing.</p>
<p>This method does not affect receiving the remote audio streams, and <xref keyref="enableLocalAudio" /><codeph>(<ph keyref="false" />)</codeph> is applicable to scenarios where the user wants to receive remote audio streams without sending any audio stream to other users in the channel.</p>
<p>Once the local audio function is disabled or re-enabled, the SDK triggers the <xref keyref="onLocalAudioStateChanged" /> callback, which reports <apiname keyref="LOCAL_AUDIO_STREAM_STATE_STOPPED" />(0) or <apiname keyref="LOCAL_AUDIO_STREAM_STATE_RECORDING" />(1).<note type="attention">
<ul>
<li>The difference between this method and <xref keyref="muteLocalAudioStream" /> are as follow:<ul>
<p>The difference between this method and <xref keyref="muteLocalAudioStream" /> are as follow:<ul>
<li><apiname keyref="enableLocalAudio" />: Disables or re-enables the local audio capturing and processing. If you disable or re-enable local audio capturing using the <apiname keyref="enableLocalAudio" /> method, the local user might hear a pause in the remote audio playback.</li>
<li><apiname keyref="muteLocalAudioStream" />: Sends or stops sending the local audio streams.</li>
</ul> </li>
<li>You can call this method either before or after joining a channel. Calling it before joining a channel only sets the device state, and it takes effect immediately after you join the channel.</li>
</ul></note></p>
<li><apiname keyref="muteLocalAudioStream" />: 停止或继续发送本地音频流,不影响音频的采集状态。</li>
</ul></p>
</section>
<section id="scenario" deliveryTarget="details">
<title>Applicable scenarios</title>
<p>This method does not affect receiving the remote audio streams, and <xref keyref="enableLocalAudio" /><codeph>(<ph keyref="false" />)</codeph> is applicable to scenarios where the user wants to receive remote audio streams without sending any audio stream to other users in the channel.</p>
</section>
<section id="timing" deliveryTarget="details">
<title>Call timing</title>
<p>You can call this method either before or after joining a channel. Calling it before joining a channel only sets the device state, and it takes effect immediately after you join the channel.</p>
</section>
<section id="restriction" deliveryTarget="details">
<title>Restrictions</title>
<p>None.</p>
</section>
<section id="related" deliveryTarget="details">
<title>Related callbacks</title>
<p>Once the local audio function is disabled or re-enabled, the SDK triggers the <xref keyref="onLocalAudioStateChanged" /> callback, which reports <apiname keyref="LOCAL_AUDIO_STREAM_STATE_STOPPED" />(0) or <apiname keyref="LOCAL_AUDIO_STREAM_STATE_RECORDING" />(1).</p>
</section>
<section id="parameters">
<section id="parameters" deliveryTarget="details">
<title>Parameters</title>
<parml>
<plentry>
<pt>enabled</pt>
<pd>
<p>
<ul>
<li><codeph><ph keyref="true" /></codeph>: (Default) Re-enable the local audio function, that is, to start the local audio capturing device (for example, the microphone).</li>
<li><codeph><ph keyref="false" /></codeph>: Disable the local audio function, that is, to stop local audio capturing.</li>
</ul> </p>
</ul>
</pd>
</plentry>
</parml> </section>
Expand All @@ -58,5 +67,5 @@
<li>0: Success.</li>
<li>&lt; 0: Failure. <ph props="cn">See <xref keyref="error-code-link"/> for details and resolution suggestions.</ph></li>
</ul> </section>
</refbody>
</refbody>
</reference>
Loading

0 comments on commit 93d914e

Please sign in to comment.