Skip to content

Commit

Permalink
Merge pull request #3688 from AgoraIO/hh-api-batch2
Browse files Browse the repository at this point in the history
Hh api batch 2&#
  • Loading branch information
Nero-Hu authored Jul 9, 2024
2 parents d739ddf + 9b1adc5 commit edece7f
Show file tree
Hide file tree
Showing 22 changed files with 183 additions and 97 deletions.
14 changes: 10 additions & 4 deletions dita/RTC-NG/API/api_irtcengine_enablecontentinspect.dita
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,18 @@
{required bool enabled, required ContentInspectConfig config});</codeblock>
<codeblock props="reserve" outputclass="language-cpp"></codeblock></p>
</section>
<section id="detailed_desc">
<title>详情</title>
<section id="detailed_desc" deliveryTarget="details" otherprops="no-title">
<p>开启本地截图上传后,SDK 会根据你在 <xref keyref="ContentInspectConfig"/> 中设置的模块类型和频率对本地用户发送的视频进行截图和上传。截图完成后,声网服务器会以 HTTPS 请求的形式,向你的服务器发送回调通知,并将所有截图发送至你指定的第三方云存储。</p>
<note>调用该方法前,请确保已<xref keyref="ticket-link"/>开通本地截图上传服务。</note>
</section>
<section id="parameters">
<section id="timing" deliveryTarget="details">
<title>调用时机</title>
<p>加入频道前后均可调用。</p>
</section>
<section id="restriction" deliveryTarget="details">
<title>调用限制</title>
<p>调用该方法前,请确保已<xref keyref="ticket-link"/>开通本地截图上传服务。</p>
</section>
<section id="parameters" deliveryTarget="details">
<title>参数</title>
<parml>
<plentry id="enabled">
Expand Down
23 changes: 15 additions & 8 deletions dita/RTC-NG/API/api_irtcengine_enablefacedetection.dita
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,27 @@
<codeblock props="flutter" outputclass="language-dart">Future&lt;void&gt; enableFaceDetection(bool enabled);</codeblock>
<codeblock props="reserve" outputclass="language-cpp"></codeblock></p>
</section>
<section id="detailed_desc">
<title>详情</title>
<p>该方法在加入频道前后都能调用。</p>
<note type="attention" props="cpp unreal bp unity flutter">该方法仅适用于 Android 和 iOS。</note>
<p>开启本地人脸检测后,SDK 会触发 <xref keyref="onFacePositionChanged" /> 回调向你报告人脸检测的信息:

<section id="detailed_desc" deliveryTarget="details" otherprops="no-title">
<p><note type="attention" props="cpp unreal bp unity flutter">该方法仅适用于 Android 和 iOS。</note></p>
</section>
<section id="timing" deliveryTarget="details">
<title>调用时机</title>
<p>该方法需要在相机启动(如通过调用 <apiname keyref="startPreview2" /> 或 <apiname keyref="enableVideo" /> 实现)后调用。</p>
</section>
<section id="restriction" deliveryTarget="details">
<title>调用限制</title>
<p>无。</p>
</section>
<section id="related" deliveryTarget="details">
<title>相关回调</title>
<p>成功调用该方法后,SDK 会触发 <xref keyref="onFacePositionChanged" /> 回调向你报告人脸检测的信息:
<ul>
<li>摄像头采集的画面大小</li>
<li>人脸在 view 中的位置</li>
<li>人脸距设备屏幕的距离</li>
</ul> </p>
<p>该方法需要在相机启动(如通过调用 <apiname keyref="startPreview2" /> 或 <apiname keyref="enableVideo" /> 实现)后调用。</p>
</section>
<section id="parameters">
<section id="parameters" deliveryTarget="details">
<title>参数</title>
<parml>
<plentry>
Expand Down
18 changes: 11 additions & 7 deletions dita/RTC-NG/API/api_irtcengine_setbeautyeffectoptions.dita
Original file line number Diff line number Diff line change
Expand Up @@ -36,18 +36,22 @@
MediaSourceType type = MediaSourceType.primaryCameraSource});</codeblock>
<codeblock props="reserve" outputclass="language-cpp"></codeblock></p>
</section>
<section id="detailed_desc">
<title>详情</title>
<section id="detailed_desc" deliveryTarget="details" otherprops="no-title">
<p>开启本地美颜功能,并设置美颜效果选项。</p>
<note type="note" id="req">
</section>
<section id="timing" deliveryTarget="details">
<title>调用时机</title>
<p>请在 <xref keyref="enableVideo" /> 或 <xref keyref="startPreview2" /> 之后调用该方法。</p>
</section>
<section id="restriction" deliveryTarget="details">
<title>调用限制</title>
<ul>
<li>请在 <xref keyref="enableVideo" /> 或 <xref keyref="startPreview2" /> 之后调用该方法。</li>
<li props="android hmos">该方法仅适用于 Android 5.0 及以上版本。</li>
<li props="android">该方法仅适用于 Android 5.0 及以上版本。</li>
<li>该方法依赖于视频增强动态库 <codeph><ph keyref="clearvision"/></codeph>,如果删除该动态库会导致无法正常开启该功能。</li>
<li>该功能对设备性能要求较高,调用该方法时 SDK 会自动对当前设备能力进行检查。</li>
</ul>
</note> </section>
<section id="parameters">
</section>
<section id="parameters" deliveryTarget="details">
<title>参数</title>
<parml>
<plentry id="enable">
Expand Down
11 changes: 7 additions & 4 deletions dita/RTC-NG/API/api_irtcengine_setbeautyeffectoptions2.dita
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,16 @@
<codeblock props="flutter" outputclass="language-dart"></codeblock>
<codeblock props="reserve" outputclass="language-cpp"></codeblock></p>
</section>
<section id="detailed_desc">
<title>详情</title>
<section id="detailed_desc" deliveryTarget="details" otherprops="no-title">
<p>开启本地美颜功能,并设置美颜效果选项和效果应用的媒体源。</p>
<p>该方法和 <xref keyref="setBeautyEffectOptions"/> 均可用于设置美颜效果选项,区别在于该方法支持在设置美颜效果选项时指定应用美颜的媒体源。</p>
<note type="note" conkeyref="setBeautyEffectOptions/req"/>
</section>
<section id="parameters">
<section id="timing" deliveryTarget="details">
<title>调用时机</title>
<p>请在 <xref keyref="enableVideo" /> 或 <xref keyref="startPreview2" /> 之后调用该方法。</p>
</section>
<section conkeyref="setBeautyEffectOptions/restriction"/>
<section id="parameters" deliveryTarget="details">
<title>参数</title>
<parml>
<plentry conkeyref="setBeautyEffectOptions/enable">
Expand Down
21 changes: 12 additions & 9 deletions dita/RTC-NG/API/api_irtcengine_setlocalaccesspoint.dita
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,18 @@
<codeblock props="flutter" outputclass="language-dart">Future&lt;void&gt; setLocalAccessPoint(LocalAccessPointConfiguration config);</codeblock>
<codeblock props="reserve" outputclass="language-cpp"></codeblock></p>
</section>
<section id="detailed_desc">
<title>详情</title>
<p>成功部署声网私有媒体服务器并在内网终端集成 RTC SDK v4.x 后,你可以调用该方法指定 Local Access Point,给 SDK 分配接入模块。</p>
<note type="attention">
<ul>
<li>该方法仅在部署声网混合云方案后生效。你可以联系 <xref keyref="mailto-link" /> 了解和部署声网混合云。</li>
<li>该方法需要在加入频道前调用。</li>
</ul> </note> </section>
<section id="parameters">
<section id="detailed_desc" deliveryTarget="details" otherprops="no-title">
<p>成功部署声网私有媒体服务器并在内网终端集成 4.x RTC SDK 后,你可以调用该方法指定 Local Access Point,给 SDK 分配接入模块。</p>
</section>
<section id="timing" deliveryTarget="details">
<title>调用时机</title>
<p>该方法需要在加入频道前调用。</p>
</section>
<section id="restriction" deliveryTarget="details">
<title>调用限制</title>
<p>该方法仅在部署声网混合云方案后生效。你可以联系 <xref keyref="mailto-link" /> 了解和部署声网混合云。</p>
</section>
<section id="parameters" deliveryTarget="details">
<title>参数</title>
<parml>
<plentry>
Expand Down
56 changes: 31 additions & 25 deletions dita/RTC-NG/API/api_irtcengine_setvoicebeautifierpreset.dita
Original file line number Diff line number Diff line change
Expand Up @@ -25,33 +25,39 @@
<codeblock props="flutter" outputclass="language-dart">Future&lt;void&gt; setVoiceBeautifierPreset(VoiceBeautifierPreset preset);</codeblock>
<codeblock props="reserve" outputclass="language-cpp"></codeblock></p>
</section>
<section id="detailed_desc">
<title>详情</title>
<p>调用该方法可以为本地发流用户设置预设的人声美化效果。设置美声效果后,频道内所有用户都能听到该效果。根据不同的场景,你可以为用户设置不同的美声效果。<ph props="android ios">各美声效果的适用场景可参考<xref keyref="guide-voice-changer" format="html" scope="external">设置人声效果</xref>。</ph></p>
<p id="recommend">为获取更好的人声效果,建议你在调用该方法前进行以下操作:
<section id="detailed_desc" deliveryTarget="details" otherprops="no-title">
<p>调用该方法可以为本地发流用户设置预设的人声美化效果。设置美声效果后,频道内所有用户都能听到该效果。根据不同的场景,你可以为用户设置不同的美声效果。<ph props="android ios">各美声效果的适用场景可参考<xref keyref="voice-changer-link" format="html" scope="external"/>。</ph></p>
</section>
<section id="timing" deliveryTarget="details">
<title>调用时机</title>
<p>加入频道前后均可调用。</p>
</section>
<section id="restriction" deliveryTarget="details">
<title>调用限制</title>
<ul>
<li>调用 <xref keyref="setAudioScenario" /> 将音频场景设为高音质场景,即 <apiname keyref="AUDIO_SCENARIO_GAME_STREAMING" />(3)。</li>
<li>调用 <xref keyref="setAudioProfile2" props="native unity cs unreal"/><xref keyref="setAudioProfile" props="electron rn flutter bp"/> 将 <parmname>profile</parmname> 设为 <apiname keyref="AUDIO_PROFILE_MUSIC_HIGH_QUALITY" />(4) 或 <apiname keyref="AUDIO_PROFILE_MUSIC_HIGH_QUALITY_STEREO" />(5)。</li>
<li><p id="recommend">为获取更好的人声效果,建议你在调用该方法前进行以下操作:
<ul>
<li>调用 <xref keyref="setAudioScenario" /> 将音频场景设为高音质场景,即 <apiname keyref="AUDIO_SCENARIO_GAME_STREAMING" />(3)。</li>
<li>调用 <xref keyref="setAudioProfile2" props="native unity cs unreal"/><xref keyref="setAudioProfile" props="electron rn flutter bp"/> 将 <parmname>profile</parmname> 设为 <apiname keyref="AUDIO_PROFILE_MUSIC_HIGH_QUALITY" />(4) 或 <apiname keyref="AUDIO_PROFILE_MUSIC_HIGH_QUALITY_STEREO" />(5)。</li>
</ul>
</p>
</li>
<li id="profile-note">请勿将 <apiname keyref="setAudioProfile2" props="native unity cs unreal"/><apiname keyref="setAudioProfile" props="electron rn flutter bp"/> 的 <parmname>profile</parmname> 参数设置为 <apiname keyref="AUDIO_PROFILE_SPEECH_STANDARD" />(1)<ph props="cpp unreal bp rn electron unity flutter cs"> 或 <apiname keyref="AUDIO_PROFILE_IOT" />(6)</ph>,否则该方法不生效。</li>
<li>该方法对人声的处理效果最佳,不建议调用该方法处理含音乐的音频数据。</li>
<li>调用 <apiname keyref="setVoiceBeautifierPreset" />,不建议调用以下方法,否则 <apiname keyref="setVoiceBeautifierPreset" /> 设置的效果会被覆盖:
<ul>
<li><xref keyref="setAudioEffectPreset" /></li>
<li><xref keyref="setAudioEffectParameters" /></li>
<li><xref keyref="setLocalVoicePitch" /></li>
<li><xref keyref="setLocalVoiceEqualization" /></li>
<li><xref keyref="setLocalVoiceReverb" /></li>
<li><xref keyref="setVoiceBeautifierParameters" /></li>
<li><xref keyref="setVoiceConversionPreset" /></li>
</ul> </li>
<li>该方法依赖于美声动态库 <codeph><ph keyref="audiobeauty"/></codeph>,如果删除该动态库会导致无法正常开启该功能。</li>
</ul>
</p>
<note type="attention">
<ul>
<li>该方法在加入频道前后都能调用。</li>
<li id="profile-note">请勿将 <apiname keyref="setAudioProfile2" props="native unity cs unreal"/><apiname keyref="setAudioProfile" props="electron rn flutter bp"/> 的 <parmname>profile</parmname> 参数设置为 <apiname keyref="AUDIO_PROFILE_SPEECH_STANDARD" />(1)<ph props="cpp unreal bp rn electron unity flutter cs"> 或 <apiname keyref="AUDIO_PROFILE_IOT" />(6)</ph>,否则该方法不生效。</li>
<li>该方法对人声的处理效果最佳,不建议调用该方法处理含音乐的音频数据。</li>
<li>调用 <apiname keyref="setVoiceBeautifierPreset" />,不建议调用以下方法,否则 <apiname keyref="setVoiceBeautifierPreset" /> 设置的效果会被覆盖:
<ul>
<li><xref keyref="setAudioEffectPreset" /></li>
<li><xref keyref="setAudioEffectParameters" /></li>
<li><xref keyref="setLocalVoicePitch" /></li>
<li><xref keyref="setLocalVoiceEqualization" /></li>
<li><xref keyref="setLocalVoiceReverb" /></li>
<li><xref keyref="setVoiceBeautifierParameters" /></li>
<li><xref keyref="setVoiceConversionPreset" /></li>
</ul> </li>
<li>该方法依赖于美声动态库 <codeph><ph keyref="audiobeauty"/></codeph>,如果删除该动态库会导致无法正常开启该功能。</li>
</ul> </note> </section>
<section id="parameters">
</section>
<section id="parameters" deliveryTarget="details">
<title>参数</title>
<parml>
<plentry>
Expand Down
17 changes: 11 additions & 6 deletions dita/RTC-NG/API/api_irtcengine_startaudiorecording3.dita
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,23 @@
<codeblock props="flutter" outputclass="language-dart">Future&lt;void&gt; startAudioRecording(AudioRecordingConfiguration config);</codeblock>
<codeblock props="reserve" outputclass="language-cpp"></codeblock></p>
</section>
<section id="detailed_desc">
<title>详情</title>
<section id="detailed_desc" deliveryTarget="details" otherprops="no-title">
<p>SDK 支持通话过程中在客户端进行录音。调用该方法后,你可以录制频道内用户的音频,并得到一个录音文件。录音文件仅支持下列格式:


<ul>
<li>WAV: 音质保真度较高,文件较大。例如,采样率为 32000 Hz,录音时长为 10 分钟的文件大小约为 73 M。</li>
<li>AAC: 音质保真度较低,文件较小。例如,采样率为 32000 Hz,录音音质为 <ph keyref="AUDIO_RECORDING_QUALITY_MEDIUM" />,录音时长为 10 分钟的文件大小约为 2 M。</li>
</ul></p>
<p>用户离开频道后,录音会自动停止。</p>
<note type="attention">该方法需要在加入频道后调用。</note> </section>
<section id="parameters">
</section>
<section id="timing" deliveryTarget="details">
<title>调用时机</title>
<p>该方法需要在加入频道后调用。</p>
</section>
<section id="restriction" deliveryTarget="details">
<title>调用限制</title>
<p>无。</p>
</section>
<section id="parameters" deliveryTarget="details">
<title>参数</title>
<parml>
<plentry>
Expand Down
26 changes: 16 additions & 10 deletions dita/RTC-NG/API/api_irtcengine_startechotest3.dita
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,24 @@
<codeblock props="flutter" outputclass="language-dart">Future&lt;void> startEchoTest(EchoTestConfiguration config);</codeblock>
<codeblock props="reserve" outputclass="language-cpp"></codeblock></p>
</section>
<section id="detailed_desc">
<title>详情</title>
<section id="detailed_desc" deliveryTarget="details" otherprops="no-title">
<p>为测试用户本地发流、收流是否正常,你可以调用该方法进行音视频通话回路测试,即测试系统的音视频设备和用户的上下行网络是否正常。</p>
<p>开始测试后,用户需发出声音或面对摄像头,音频或视频会在约 2 秒后播放出来。如果音频播放正常,则表示系统音频设备和用户上下行网络均正常; 如果视频播放正常,则表示系统视频设备和用户上下行网络均正常。
<note id="note_ygl_znn_5sb" type="attention">
<ul id="ul_gyv_znn_5sb">
<li>该方法在加入频道前后均可调用。在频道内调用时,需确保当前没有发布音视频流。</li>
<li>调用该方法后,必须调用 <xref keyref="stopEchoTest"/> 结束测试,否则该用户无法进行下一次音视频通话回路测试, 也无法加入频道。</li>
<li>直播场景下,该方法仅能由主播调用。</li>
</ul> </note></p>
<p>开始测试后,用户需发出声音或面对摄像头,音频或视频会在约 2 秒后播放出来。如果音频播放正常,则表示系统音频设备和用户上下行网络均正常; 如果视频播放正常,则表示系统视频设备和用户上下行网络均正常。</p>
</section>
<section id="parameters">
<section id="timing" deliveryTarget="details">
<title>调用时机</title>
<p>该方法在加入频道前后均可调用。</p>
</section>
<section id="restriction" deliveryTarget="details">
<title>调用限制</title>
<ul>
<li>在频道内调用该方法时,需确保当前没有发布音视频流。</li>
<li>调用该方法后,必须调用 <xref keyref="stopEchoTest"/> 结束测试,否则该用户无法进行下一次音视频通话回路测试,也无法加入频道。</li>
<li>直播场景下,该方法仅能由主播调用。</li>
</ul>
<p/>
</section>
<section id="parameters" deliveryTarget="details">
<title>参数</title>
<parml>
<plentry>
Expand Down
Loading

0 comments on commit edece7f

Please sign in to comment.