Skip to content

Commit

Permalink
add batch 6
Browse files Browse the repository at this point in the history
  • Loading branch information
Nero-Hu committed Aug 1, 2024
1 parent ddfa298 commit 4661664
Show file tree
Hide file tree
Showing 9 changed files with 115 additions and 61 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,18 @@
{required int playerId, required RemoteVoicePositionInfo positionInfo});</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>
</section>
<section id="parameters">
<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 id="mpkid">
Expand Down
14 changes: 10 additions & 4 deletions dita/RTC-NG/API/api_imediaplayer_getstreaminfo.dita
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,16 @@
<codeblock props="flutter" outputclass="language-dart">Future&lt;PlayerStreamInfo&gt; getStreamInfo(int index);</codeblock>
<codeblock props="reserve" outputclass="language-cpp"></codeblock></p>
</section>
<section id="detailed_desc">
<title>详情</title>
<note type="attention" id="note">你需要在 <xref keyref="getStreamCount" /> 后调用该方法。</note> </section>
<section id="parameters">
<section id="detailed_desc" deliveryTarget="details" otherprops="no-title"/>
<section id="timing" deliveryTarget="details">
<title>调用时机</title>
<p>你需要在 <xref keyref="getStreamCount" /> 后调用该方法。</p>
</section>
<section id="restriction" deliveryTarget="details">
<title>调用限制</title>
<p>无。</p>
</section>
<section id="parameters" deliveryTarget="details">
<title>参数</title>
<parml>
<plentry>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,16 @@
<codeblock props="flutter" outputclass="language-dart">void registerPlayerSourceObserver(MediaPlayerSourceObserver observer);</codeblock>
<codeblock props="reserve" outputclass="language-cpp"></codeblock></p>
</section>
<section id="parameters">
<section id="detailed_desc" deliveryTarget="details" otherprops="no-title"/>
<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
2 changes: 1 addition & 1 deletion dita/RTC-NG/API/api_irtcengine_isspeakerphoneenabled.dita
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<codeblock props="flutter" outputclass="language-dart">Future&lt;bool&gt; isSpeakerphoneEnabled();</codeblock>
<codeblock props="reserve" outputclass="language-cpp"></codeblock></p>
</section>
<section id="detailed_desc" props="cpp unreal bp unity flutter cs">
<section id="detailed_desc" deliveryTarget="details" otherprops="no-title" props="cpp unreal bp unity flutter cs">
<note type="note">
<ul>
<li>该方法仅适用于 Android 和 iOS。</li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,30 +30,35 @@
<codeblock props="flutter" outputclass="language-dart">Future&lt;void&gt; setDefaultAudioRouteToSpeakerphone(bool defaultToSpeaker);</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">
<note props="cpp android hmos ios unreal bp unity rn flutter">
<ul>
<li props="cpp unreal bp unity flutter">该方法仅适用于 Android 和 iOS 平台。</li>
<li>该方法需要在加入频道前调用。如需在加入频道后切换音频路由,请调用 <xref keyref="setEnableSpeakerphone"/>。</li>
</ul>
<p props="cpp unreal bp unity flutter">该方法仅适用于 Android 和 iOS 平台。</p>
</note>
<p>手机设备一般有两个音频路由,一个是位于顶部的听筒,播放声音偏小;一个是位于底部的扬声器,播放声音偏大。设置默认的音频路由,就是在没有外接设备的前提下,设置系统使用听筒还是扬声器播放音频。</p>
<p>不同场景下,系统默认的音频路由也不同。具体如下:



<ul id="ul_kq3_tpf_3qb">
<li>语音通话:听筒</li>
<li>语音直播:扬声器</li>
<li>视频通话:扬声器</li>
<li>视频直播:扬声器</li>
</ul></p>
<p>调用该 API 可以改变上述默认音频路由。成功改变音频路由后,SDK 会触发 <xref keyref="onAudioRoutingChanged"/> 回调。</p>
<p>调用该 API 可以改变上述默认音频路由。</p>
<note props="android hmos ios unity rn flutter">
<p>当手机插入外接设备,如蓝牙设备或耳机时,系统的音频路由会发生改变。详细的路由变化规律请参考 <xref keyref="guide-audio-route">音频路由</xref>。</p>
</note> </section>
<section id="parameters">
<section id="timing" deliveryTarget="details">
<title>调用时机</title>
<p props="cpp android hmos ios unreal bp unity rn flutter">该方法需要在加入频道前调用。如需在加入频道后切换音频路由,请调用 <xref keyref="setEnableSpeakerphone"/>。</p>
</section>
<section id="restriction" deliveryTarget="details">
<title>调用限制</title>
<p>无。</p>
</section>
<section id="related" deliveryTarget="details">
<title>相关回调</title>
<p>成功改变音频路由后,SDK 会触发 <xref keyref="onAudioRoutingChanged"/> 回调。</p>
</section>
<section id="parameters" deliveryTarget="details">
<title>参数</title>
<parml>
<plentry>
Expand Down
32 changes: 22 additions & 10 deletions dita/RTC-NG/API/api_irtcengine_setenablespeakerphone.dita
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,30 @@
<codeblock props="unity cs" outputclass="language-csharp">public abstract int SetEnableSpeakerphone(bool speakerOn);</codeblock>
<codeblock props="rn" outputclass="language-typescript">abstract setEnableSpeakerphone(speakerOn: boolean): number;</codeblock>
<codeblock props="flutter" outputclass="language-dart">Future&lt;void&gt; setEnableSpeakerphone(bool speakerOn);</codeblock></p> </section>
<section id="detailed_desc">
<title>详情</title>
<p>如果 SDK 默认的音频路由或 <xref keyref="setDefaultAudioRouteToSpeakerphone" /> 的设置无法满足你的需求,你可以调用 <xref keyref="setEnableSpeakerphone" /> 切换当前的音频路由。成功改变音频路由后,SDK 会触发 <xref keyref="onAudioRoutingChanged" /> 回调。</p>
<section id="detailed_desc" deliveryTarget="details" otherprops="no-title">
<p props="android ios unity rn flutter">不同场景下 SDK 默认的音频路由见<xref keyref="guide-audio-route">音频路由</xref>。</p>
<p>该方法只设置用户在当前频道内使用的音频路由,不会影响 SDK 默认的音频路由。如果用户离开当前频道并加入新的频道,则用户还是会使用 SDK 默认的音频路由。</p>
<note type="attention">
<note type="attention" props="cpp unreal bp unity flutter cs">该方法仅适用于 Android 和 iOS 平台。</note>
</section>
<section id="scenario" deliveryTarget="details">
<title>适用场景</title>
<p>如果 SDK 默认的音频路由或 <xref keyref="setDefaultAudioRouteToSpeakerphone" /> 的设置无法满足你的需求,你可以调用该方法切换当前的音频路由。</p>
</section>
<section id="timing" deliveryTarget="details">
<title>调用时机</title>
<p>该方法需要在加入频道后调用。</p>
</section>
<section id="restriction" deliveryTarget="details">
<title>调用限制</title>
<ul>
<li props="cpp unreal bp unity flutter cs">该方法仅适用于 Android 和 iOS 平台。</li>
<li>该方法需要在加入频道后调用。</li>
<li>如果用户使用了蓝牙耳机、有线耳机等外接音频播放设备,则该方法的设置无效,音频只会通过外接设备播放。当有多个外接设备时,音频会通过最后一个接入的设备播放。</li>
</ul></note> </section>
<section id="parameters">
<li>该方法只设置用户在当前频道内使用的音频路由,不会影响 SDK 默认的音频路由。如果用户离开当前频道并加入新的频道,则用户还是会使用 SDK 默认的音频路由。</li>
<li>如果用户使用了蓝牙耳机、有线耳机等外接音频播放设备,则该方法的设置无效,音频只会通过外接设备播放。当有多个外接设备时,音频会通过最后一个接入的设备播放。</li>
</ul>
</section>
<section id="related" deliveryTarget="details">
<title>相关回调</title>
<p>成功改变音频路由后,SDK 会触发 <xref keyref="onAudioRoutingChanged" /> 回调。</p>
</section>
<section id="parameters" deliveryTarget="details">
<title>参数</title>
<parml>
<plentry>
Expand Down
22 changes: 16 additions & 6 deletions dita/RTC-NG/API/api_irtcengine_setrouteincommunicationmode.dita
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,29 @@
<codeblock props="rn" outputclass="language-typescript">abstract setRouteInCommunicationMode(route: number): number;</codeblock>
<codeblock props="flutter" outputclass="language-dart">Future&lt;void> setRouteInCommunicationMode(int route);</codeblock> </p>
</section>
<section id="detailed_desc">
<title>详情</title>
<section id="detailed_desc" deliveryTarget="details" otherprops="no-title">
<dl outputclass="since">
<dlentry props="native">
<dt>自从</dt>
<dd>v4.2.2</dd>
</dlentry>
</dl>
<p>该方法用于在通话音量模式(<xref keyref="communication-audio-mode"/>)下,将音频路由从蓝牙耳机切换为听筒、有线耳机或扬声器。该方法调用成功后,SDK 会触发 <xref keyref="onAudioRoutingChanged"/> 回调,报告修改后的路由。</p>
<note type="attention" props="android hmos">该方法与 <xref keyref="setEnableSpeakerphone"/> 同时使用时可能引起冲突。声网建议你单独使用 <xref keyref="setRouteInCommunicationMode"/>。</note>
<note type="attention" props="cpp unity rn flutter unreal bp"><ul><li>该方法仅适用于 Android。</li><li>该方法与 <xref keyref="setEnableSpeakerphone"/> 同时使用时可能引起冲突。声网建议你单独使用 <xref keyref="setRouteInCommunicationMode"/>。</li></ul></note>
<p>该方法用于在通话音量模式(<xref keyref="communication-audio-mode"/>)下,将音频路由从蓝牙耳机切换为听筒、有线耳机或扬声器。</p>
<note type="attention" props="cpp unity rn flutter unreal bp"><ul>该方法仅适用于 Android。</note>
</section>
<section id="parameters">
<section id="timing" deliveryTarget="details">
<title>调用时机</title>
<p>加入频道前后均可调用。</p>
</section>
<section id="restriction" deliveryTarget="details">
<title>调用限制</title>
<p props="cpp android hmos unity rn flutter unreal bp">该方法与 <xref keyref="setEnableSpeakerphone"/> 同时使用时可能引起冲突。声网建议你单独使用 <xref keyref="setRouteInCommunicationMode"/>。</p>
</section>
<section id="related" deliveryTarget="details">
<title>相关回调</title>
<p>该方法调用成功后,SDK 会触发 <xref keyref="onAudioRoutingChanged"/> 回调,报告修改后的路由。</p>
</section>
<section id="parameters" deliveryTarget="details">
<title>参数</title>
<parml>
<plentry>
Expand Down
33 changes: 21 additions & 12 deletions dita/RTC-NG/API/api_irtcengine_takesnapshot.dita
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,27 @@
<codeblock props="flutter" outputclass="language-dart">Future&lt;void> takeSnapshot({required int uid, required String filePath});</codeblock>
<codeblock props="reserve" outputclass="language-cpp"></codeblock></p>
</section>
<section id="detailed_desc">
<title>详情</title>
<p id="desc1">该方法用于对指定用户的视频流进行截图,生成一张 JPG 格式的图片,并保存至指定的路径。</p>
<p id="desc2" props="native unreal bp unity electron flutter cs">该方法是异步操作,调用返回时 SDK 并没有真正获取截图。成功调用该方法后,SDK 会触发 <xref keyref="onSnapshotTaken" /> 回调报告截图是否成功和获取截图的详情。</p>
<p props="rn">调用该方法返回时 SDK 并没有真正获取截图。成功调用该方法后,SDK 会触发 <xref keyref="onSnapshotTaken" /> 回调报告截图是否成功和获取截图的详情。</p>
<note type="attention">
<ul>
<li>该方法需要在加入频道后调用。</li>
<li>该方法用于本地视频截图时,是对 <xref keyref="ChannelMediaOptions"/> 中指定发布的视频流进行截图。</li>
<li>如果用户的视频经过前处理,例如,添加了水印或美颜,生成的截图会包含前处理效果。</li>
</ul></note> </section>
<section id="parameters">
<section id="detailed_desc" deliveryTarget="details" otherprops="no-title">
<p>该方法用于对指定用户的视频流进行截图,生成一张 JPG 格式的图片,并保存至指定的路径。</p>
</section>
<section id="timing" deliveryTarget="details">
<title>调用时机</title>
<p>该方法需要在加入频道后调用。</p>
</section>
<section id="restriction" deliveryTarget="details">
<title>调用限制</title>
<ul>
<li id="desc2" props="native unreal bp unity electron flutter cs">该方法是异步操作,调用返回时 SDK 并没有真正获取截图。</li>
<li props="rn">调用该方法返回时 SDK 并没有真正获取截图。</li>
<li>该方法用于本地视频截图时,是对 <xref keyref="ChannelMediaOptions"/> 中指定发布的视频流进行截图。</li>
<li>如果用户的视频经过前处理,例如,添加了水印或美颜,生成的截图会包含前处理效果。</li>
</ul>
</section>
<section id="related" deliveryTarget="details">
<title>相关回调</title>
<p>成功调用该方法后,SDK 会触发 <xref keyref="onSnapshotTaken" /> 回调报告截图是否成功和获取截图的详情。</p>
</section>
<section id="parameters" deliveryTarget="details">
<title>参数</title>
<parml>
<plentry id="uid">
Expand Down
22 changes: 9 additions & 13 deletions dita/RTC-NG/API/api_irtcengineex_takesnapshotex.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_irtcengineex_takesnapshotex">
<title><ph keyref="takeSnapshotEx"/></title>
<shortdesc id="short"><ph id="shortdesc">获取视频截图。</ph></shortdesc>
<shortdesc id="short"><ph id="shortdesc">使用连接 ID 获取视频截图。</ph></shortdesc>
<prolog>
<metadata>
<keywords>
Expand Down Expand Up @@ -36,18 +36,14 @@
required String filePath});</codeblock>
<codeblock props="reserve" outputclass="language-cpp"></codeblock></p>
</section>
<section id="detailed_desc">
<title>详情</title>
<p conkeyref="takeSnapshot/desc1"/>
<p conkeyref="takeSnapshot/desc2" props="native unreal bp unity electron flutter cs"/>
<p props="rn">调用该方法返回时 SDK 并没有真正获取截图。成功调用该方法后,SDK 会触发 <xref keyref="onSnapshotTaken" /> 回调报告截图是否成功和获取截图的详情。</p>
<note type="attention">
<ul>
<li>该方法需要在调用 <xref keyref="joinChannelEx"/> 后调用。</li>
<li>该方法用于本地视频截图时,是对 <xref keyref="ChannelMediaOptions"/> 中指定发布的视频流进行截图。</li>
<li>如果用户的视频经过前处理,例如,添加了水印或美颜,生成的截图会包含前处理效果。</li>
</ul></note> </section>
<section id="parameters">
<section id="detailed_desc" deliveryTarget="details" otherprops="no-title" conkeyref="takeSnapshot/detailed_desc"/>
<section id="timing" deliveryTarget="details">
<title>调用时机</title>
<p>该方法需要在调用 <xref keyref="joinChannelEx"/> 后调用。</p>
</section>
<section id="restriction" deliveryTarget="details" conkeyref="takeSnapshot/restriction"/>
<section id="related" deliveryTarget="details" conkeyref="takeSnapshot/related"/>
<section id="parameters" deliveryTarget="details">
<title>参数</title>
<parml>
<plentry conkeyref="joinChannelEx/connection">
Expand Down

0 comments on commit 4661664

Please sign in to comment.