Skip to content

Commit

Permalink
Reapply "Merge branch 'master' into translation/4.x-api-ref"
Browse files Browse the repository at this point in the history
This reverts commit a43f7f9.
  • Loading branch information
Suri539 committed Nov 29, 2024
1 parent 753b785 commit adc1f5f
Show file tree
Hide file tree
Showing 592 changed files with 34,098 additions and 9,322 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/python-app-sync-proto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
push:
branches:
- master
- 'release/**'
# - 'release/**'
jobs:
build:
runs-on: ubuntu-latest
Expand Down
78 changes: 78 additions & 0 deletions dita/RTC-NG/API/api_canvas_addview.dita
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE reference PUBLIC "-//OASIS//DTD DITA Reference//EN" "reference.dtd">
<reference id="api_canvas_addview">
<title><ph keyref="AddView"/></title>
<shortdesc id="short"><ph id="shortdesc">添加渲染视图。</ph></shortdesc>
<prolog>
<metadata>
<keywords>
<indexterm keyref="AddView"/>
</keywords>
</metadata>
</prolog>
<refbody>
<section id="prototype">
<p outputclass="codeblock">
<codeblock props="android" outputclass="language-java">public void addView(View view, ViewConfig viewConfig) throws RteException;</codeblock>
<codeblock props="hmos" outputclass="language-arkts"/>
<codeblock props="ios mac" outputclass="language-objectivec">- (BOOL)addView:(AgoraRteView * _Nonnull)view config:(AgoraRteViewConfig* _Nullable)config error:(AgoraRteError* _Nullable)error;</codeblock>
<codeblock props="cpp unreal" outputclass="language-cpp">bool AddView(View *view, ViewConfig *config, rte::Error *err)</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>
</section>
<section id="scenario" deliveryTarget="details">
<title>适用场景</title>
<p>当你需要使用播放器播放视频,你可以调用该方法将一个视图(view)添加到视频渲染器中,以便显示视频内容。</p>
</section>
<section id="timing" deliveryTarget="details">
<title>调用时机</title>
<p>该方法需要在 <xref keyref="SetCanvas"/> 之前调用。</p>
</section>
<section id="restriction" deliveryTarget="details">
<title>调用限制</title>
<p>当前仅支持添加一个视图。</p>
</section>
<section id="parameters" deliveryTarget="details">
<title>参数</title>
<parml>
<plentry>
<pt>view</pt>
<pd props="cpp">HWND 窗口句柄值。</pd>
<pd props="android">SurfaceView 对象。</pd>
<pd props="ios">UIView 对象。</pd>
<pd props="mac">NSView 对象。</pd>
</plentry>
<plentry id="config">
<pt>config</pt>
<pd>View 对象的设置,目前请传空。</pd>
</plentry>
<plentry props="cpp apple" conkeyref="SetConfigs_Rte/err">
<pt></pt>
<pd></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>
<section id="exception" conkeyref="SetAppId/exception" props="android">
<title></title>
<p></p>
</section>
</refbody>
</reference>
56 changes: 56 additions & 0 deletions dita/RTC-NG/API/api_canvas_canvas.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_canvas_canvas">
<title><ph keyref="Canvas_Canvas"/></title>
<shortdesc id="short"><ph id="shortdesc">构造一个 Canvas 对象。</ph></shortdesc>
<prolog>
<metadata>
<keywords>
<indexterm keyref="Canvas_Canvas"/>
</keywords>
</metadata>
</prolog>
<refbody>
<section id="prototype">
<p outputclass="codeblock">
<codeblock props="android" outputclass="language-java">public Canvas(Rte rte, CanvasInitialConfig config);</codeblock>
<codeblock props="hmos" outputclass="language-arkts"/>
<codeblock props="ios mac" outputclass="language-objectivec">- (instancetype _Nonnull)initWithRte:(AgoraRte* _Nonnull)rte initialConfig:(AgoraRteCanvasInitialConfig * _Nullable)config;</codeblock>
<codeblock props="cpp unreal" outputclass="language-cpp">Canvas(Rte *rte, CanvasInitialConfig *initial_config);</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>
</section>
<section id="timing" deliveryTarget="details">
<title>调用时机</title>
<p>该方法需要在 <xref keyref="InitMediaEngine"/> 之后调用。</p>
</section>
<section id="restriction" deliveryTarget="details">
<title>调用限制</title>
<p>无。</p>
</section>
<section id="parameters" deliveryTarget="details">
<title>参数</title>
<parml>
<plentry conkeyref="Player_Player/rte">
<pt/>
<pd/>
</plentry>
<plentry>
<pt props="cpp">initial_config</pt>
<pt props="apple android">config</pt>
<pd>Canvas 的对象配置,目前可传空。</pd>
</plentry>
</parml> </section>
</refbody>
</reference>
61 changes: 61 additions & 0 deletions dita/RTC-NG/API/api_canvas_getconfigs.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_canvas_getconfigs">
<title><ph keyref="GetConfigs_Canvas"/></title>
<shortdesc id="short"><ph id="shortdesc">获取当前的播放器视频渲染配置。</ph></shortdesc>
<prolog>
<metadata>
<keywords>
<indexterm keyref="GetConfigs_Canvas"/>
</keywords>
</metadata>
</prolog>
<refbody>
<section id="prototype">
<p outputclass="codeblock">
<codeblock props="android" outputclass="language-java">public void getConfigs(CanvasConfig config) throws RteException;</codeblock>
<codeblock props="hmos" outputclass="language-arkts"/>
<codeblock props="ios mac" outputclass="language-objectivec">- (BOOL)getConfigs:(AgoraRteCanvasConfig* _Nonnull)config error:(AgoraRteError* _Nullable)error;</codeblock>
<codeblock props="cpp unreal" outputclass="language-cpp">bool GetConfigs(CanvasConfig *config, Error *err);</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>
</section>
<section id="timing" deliveryTarget="details">
<title>调用时机</title>
<p>该方法需要在 <xref keyref="Canvas_Canvas"/> 之后调用。</p>
</section>
<section id="restriction" deliveryTarget="details">
<title>调用限制</title>
<p>无。</p>
</section>
<section id="parameters" deliveryTarget="details">
<title>参数</title>
<parml>
<plentry conkeyref="SetConfigs_Canvas/config">
<pt/>
<pd/>
</plentry>
<plentry props="cpp apple" conkeyref="SetConfigs_Rte/err">
<pt></pt>
<pd></pd>
</plentry>
</parml> </section>
<section id="return_values" props="cpp apple framework" conkeyref="GetConfigs_Rte/return_values"/>
<section id="exception" props="android" conkeyref="SetAppId/exception">
<title></title>
<p></p>
</section>
</refbody>
</reference>
69 changes: 69 additions & 0 deletions dita/RTC-NG/API/api_canvas_removeview.dita
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE reference PUBLIC "-//OASIS//DTD DITA Reference//EN" "reference.dtd">
<reference id="api_canvas_removeview">
<title><ph keyref="RemoveView"/></title>
<shortdesc id="short"><ph id="shortdesc">移除渲染视图。</ph></shortdesc>
<prolog>
<metadata>
<keywords>
<indexterm keyref="RemoveView"/>
</keywords>
</metadata>
</prolog>
<refbody>
<section id="prototype">
<p outputclass="codeblock">
<codeblock props="android" outputclass="language-java">public void removeView(View view, ViewConfig viewConfig) throws RteException;</codeblock>
<codeblock props="hmos" outputclass="language-arkts"/>
<codeblock props="ios mac" outputclass="language-objectivec">- (BOOL)removeView:(AgoraRteView * _Nonnull)view config:(AgoraRteViewConfig* _Nullable)config error:(AgoraRteError* _Nullable)error;</codeblock>
<codeblock props="cpp unreal" outputclass="language-cpp">bool RemoveView(View *view, ViewConfig *config, rte::Error *err);</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="AddView"/> 添加视图后,如果你需要移除渲染视图,可调用此方法。</p>
</section>
<section id="timing" deliveryTarget="details">
<title>调用时机</title>
<p>该方法需在 <xref keyref="AddView"/> 后调用。</p>
</section>
<section id="restriction" deliveryTarget="details">
<title>调用限制</title>
<p>一次只能移除一个视图。</p>
</section>
<section id="parameters" deliveryTarget="details">
<title>参数</title>
<parml>
<plentry>
<pt>view</pt>
<pd>需要移除的视图对象。</pd>
</plentry>
<plentry conkeyref="AddView/config">
<pt></pt>
<pd></pd>
</plentry>
<plentry props="cpp apple" conkeyref="SetConfigs_Rte/err">
<pt></pt>
<pd></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>
<section id="exception" conkeyref="SetAppId/exception" props="android"/>
</refbody>
</reference>
61 changes: 61 additions & 0 deletions dita/RTC-NG/API/api_canvas_setconfigs.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_canvas_setconfigs">
<title><ph keyref="SetConfigs_Canvas"/></title>
<shortdesc id="short"><ph id="shortdesc">设置播放器视频渲染配置。</ph></shortdesc>
<prolog>
<metadata>
<keywords>
<indexterm keyref="SetConfigs_Canvas"/>
</keywords>
</metadata>
</prolog>
<refbody>
<section id="prototype">
<p outputclass="codeblock">
<codeblock props="android" outputclass="language-java">public void setConfigs(CanvasConfig config) throws RteException;</codeblock>
<codeblock props="hmos" outputclass="language-arkts"/>
<codeblock props="ios mac" outputclass="language-objectivec">- (BOOL)setConfigs:(AgoraRteCanvasConfig* _Nonnull)config error:(AgoraRteError* _Nullable)error;</codeblock>
<codeblock props="cpp unreal" outputclass="language-cpp">bool SetConfigs(CanvasConfig *config, Error *err);</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="timing" deliveryTarget="details">
<title>调用时机</title>
<p>该方法需要在 <xref keyref="OpenWithUrl"/> 之前调用。</p>
</section>
<section id="restriction" deliveryTarget="details">
<title>调用限制</title>
<p>无。</p>
</section>
<section id="parameters" deliveryTarget="details">
<title>参数</title>
<parml>
<plentry id="config">
<pt>config</pt>
<pd>Canvas 对象的设置,详见 <xref keyref="CanvasConfig"/>。</pd>
</plentry>
<plentry props="apple cpp" conkeyref="SetConfigs_Rte/err">
<pt></pt>
<pd></pd>
</plentry>
</parml> </section>
<section id="return_values" conkeyref="SetConfigs_Rte/return_values" props="apple cpp framework"/>
<section id="exception" conkeyref="SetAppId/exception" props="android">
<title></title>
<p></p>
</section>
</refbody>
</reference>
53 changes: 53 additions & 0 deletions dita/RTC-NG/API/api_canvasconfig_getmirrormode.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_canvasconfig_getmirrormode">
<title><ph keyref="GetMirrorMode"/></title>
<shortdesc id="short"><ph id="shortdesc">获取当前设置的镜像模式。</ph></shortdesc>
<prolog>
<metadata>
<keywords>
<indexterm keyref="GetMirrorMode"/>
</keywords>
</metadata>
</prolog>
<refbody>
<section id="prototype">
<p outputclass="codeblock">
<codeblock props="android" outputclass="language-java">public Constants.VideoMirrorMode getVideoMirrorMode() throws RteException ;</codeblock>
<codeblock props="hmos" outputclass="language-arkts"/>
<codeblock props="ios mac" outputclass="language-objectivec">- (AgoraRteVideoMirrorMode)videoMirrorMode:(AgoraRteError * _Nullable)error;</codeblock>
<codeblock props="cpp unreal" outputclass="language-cpp">VideoMirrorMode GetMirrorMode(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="timing" deliveryTarget="details" conkeyref="GetRenderMode/timing"></section>
<section id="restriction" deliveryTarget="details">
<title>调用限制</title>
<p>无。</p>
</section>
<section id="parameters" deliveryTarget="details">
<title><ph props="cpp apple framework">参数</ph></title>
<parml props="cpp apple framework">
<plentry conkeyref="SetConfigs_Rte/err">
<pt/>
<pd/>
</plentry>
</parml> </section>
<section id="return_values">
<title><ph keyref="return-section-title"/></title>
<p>当前设置的镜像模式,详见 <xref keyref="RteVideoMirrorMode"/>。</p></section>
<section id="exception" props="android" conkeyref="SetAppId/exception"></section>
</refbody>
</reference>
Loading

0 comments on commit adc1f5f

Please sign in to comment.