Skip to content

Commit

Permalink
450
Browse files Browse the repository at this point in the history
  • Loading branch information
Suri539 committed Oct 17, 2024
1 parent a1abdf1 commit 664444b
Show file tree
Hide file tree
Showing 10 changed files with 302 additions and 13 deletions.
12 changes: 7 additions & 5 deletions dita/RTC-NG/API/api_config_getappid.dita
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<dd>v4.5.0</dd>
</dlentry>
</dl>
<p props="android" conkeyref="SetConfigs_Rte/exception"/>
<p/>
</section>
<section id="restriction" deliveryTarget="details">
<title>调用限制</title>
Expand All @@ -45,11 +45,13 @@
</plentry>
</parml> </section>
<section id="return_values">
<title><ph keyref="return-section-title"/></title>
<title><ph keyref="return-section-title" props="cpp apple framework"/>
<ph props="android">异常</ph></title>
<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">
<ul props="cpp apple unreal bp electron unity rn cs">
<li>方法调用成功,返回设置的 App ID。</li>
<li>方法调用失败,返回空字符串。//TODO 失败是抛出异常,不是返回空字符串。</li>
</ul> </section>
<li>方法调用失败,返回空字符串。</li>
</ul>
<p props="android" conkeyref="SetAppId/exception"/></section>
</refbody>
</reference>
61 changes: 61 additions & 0 deletions dita/RTC-NG/API/api_config_getjsonparameter.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_config_getjsonparameter">
<title><ph keyref="GetJsonParameter_Config"/></title>
<shortdesc id="short"><ph id="shortdesc">获取已设置的 SDK JSON 配置信息。</ph></shortdesc>
<prolog>
<metadata>
<keywords>
<indexterm keyref="GetJsonParameter_Config"/>
</keywords>
</metadata>
</prolog>
<refbody>
<section id="prototype">
<p outputclass="codeblock">
<codeblock props="android" outputclass="language-java">public String getJsonParameter() throws RteException;</codeblock>
<codeblock props="hmos" outputclass="language-arkts"/>
<codeblock props="ios mac" outputclass="language-objectivec">- (NSString * _Nullable)jsonParameter:(AgoraRteError * _Nullable)error;</codeblock>
<codeblock props="cpp unreal" outputclass="language-cpp">std::string GetJsonParameter(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>当你调用 <xref keyref="SetJsonParameter_Config"/> 设置 JSON 配置信息后,你可以调用该方法获取已设置的配置信息。</p>
</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 framework">
<title>参数</title>
<parml>
<plentry conkeyref="SetConfigs_Rte/err">
<pt/>
<pd/>
</plentry>
</parml> </section>
<section id="return_values">
<title><ph keyref="return-section-title" props="cpp apple framework"/>
<ph props="android">异常</ph></title>
<p props="flutter">方法成功调用时,无返回值;方法调用失败时,会抛出 <xref keyref="AgoraRtcException"/> 异常,你需要捕获异常并进行处理。<ph props="cn">详见<xref keyref="error-code-link"/>了解详情和解决建议。</ph></p>
<ul props="cpp apple unreal bp electron unity rn cs">
<li>方法调用成功,返回设置的 JSON 配置信息。</li>
<li>方法调用失败,返回空字符串。</li>
</ul>
<p props="android" conkeyref="SetAppId/exception"/></section>
</refbody>
</reference>
6 changes: 4 additions & 2 deletions dita/RTC-NG/API/api_config_setappid.dita
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,10 @@
<dd>v4.5.0</dd>
</dlentry>
</dl>
<p props="android" conkeyref="SetConfigs_Rte/exception"/>
</section>
<section id="timing" deliveryTarget="details">
<title>调用时机</title>
<p>//TODO 该方法需要在初始化之前调用。</p>
<p> 该方法需要在 <xref keyref="InitMediaEngine"/> 之前调用。</p>
</section>
<section id="restriction" deliveryTarget="details">
<title>调用限制</title>
Expand All @@ -52,5 +51,8 @@
<pd></pd>
</plentry>
</parml> </section>
<section id="return_values">
<title><ph props="android">异常</ph></title>
<p id="exception">调用失败时,SDK 会抛出 <xref keyref="RteException"/> 异常,并返回相应的错误信息。你需要捕获异常并进行处理。</p></section>
</refbody>
</reference>
65 changes: 65 additions & 0 deletions dita/RTC-NG/API/api_config_setjsonparameter.dita
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE reference PUBLIC "-//OASIS//DTD DITA Reference//EN" "reference.dtd">
<reference id="api_config_setjsonparameter">
<title><ph keyref="SetJsonParameter_Config"/></title>
<shortdesc id="short"><ph id="shortdesc">设置 SDK 的 JSON 配置信息。</ph></shortdesc>
<prolog>
<metadata>
<keywords>
<indexterm keyref="SetJsonParameter_Config"/>
</keywords>
</metadata>
</prolog>
<refbody>
<section id="prototype">
<p outputclass="codeblock">
<codeblock props="android" outputclass="language-java">public void setJsonParameter(String jsonParameter) throws RteException;</codeblock>
<codeblock props="hmos" outputclass="language-arkts"/>
<codeblock props="ios mac" outputclass="language-objectivec">- (void)setJsonParameter:(NSString * _Nullable)jsonParameter error:(AgoraRteError * _Nullable)error;</codeblock>
<codeblock props="cpp unreal" outputclass="language-cpp">void SetJsonParameter(const char *json_parameter, 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/>
</section>
<section id="scenario" deliveryTarget="details">
<title>适用场景</title>
<p>当你需要设置私有参数或使用定制功能时,可以调用该方法。</p>
</section>
<section id="timing" deliveryTarget="details">
<title>调用时机</title>
<p>该方法需要在创建 <xref keyref="Config"/> 对象之后调用。//TODO 这个config对象是在setconfig的时候创建的,所以可不可以说需要在 setconfig 之后调用?</p>
</section>
<section id="restriction" deliveryTarget="details">
<title>调用限制</title>
<p>无。</p>
</section>
<section id="parameters" deliveryTarget="details">
<title>参数</title>
<parml>
<plentry id="json">
<pt props="apple android">jsonParameter</pt>
<pt props="cpp">json_parameter</pt>
<pd>JSON 字符串形式的参数。</pd>
</plentry>
<plentry props="cpp apple" conkeyref="SetConfigs_Rte/err">
<pt></pt>
<pd></pd>
</plentry>
</parml> </section>
<section id="return_values" props="android">
<title><ph>异常</ph></title>
<p conkeyref="SetAppId/exception"></p>
</section>
</refbody>
</reference>
53 changes: 53 additions & 0 deletions dita/RTC-NG/API/api_playerconfig_getjsonparameter.dita
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE reference PUBLIC "-//OASIS//DTD DITA Reference//EN" "reference.dtd">
<reference id="api_playerconfig_getjsonparameter">
<title><ph keyref="GetJsonParameter_PlayerConfig"/></title>
<shortdesc id="short"><ph id="shortdesc">获取设置的媒体播放器的 JSON 配置信息。</ph></shortdesc>
<prolog>
<metadata>
<keywords>
<indexterm keyref="GetJsonParameter_PlayerConfig"/>
</keywords>
</metadata>
</prolog>
<refbody>
<section id="prototype">
<p outputclass="codeblock">
<codeblock props="android" outputclass="language-java">public String getJsonParameter() throws RteException;</codeblock>
<codeblock props="hmos" outputclass="language-arkts"/>
<codeblock props="ios mac" outputclass="language-objectivec">- (NSString * _Nullable)jsonParameter:(AgoraRteError * _Nullable)error;</codeblock>
<codeblock props="cpp unreal" outputclass="language-cpp">std::string GetJsonParameter(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>
当你调用 <xref keyref="SetJsonParameter_PlayerConfig"/> 设置 JSON 配置信息后,你可以调用该方法获取已设置的配置信息。
</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" conkeyref="GetJsonParameter_Config/return_values"></section>
</refbody>
</reference>
61 changes: 61 additions & 0 deletions dita/RTC-NG/API/api_playerconfig_setjsonparameter.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_playerconfig_setjsonparameter">
<title><ph keyref="SetJsonParameter_PlayerConfig"/></title>
<shortdesc id="short"><ph id="shortdesc">设置播放器的 JSON 配置信息。</ph></shortdesc>
<prolog>
<metadata>
<keywords>
<indexterm keyref="SetJsonParameter_PlayerConfig"/>
</keywords>
</metadata>
</prolog>
<refbody>
<section id="prototype">
<p outputclass="codeblock">
<codeblock props="android" outputclass="language-java">public void setJsonParameter(String jsonParameter) throws RteException;</codeblock>
<codeblock props="hmos" outputclass="language-arkts"/>
<codeblock props="ios mac" outputclass="language-objectivec">- (void)setJsonParameter:(NSString * _Nonnull)jsonParameter error:(AgoraRteError * _Nullable)error;</codeblock>
<codeblock props="cpp unreal" outputclass="language-cpp">void SetJsonParameter(const char *json_parameter, 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/>
</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>无。</p>
</section>
<section id="parameters" deliveryTarget="details">
<title>参数</title>
<parml>
<plentry conkeyref="SetJsonParameter_Config/json">
<pt/>
<pd/>
</plentry>
<plentry props="cpp apple" conkeyref="SetConfigs_Rte/err">
<pt></pt>
<pd></pd>
</plentry>
</parml> </section>
<section id="return_values" props="android" conkeyref="SetJsonParameter_Config/return_values"/>
</refbody>
</reference>
10 changes: 6 additions & 4 deletions dita/RTC-NG/API/api_rte_setconfigs.dita
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
</dlentry>
</dl>
<p>你可以调用该方法来设置 App ID、SDK 日志文件、服务器的访问区域等信息。</p>
<p props="android" id="exception">调用失败时,SDK 会抛出 <xref keyref="RteException"/> 异常,并返回相应的错误信息。你需要捕获异常并进行处理。</p>

</section>
<section id="timing" deliveryTarget="details">
<title>调用时机</title>
Expand All @@ -54,13 +54,15 @@
<pd>状态或错误信息,详见 <xref keyref="Error"/>。</pd>
</plentry>
</parml> </section>
<section id="return_values" props="cpp apple framework">
<title><ph keyref="return-section-title"/></title>
<section id="return_values">
<title><ph keyref="return-section-title" props="cpp apple framework"/>
<ph props="android">异常</ph></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>
</p>
<p props="android" id="exception">调用失败时,SDK 会抛出 <xref keyref="RteException"/> 异常,并返回相应的错误信息。你需要捕获异常并进行处理。</p></section>
</refbody>
</reference>
4 changes: 3 additions & 1 deletion dita/RTC-NG/RTC_NG_API_CPP.ditamap
Original file line number Diff line number Diff line change
Expand Up @@ -468,13 +468,15 @@
<topicref keyref="RegisterObserver_Player" toc="no"/>
<topicref keyref="Rte" toc="no"/>
<topicref keyref="SetAbrFallbackLayer" toc="no"/>
<topicref keyref="SetAbrSubscriptionLayer" toc="no"/>
<topicref keyref="SetAppId" toc="no"/>
<topicref keyref="SetAutoPlay" toc="no"/>
<topicref keyref="SetCanvas" toc="no"/>
<topicref keyref="SetConfigs_Rte" toc="no"/>
<topicref keyref="SetConfigs_Player" toc="no"/>
<topicref keyref="SetConfigs_Canvas" toc="no"/>
<topicref keyref="SetAbrSubscriptionLayer" toc="no"/>
<topicref keyref="SetJsonParameter_Config" toc="no"/>
<topicref keyref="SetJsonParameter_PlayerConfig" toc="no"/>
<topicref keyref="SetMirrorMode" toc="no"/>
<topicref keyref="SetRenderMode_CanvasConfig" toc="no"/>
<topicref keyref="Stop_Player" toc="no"/>
Expand Down
28 changes: 28 additions & 0 deletions dita/RTC-NG/config/keys-rtc-ng-api-cpp.ditamap
Original file line number Diff line number Diff line change
Expand Up @@ -1169,6 +1169,20 @@
</keywords>
</topicmeta>
</keydef>
<keydef keys="SetJsonParameter_Config" href="../API/api_config_setjsonparameter.dita">
<topicmeta>
<keywords>
<keyword>SetJsonParameter [1/2]</keyword>
</keywords>
</topicmeta>
</keydef>
<keydef keys="SetJsonParameter_PlayerConfig" href="../API/api_playerconfig_setjsonparameter.dita">
<topicmeta>
<keywords>
<keyword>SetJsonParameter [2/2]</keyword>
</keywords>
</topicmeta>
</keydef>
<keydef keys="GetConfigs_Rte" href="../API/api_rte_getconfigs.dita">
<topicmeta>
<keywords>
Expand Down Expand Up @@ -1197,6 +1211,20 @@
</keywords>
</topicmeta>
</keydef>
<keydef keys="GetJsonParameter_Config" href="../API/api_config_getjsonparameter.dita">
<topicmeta>
<keywords>
<keyword>GetJsonParameter [1/2]</keyword>
</keywords>
</topicmeta>
</keydef>
<keydef keys="GetJsonParameter_PlayerConfig" href="../API/api_playerconfig_getjsonparameter.dita">
<topicmeta>
<keywords>
<keyword>GetJsonParameter [2/2]</keyword>
</keywords>
</topicmeta>
</keydef>
<keydef keys="Pause_Player" href="../API/api_player_pause.dita">
<topicmeta>
<keywords>
Expand Down
Loading

0 comments on commit 664444b

Please sign in to comment.