Skip to content

Commit

Permalink
Merge pull request #3828 from AgoraIO/translation/4.x-api-ref
Browse files Browse the repository at this point in the history
New YiCAT updates
  • Loading branch information
Suri539 authored Nov 13, 2024
2 parents 23a13b5 + 2a642b4 commit d87aac0
Show file tree
Hide file tree
Showing 167 changed files with 5,358 additions and 235 deletions.
78 changes: 78 additions & 0 deletions en-US/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">Adds a view to be rendered.</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>Since</dt>
<dd>v4.5.0</dd>
</dlentry>
</dl>
</section>
<section id="scenario" deliveryTarget="details">
<title>Applicable scenarios</title>
<p>When you need to use a player to play a video, you can call this method to add a view to the video renderer for displaying.</p>
</section>
<section id="timing" deliveryTarget="details">
<title>Call timing</title>
<p>Call this method after <xref keyref="SetCanvas"/>.</p>
</section>
<section id="restriction" deliveryTarget="details">
<title>Restrictions</title>
<p>Only one view can be added.</p>
</section>
<section id="parameters" deliveryTarget="details">
<title>Parameters</title>
<parml>
<plentry>
<pt>view</pt>
<pd props="cpp">HWND window handle value.</pd>
<pd props="android">SurfaceView object.</pd>
<pd props="ios">UIView object.</pd>
<pd props="mac">NSView object.</pd>
</plentry>
<plentry id="config">
<pt>config</pt>
<pd>The configuration of View object. Currently, you need to set it to null.</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">When the method call succeeds, there is no return value; when fails, the <xref keyref="AgoraRtcException"/> exception is thrown. You need to catch the exception and handle it accordingly. <ph props="cn">See <xref keyref="error-code-link"/> for details and resolution suggestions.</ph></p>
<p props="cpp apple unreal bp electron unity rn cs">Whether the view is added successfully:<ul>
<li><codeph><ph keyref="true"/></codeph>: The view is added.</li>
<li><codeph><ph keyref="false"/></codeph>: The view is not added.</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 en-US/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">Creates a Canvas object.</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>Since</dt>
<dd>v4.5.0</dd>
</dlentry>
</dl>
</section>
<section id="timing" deliveryTarget="details">
<title>Call timing</title>
<p>Call this method after <xref keyref="InitMediaEngine"/>.</p>
</section>
<section id="restriction" deliveryTarget="details">
<title>Restrictions</title>
<p>None.</p>
</section>
<section id="parameters" deliveryTarget="details">
<title>Parameters</title>
<parml>
<plentry conkeyref="Player_Player/rte">
<pt/>
<pd/>
</plentry>
<plentry>
<pt props="cpp">initial_config</pt>
<pt props="apple android">config</pt>
<pd>The configuration of the Canvas object. Currently you can set it as null.</pd>
</plentry>
</parml> </section>
</refbody>
</reference>
61 changes: 61 additions & 0 deletions en-US/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">Gets the current video rendering configuration of the player.</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>Since</dt>
<dd>v4.5.0</dd>
</dlentry>
</dl>
<p></p>
</section>
<section id="timing" deliveryTarget="details">
<title>Call timing</title>
<p>Call this method after <xref keyref="Canvas_Canvas"/>.</p>
</section>
<section id="restriction" deliveryTarget="details">
<title>Restrictions</title>
<p>None.</p>
</section>
<section id="parameters" deliveryTarget="details">
<title>Parameters</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 en-US/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">Removes a view.</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>Since</dt>
<dd>v4.5.0</dd>
</dlentry>
</dl>
<p>After you call <xref keyref="AddView"/> to add a view, if you need to remove the view, you can call this method.</p>
</section>
<section id="timing" deliveryTarget="details">
<title>Call timing</title>
<p>Call this method after <xref keyref="AddView"/>.</p>
</section>
<section id="restriction" deliveryTarget="details">
<title>Restrictions</title>
<p>Only one view can be removed at a time.</p>
</section>
<section id="parameters" deliveryTarget="details">
<title>Parameters</title>
<parml>
<plentry>
<pt>view</pt>
<pd>View object to be removed.</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">When the method call succeeds, there is no return value; when fails, the <xref keyref="AgoraRtcException"/> exception is thrown. You need to catch the exception and handle it accordingly. <ph props="cn">See <xref keyref="error-code-link"/> for details and resolution suggestions.</ph></p>
<p props="cpp apple unreal bp electron unity rn cs">Whether the view is removed successfully:<ul>
<li><codeph><ph keyref="true"/></codeph>: The view is removed.</li>
<li><codeph><ph keyref="false"/></codeph>: The view is not removed.</li>
</ul>
</p> </section>
<section id="exception" conkeyref="SetAppId/exception" props="android"/>
</refbody>
</reference>
61 changes: 61 additions & 0 deletions en-US/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">Sets the video rendering configuration of the player.</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>Since</dt>
<dd>v4.5.0</dd>
</dlentry>
</dl>
<p/>
</section>
<section id="timing" deliveryTarget="details">
<title>Call timing</title>
<p>Call this method after <xref keyref="OpenWithUrl"/>.</p>
</section>
<section id="restriction" deliveryTarget="details">
<title>Restrictions</title>
<p>None.</p>
</section>
<section id="parameters" deliveryTarget="details">
<title>Parameters</title>
<parml>
<plentry id="config">
<pt>config</pt>
<pd>Canvas object settings. See <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 en-US/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">Gets the current image mode setting.</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>Since</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>Restrictions</title>
<p>None.</p>
</section>
<section id="parameters" deliveryTarget="details">
<title><ph props="cpp apple framework">Parameters</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>The current image mode. See <xref keyref="RteVideoMirrorMode"/>.</p></section>
<section id="exception" props="android" conkeyref="SetAppId/exception"></section>
</refbody>
</reference>
Loading

0 comments on commit d87aac0

Please sign in to comment.