Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Suri539 committed Oct 16, 2024
1 parent d4fc1b5 commit a1abdf1
Show file tree
Hide file tree
Showing 28 changed files with 845 additions and 46 deletions.
2 changes: 1 addition & 1 deletion dita/RTC-NG/API/api_canvasconfig_getmirrormode.dita
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
</section>
<section id="timing" deliveryTarget="details">
<title>调用时机</title>
<p>该方法需要在 <xref keyref="SetMirrorMode"/> 之后调用。</p>
<p>在创建类对象之后调用。//TODO</p>
</section>
<section id="restriction" deliveryTarget="details">
<title>调用限制</title>
Expand Down
6 changes: 1 addition & 5 deletions dita/RTC-NG/API/api_canvasconfig_getrendermode.dita
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,6 @@
</dlentry>
</dl>
<p props="android" conkeyref="SetConfigs_Rte/exception"/>
</section>
<section id="timing" deliveryTarget="details">
<title>调用时机</title>
<p>该方法需要在 <xref keyref="SetRenderMode_CanvasConfig"/> 之后调用。//TODO</p>
</section>
<section id="restriction" deliveryTarget="details">
<title>调用限制</title>
Expand All @@ -50,7 +46,7 @@
</parml> </section>
<section id="return_values">
<title><ph keyref="return-section-title"/></title>
<p>当前的视频渲染模式,详见 <xref keyref="RteVideoRenderMode"/>。</p>
<p>当前设置的视频渲染模式,详见 <xref keyref="RteVideoRenderMode"/>。</p>
</section>
</refbody>
</reference>
2 changes: 1 addition & 1 deletion dita/RTC-NG/API/api_canvasconfig_setrendermode.dita
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
</section>
<section id="timing" deliveryTarget="details">
<title>调用时机</title>
<p>//TODO</p>
<p>//TODO setconfig 之前调用</p>
</section>
<section id="restriction" deliveryTarget="details">
<title>调用限制</title>
Expand Down
8 changes: 2 additions & 6 deletions dita/RTC-NG/API/api_config_getappid.dita
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,7 @@
<dd>v4.5.0</dd>
</dlentry>
</dl>
<p props="android" conkeyref="SetConfigs_Rte/exception"></p>
</section>
<section id="timing" deliveryTarget="details">
<title>调用时机</title>
<p>该方法需要在 <xref keyref="SetAppId"/> 之后调用。</p>
<p props="android" conkeyref="SetConfigs_Rte/exception"/>
</section>
<section id="restriction" deliveryTarget="details">
<title>调用限制</title>
Expand All @@ -53,7 +49,7 @@
<p props="flutter">方法成功调用时,无返回值;方法调用失败时,会抛出 <xref keyref="AgoraRtcException"/> 异常,你需要捕获异常并进行处理。<ph props="cn">详见<xref keyref="error-code-link"/>了解详情和解决建议。</ph></p>
<ul props="native unreal bp electron unity rn cs">
<li>方法调用成功,返回设置的 App ID。</li>
<li>方法调用失败,返回空字符串。</li>
<li>方法调用失败,返回空字符串。//TODO 失败是抛出异常,不是返回空字符串。</li>
</ul> </section>
</refbody>
</reference>
7 changes: 3 additions & 4 deletions dita/RTC-NG/API/api_config_setappid.dita
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,11 @@
<dd>v4.5.0</dd>
</dlentry>
</dl>
<p/>
<p props="android" conkeyref="SetConfigs_Rte/exception"/>
</section>
<section id="timing" deliveryTarget="details">
<title>调用时机</title>
<p>//TODO 该方法需要在 <xref keyref="SetConfigs"/> 后调用。</p>
<p props="android" conkeyref="SetConfigs_Rte/exception"/>
<p>//TODO 该方法需要在初始化之前调用。</p>
</section>
<section id="restriction" deliveryTarget="details">
<title>调用限制</title>
Expand All @@ -46,7 +45,7 @@
<parml>
<plentry>
<pt>appId</pt>
<pd>你的项目的 App ID,在声网控制台获取。一个 App ID 只能用于创建一个 RtcEngine。如需更换 App ID,必须先调用 destroy 销毁当前 RtcEngine 再重新创建。//TODO rtc 有这个限制,rte 是否有同样的限制?</pd>
<pd>你的项目的 App ID,在声网控制台获取。建议一个 App ID 创建一个 RtcEngine。如需更换 App ID,必须先调用 destroy 销毁当前 RtcEngine 再重新创建。//TODO 还需要确认 </pd>
</plentry>
<plentry conkeyref="SetConfigs_Rte/err">
<pt></pt>
Expand Down
56 changes: 56 additions & 0 deletions dita/RTC-NG/API/api_playerconfig_getabrfallbacklayer.dita
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE reference PUBLIC "-//OASIS//DTD DITA Reference//EN" "reference.dtd">
<reference id="api_playerconfig_getabrfallbacklayer">
<title><ph keyref="GetAbrFallbackLayer"/></title>
<shortdesc id="short"><ph id="shortdesc">获取设置的视频流回退选项。</ph></shortdesc>
<prolog>
<metadata>
<keywords>
<indexterm keyref="GetAbrFallbackLayer"/>
</keywords>
</metadata>
</prolog>
<refbody>
<section id="prototype">
<p outputclass="codeblock">
<codeblock props="android" outputclass="language-java">public Constants.AbrFallbackLayer getAbrFallbackLayer() throws RteException;</codeblock>
<codeblock props="hmos" outputclass="language-arkts"/>
<codeblock props="ios mac" outputclass="language-objectivec">- (AgoraRteAbrFallbackLayer)abrFallbackLayer:(AgoraRteError * _Nullable)error;</codeblock>
<codeblock props="cpp unreal" outputclass="language-cpp">AbrFallbackLayer GetAbrFallbackLayer(Error *err = nullptr);</codeblock>
<codeblock props="bp" outputclass="language-cpp"/>
<codeblock props="electron" outputclass="language-typescript"/>
<codeblock props="unity cs" outputclass="language-csharp"/>
<codeblock props="rn" outputclass="language-typescript"/>
<codeblock props="flutter" outputclass="language-dart"/> </p>
</section>
<section id="detailed_desc" deliveryTarget="details" otherprops="no-title">
<dl outputclass="since">
<dlentry props="native">
<dt>自从</dt>
<dd>v4.5.0</dd>
</dlentry>
</dl>
<p>//TODO是否有默认值?</p>
<p props="android" conkeyref="SetConfigs_Rte/exception"/>
</section>
<section id="timing" deliveryTarget="details">
<title>调用时机</title>
<p>//TODO</p>
</section>
<section id="restriction" deliveryTarget="details">
<title>调用限制</title>
<p>无。</p>
</section>
<section id="parameters" deliveryTarget="details" props="cpp apple">
<title>参数</title>
<parml>
<plentry conkeyref="SetConfigs_Rte/err">
<pt/>
<pd/>
</plentry>
</parml> </section>
<section id="return_values">
<title><ph keyref="return-section-title"/></title>
<p>设置的视频流回退选项,详见 <xref keyref="RteAbrFallbackLayer"/>。</p></section>
</refbody>
</reference>
56 changes: 56 additions & 0 deletions dita/RTC-NG/API/api_playerconfig_getabrsubscriptionlayer.dita
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE reference PUBLIC "-//OASIS//DTD DITA Reference//EN" "reference.dtd">
<reference id="api_playerconfig_getabrsubscriptionlayer">
<title><ph keyref="GetAbrSubscriptionLayer"/></title>
<shortdesc id="short"><ph id="shortdesc"></ph>获取所订阅的视频流的质量层级。</shortdesc>
<prolog>
<metadata>
<keywords>
<indexterm keyref="GetAbrSubscriptionLayer"/>
</keywords>
</metadata>
</prolog>
<refbody>
<section id="prototype">
<p outputclass="codeblock">
<codeblock props="android" outputclass="language-java">public Constants.AbrSubscriptionLayer getAbrSubscriptionLayer() throws RteException;</codeblock>
<codeblock props="hmos" outputclass="language-arkts"/>
<codeblock props="ios mac" outputclass="language-objectivec">- (AgoraRteAbrSubscriptionLayer)abrSubscriptionLayer:(AgoraRteError * _Nullable)error;</codeblock>
<codeblock props="cpp unreal" outputclass="language-cpp">AbrSubscriptionLayer GetAbrSubscriptionLayer(Error *err = nullptr);</codeblock>
<codeblock props="bp" outputclass="language-cpp"/>
<codeblock props="electron" outputclass="language-typescript"/>
<codeblock props="unity cs" outputclass="language-csharp"/>
<codeblock props="rn" outputclass="language-typescript"/>
<codeblock props="flutter" outputclass="language-dart"/> </p>
</section>
<section id="detailed_desc" deliveryTarget="details" otherprops="no-title">
<dl outputclass="since">
<dlentry props="native">
<dt>自从</dt>
<dd>v4.5.0</dd>
</dlentry>
</dl>
<p>//TODO</p>
<p props="android" conkeyref="SetConfigs_Rte/exception"/>
</section>
<section id="timing" deliveryTarget="details">
<title>调用时机</title>
<p>//rte engine 之后。</p>
</section>
<section id="restriction" deliveryTarget="details">
<title>调用限制</title>
<p>无。</p>
</section>
<section id="parameters" deliveryTarget="details" props="cpp apple">
<title>参数</title>
<parml>
<plentry conkeyref="SetConfigs_Rte/err">
<pt/>
<pd/>
</plentry>
</parml> </section>
<section id="return_values">
<title><ph keyref="return-section-title"/></title>
<p>当前设置的视频质量层级,详见 <xref keyref="RteAbrSubscriptionLayer"/>。</p></section>
</refbody>
</reference>
61 changes: 61 additions & 0 deletions dita/RTC-NG/API/api_playerconfig_getautoplay.dita
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE reference PUBLIC "-//OASIS//DTD DITA Reference//EN" "reference.dtd">
<reference id="api_getautoplay">
<title><ph keyref="GetAutoPlay"/></title>
<shortdesc id="short"><ph id="shortdesc">获取自动播放设置。</ph></shortdesc>
<prolog>
<metadata>
<keywords>
<indexterm keyref="GetAutoPlay"/>
</keywords>
</metadata>
</prolog>
<refbody>
<section id="prototype">
<p outputclass="codeblock">
<codeblock props="android" outputclass="language-java">public boolean getAutoPlay() throws RteException;</codeblock>
<codeblock props="hmos" outputclass="language-arkts"/>
<codeblock props="ios mac" outputclass="language-objectivec">- (BOOL)autoPlay:(AgoraRteError * _Nullable)error;</codeblock>
<codeblock props="cpp unreal" outputclass="language-cpp">bool GetAutoPlay(Error *err = nullptr);</codeblock>
<codeblock props="bp" outputclass="language-cpp"/>
<codeblock props="electron" outputclass="language-typescript"/>
<codeblock props="unity cs" outputclass="language-csharp"/>
<codeblock props="rn" outputclass="language-typescript"/>
<codeblock props="flutter" outputclass="language-dart"/> </p>
</section>
<section id="detailed_desc" deliveryTarget="details" otherprops="no-title">
<dl outputclass="since">
<dlentry props="native">
<dt>自从</dt>
<dd>v4.5.0</dd>
</dlentry>
</dl>
<p>你可以调用该方法来得知当前播放器是否开启了自动播放。</p>
<p props="android" conkeyref="SetConfigs_Rte/exception"/>
</section>
<section id="timing" deliveryTarget="details">
<title>调用时机</title>
<p>//TODO</p>
</section>
<section id="restriction" deliveryTarget="details">
<title>调用限制</title>
<p>无。</p>
</section>
<section id="parameters" deliveryTarget="details" props="cpp apple">
<title>参数</title>
<parml>
<plentry conkeyref="SetConfigs_Rte/err">
<pt/>
<pd/>
</plentry>
</parml> </section>
<section id="return_values" props="cpp apple framework">
<title><ph keyref="return-section-title"/></title>
<p props="flutter">方法成功调用时,无返回值;方法调用失败时,会抛出 <xref keyref="AgoraRtcException"/> 异常,你需要捕获异常并进行处理。<ph props="cn">详见<xref keyref="error-code-link"/>了解详情和解决建议。</ph></p>
<p props="cpp apple unreal bp electron unity rn cs">获取自动播放设置是否成功:<ul>
<li><codeph><ph keyref="true"/></codeph>:获取成功。</li>
<li><codeph><ph keyref="false"/></codeph>:获取失败。</li>
</ul>
</p> </section>
</refbody>
</reference>
63 changes: 63 additions & 0 deletions dita/RTC-NG/API/api_playerconfig_setabrfallbacklayer.dita
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE reference PUBLIC "-//OASIS//DTD DITA Reference//EN" "reference.dtd">
<reference id="api_playerconfig_setabrfallbacklayer">
<title><ph keyref="SetAbrFallbackLayer"/></title>
<shortdesc id="short"><ph id="shortdesc">设置订阅的视频流的回退选项。</ph></shortdesc>
<prolog>
<metadata>
<keywords>
<indexterm keyref="SetAbrFallbackLayer"/>
</keywords>
</metadata>
</prolog>
<refbody>
<section id="prototype">
<p outputclass="codeblock">
<codeblock props="android" outputclass="language-java">public void setAbrFallbackLayer(Constants.AbrFallbackLayer fallbackLayer) throws RteException;</codeblock>
<codeblock props="hmos" outputclass="language-arkts"/>
<codeblock props="ios mac" outputclass="language-objectivec">- (void)setAbrFallbackLayer:(AgoraRteAbrFallbackLayer)layer error:(AgoraRteError * _Nullable)error;</codeblock>
<codeblock props="cpp unreal" outputclass="language-cpp">void SetAbrFallbackLayer(AbrFallbackLayer abr_fallback_layer, Error *err = nullptr);</codeblock>
<codeblock props="bp" outputclass="language-cpp"/>
<codeblock props="electron" outputclass="language-typescript"/>
<codeblock props="unity cs" outputclass="language-csharp"/>
<codeblock props="rn" outputclass="language-typescript"/>
<codeblock props="flutter" outputclass="language-dart"/> </p>
</section>
<section id="detailed_desc" deliveryTarget="details" otherprops="no-title">
<dl outputclass="since">
<dlentry props="native">
<dt>自从</dt>
<dd>v4.5.0</dd>
</dlentry>
</dl>
<p>//TODO 应该也需要开启 abr?如果没开,1-6 layer 不能切换。</p>
<p props="android" conkeyref="SetConfigs_Rte/exception"/>
</section>
<section id="scenario" deliveryTarget="details">
<title>适用场景</title>
<p>你可以调用该方法来设置网络环境不稳定时,视频流的回退选项。以确保视听体验。你可以根据需求设置回退到不同质量层级的视频流,分别对应不同的视频分辨率和码率。//TODO 分两个场景讨论,普通场景(只能切 audio only 和low),如果有高的要求,开启abr。</p>
</section>
<section id="timing" deliveryTarget="details">
<title>调用时机</title>
<p>//engine 之后。</p>
</section>
<section id="restriction" deliveryTarget="details">
<title>调用限制</title>
<p>无。</p>
</section>
<section id="parameters" deliveryTarget="details">
<title>参数</title>
<parml>
<plentry>
<pt props="android">fallbackLayer</pt>
<pt props="cpp">abr_fallback_layer</pt>
<pt props="apple">layer</pt>
<pd>视频流回退的质量层级,详见 <xref keyref="RteAbrFallbackLayer"/>。</pd>
</plentry>
<plentry props="cpp apple" conkeyref="SetConfigs_Rte/err">
<pt></pt>
<pd></pd>
</plentry>
</parml> </section>
</refbody>
</reference>
64 changes: 64 additions & 0 deletions dita/RTC-NG/API/api_playerconfig_setabrsubscriptionlayer.dita
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE reference PUBLIC "-//OASIS//DTD DITA Reference//EN" "reference.dtd">
<reference id="api_playerconfig_setabrsubscriptionlayer">
<title><ph keyref="SetAbrSubscriptionLayer"/></title>
<shortdesc id="short"><ph id="shortdesc">设置订阅的媒体流的质量层级。</ph></shortdesc>
<prolog>
<metadata>
<keywords>
<indexterm keyref="SetAbrSubscriptionLayer"/>
</keywords>
</metadata>
</prolog>
<refbody>
<section id="prototype">
<p outputclass="codeblock">
<codeblock props="android" outputclass="language-java">public void setAbrSubscriptionLayer(Constants.AbrSubscriptionLayer subscriptionLayer) throws RteException;</codeblock>
<codeblock props="hmos" outputclass="language-arkts"/>
<codeblock props="ios mac" outputclass="language-objectivec">- (void)setAbrSubscriptionLayer:(AgoraRteAbrSubscriptionLayer)layer error:(AgoraRteError * _Nullable)error;</codeblock>
<codeblock props="cpp unreal" outputclass="language-cpp">void SetAbrSubscriptionLayer(AbrSubscriptionLayer abr_subscription_layer, Error *err = nullptr);</codeblock>
<codeblock props="bp" outputclass="language-cpp"/>
<codeblock props="electron" outputclass="language-typescript"/>
<codeblock props="unity cs" outputclass="language-csharp"/>
<codeblock props="rn" outputclass="language-typescript"/>
<codeblock props="flutter" outputclass="language-dart"/> </p>
</section>
<section id="detailed_desc" deliveryTarget="details" otherprops="no-title">
<dl outputclass="since">
<dlentry props="native">
<dt>自从</dt>
<dd>v4.5.0</dd>
</dlentry>
</dl>
<p>//TODO 使用这个方法需要额外找销售开通 abr 功能吗?切换 layer1-6 需要开通。不同的视频质量层级对应不同的分辨率和码率。//TODO 链接到最佳实践:补充源频道和转码频道的差异。
</p>
<p props="android" conkeyref="SetConfigs_Rte/exception"/>
</section>
<section id="scenario" deliveryTarget="details">
<title>适用场景</title>
<p>在网络环境不稳定的情况下,观众端可以根据实际的网络状况来选择合适的视频质量级别,以保证流畅的观感体验。</p>
</section>
<section id="timing" deliveryTarget="details">
<title>调用时机</title>
<p>//TODO</p>
</section>
<section id="restriction" deliveryTarget="details">
<title>调用限制</title>
<p>//TODO</p>
</section>
<section id="parameters" deliveryTarget="details">
<title>参数</title>
<parml>
<plentry>
<pt props="android">subscriptionLayer</pt>
<pt props="cpp">abr_subscription_layer</pt>
<pt props="apple">layer</pt>
<pd>订阅的视频质量层级,详见 <xref keyref="RteAbrSubscriptionLayer"/>。</pd>
</plentry>
<plentry props="cpp apple" conkeyref="SetConfigs_Rte/err">
<pt></pt>
<pd></pd>
</plentry>
</parml> </section>
</refbody>
</reference>
Loading

0 comments on commit a1abdf1

Please sign in to comment.