Skip to content

Commit

Permalink
RtePlayerState&onResolutionChanged tbd
Browse files Browse the repository at this point in the history
  • Loading branch information
Suri539 committed Oct 15, 2024
1 parent 43fdd85 commit 40bb6c3
Show file tree
Hide file tree
Showing 16 changed files with 885 additions and 40 deletions.
58 changes: 58 additions & 0 deletions dita/RTC-NG/API/api_player_getconfigs.dita
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE reference PUBLIC "-//OASIS//DTD DITA Reference//EN" "reference.dtd">
<reference id="api_player_getconfigs">
<title><ph keyref="GetConfigs_Player"/></title>
<shortdesc id="short"><ph id="shortdesc">获取当前的播放器设置。</ph></shortdesc>
<prolog>
<metadata>
<keywords>
<indexterm keyref="GetConfigs_Player"/>
</keywords>
</metadata>
</prolog>
<refbody>
<section id="prototype">
<p outputclass="codeblock">
<codeblock props="android" outputclass="language-java">public void getConfigs(PlayerConfig config) throws RteException;</codeblock>
<codeblock props="hmos" outputclass="language-arkts"/>
<codeblock props="ios mac" outputclass="language-objectivec">- (BOOL)getConfigs:(AgoraRtePlayerConfig * _Nonnull)config error:(AgoraRteError * _Nullable)error;</codeblock>
<codeblock props="cpp unreal" outputclass="language-cpp">bool GetConfigs(PlayerConfig* 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 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">
<title>参数</title>
<parml>
<plentry conkeyref="SetConfigs_Player/config">
<pt/>
<pd/>
</plentry>
<plentry props="apple cpp" conkeyref="SetConfigs_Rte/err">
<pt></pt>
<pd></pd>
</plentry>
</parml> </section>
<section id="return_values" conkeyref="GetConfigs_Rte/return_values">
</section>
</refbody>
</reference>
65 changes: 65 additions & 0 deletions dita/RTC-NG/API/api_player_getinfo.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_player_getinfo">
<title><ph keyref="GetInfo"/></title>
<shortdesc id="short"><ph id="shortdesc">获取播放器播放的媒体流的相关信息。</ph></shortdesc>
<prolog>
<metadata>
<keywords>
<indexterm keyref="GetInfo"/>
</keywords>
</metadata>
</prolog>
<refbody>
<section id="prototype">
<p outputclass="codeblock">
<codeblock props="android" outputclass="language-java">public void getInfo(PlayerInfo info) throws RteException;</codeblock>
<codeblock props="hmos" outputclass="language-arkts"/>
<codeblock props="ios mac" outputclass="language-objectivec">- (BOOL)getInfo:(AgoraRtePlayerInfo * _Nonnull)info error:(AgoraRteError * _Nullable)error;</codeblock>
<codeblock props="cpp unreal" outputclass="language-cpp">bool GetInfo(PlayerInfo *info, 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>
<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">
<title>参数</title>
<parml>
<plentry>
<pt>info</pt>
<pd>媒体流的相关信息,详见 <xref keyref="RtePlayerInfo"/>。</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>
</refbody>
</reference>
67 changes: 67 additions & 0 deletions dita/RTC-NG/API/api_player_muteaudio.dita
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE reference PUBLIC "-//OASIS//DTD DITA Reference//EN" "reference.dtd">
<reference id="api_player_muteaudio">
<title><ph keyref="MuteAudio"/></title>
<shortdesc id="short"><ph id="shortdesc">//TODO</ph></shortdesc>
<prolog>
<metadata>
<keywords>
<indexterm keyref="MuteAudio"/>
</keywords>
</metadata>
</prolog>
<refbody>
<section id="prototype">
<p outputclass="codeblock">
<codeblock props="android" outputclass="language-java">public void muteAudio(boolean mute) throws RteException;</codeblock>
<codeblock props="hmos" outputclass="language-arkts"/>
<codeblock props="ios mac" outputclass="language-objectivec">- (BOOL)muteAudio:(BOOL)mute error:(AgoraRteError * _Nullable)error;</codeblock>
<codeblock props="cpp unreal" outputclass="language-cpp">bool MuteAudio(bool mute, 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="scenario" deliveryTarget="details">
<title>适用场景</title>
<p/>
</section>
<section id="timing" deliveryTarget="details">
<title>调用时机</title>
<p/>
</section>
<section id="restriction" deliveryTarget="details">
<title>调用限制</title>
<p/>
</section>
<section id="related" deliveryTarget="details">
<title>相关回调</title>
<p/>
</section>
<section id="parameters" deliveryTarget="details">
<title>参数</title>
<parml>
<plentry>
<pt/>
<pd/>
</plentry>
</parml> </section>
<section id="return_values">
<title><ph keyref="return-section-title"/></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">
<li>0: 方法调用成功。</li>
<li>&lt; 0: 方法调用失败。<ph props="cn">详见<xref keyref="error-code-link"/>了解详情和解决建议。</ph></li>
</ul> </section>
</refbody>
</reference>
67 changes: 67 additions & 0 deletions dita/RTC-NG/API/api_player_mutevideo.dita
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE reference PUBLIC "-//OASIS//DTD DITA Reference//EN" "reference.dtd">
<reference id="api_player_mutevideo">
<title><ph keyref="MuteVideo"/></title>
<shortdesc id="short"><ph id="shortdesc">//TODO</ph></shortdesc>
<prolog>
<metadata>
<keywords>
<indexterm keyref="MuteVideo"/>
</keywords>
</metadata>
</prolog>
<refbody>
<section id="prototype">
<p outputclass="codeblock">
<codeblock props="android" outputclass="language-java">public void muteVideo(boolean mute) throws RteException;</codeblock>
<codeblock props="hmos" outputclass="language-arkts"/>
<codeblock props="ios mac" outputclass="language-objectivec">- (BOOL)muteVideo:(BOOL)mute error:(AgoraRteError * _Nullable)error;</codeblock>
<codeblock props="cpp unreal" outputclass="language-cpp">bool MuteVideo(bool mute, 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>v</dd>
</dlentry>
</dl>
<p/>
</section>
<section id="scenario" deliveryTarget="details">
<title>适用场景</title>
<p/>
</section>
<section id="timing" deliveryTarget="details">
<title>调用时机</title>
<p/>
</section>
<section id="restriction" deliveryTarget="details">
<title>调用限制</title>
<p/>
</section>
<section id="related" deliveryTarget="details">
<title>相关回调</title>
<p/>
</section>
<section id="parameters" deliveryTarget="details">
<title>参数</title>
<parml>
<plentry>
<pt/>
<pd/>
</plentry>
</parml> </section>
<section id="return_values">
<title><ph keyref="return-section-title"/></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">
<li>0: 方法调用成功。</li>
<li>&lt; 0: 方法调用失败。<ph props="cn">详见<xref keyref="error-code-link"/>了解详情和解决建议。</ph></li>
</ul> </section>
</refbody>
</reference>
28 changes: 13 additions & 15 deletions dita/RTC-NG/API/api_player_pause.dita
Original file line number Diff line number Diff line change
Expand Up @@ -30,38 +30,36 @@
<dd>v4.5.0</dd>
</dlentry>
</dl>
<p/>
</section>
<section id="scenario" deliveryTarget="details">
<title>适用场景</title>
<p/>
<p>当你调用 <xref keyref="Play_Player"/> 播放 URL 流后,如果你想暂停播放,可以调用此方法。如果你想要停止播放,请调用 <xref keyref="Stop_Player"/>。</p>
<p props="android" conkeyref="SetConfigs_Rte/exception"/>
</section>
<section id="timing" deliveryTarget="details">
<title>调用时机</title>
<p/>
<p>该方法需要在 <xref keyref="Play_Player"/> 之后调用。</p>
</section>
<section id="restriction" deliveryTarget="details">
<title>调用限制</title>
<p/>
<p>无。</p>
</section>
<section id="related" deliveryTarget="details">
<title>相关回调</title>
<p/>
<p>成功调用该方法后会触发 <xref keyref="OnStateChanged"/> 回调,报告播放器状态为 <apiname keyref="kRtePlayerStatePaused"/>。</p>
</section>
<section id="parameters" deliveryTarget="details">
<section id="parameters" deliveryTarget="details" props="cpp apple">
<title>参数</title>
<parml>
<plentry>
<plentry conkeyref="SetConfigs_Rte/err">
<pt/>
<pd/>
</plentry>
</parml> </section>
<section id="return_values">
<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>
<ul props="native unreal bp electron unity rn cs">
<li>0: 方法调用成功。</li>
<li>&lt; 0: 方法调用失败。<ph props="cn">详见<xref keyref="error-code-link"/>了解详情和解决建议。</ph></li>
</ul> </section>
<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>
38 changes: 18 additions & 20 deletions dita/RTC-NG/API/api_player_registerobserver.dita
Original file line number Diff line number Diff line change
Expand Up @@ -27,41 +27,39 @@
<dl outputclass="since">
<dlentry props="native">
<dt>自从</dt>
<dd>v</dd>
<dd>v4.5.0</dd>
</dlentry>
</dl>
<p/>
</section>
<section id="scenario" deliveryTarget="details">
<title>适用场景</title>
<p/>
<p>你需要在该方法中实现一个 <xref keyref="PlayerObserver"/> 类,并根据场景需要,注册该类的回调。</p>
<p props="android" conkeyref="SetConfigs_Rte/exception"/>
</section>
<section id="timing" deliveryTarget="details">
<title>调用时机</title>
<p/>
<p>//TODO</p>
</section>
<section id="restriction" deliveryTarget="details">
<title>调用限制</title>
<p/>
</section>
<section id="related" deliveryTarget="details">
<title>相关回调</title>
<p/>
<p>无。</p>
</section>
<section id="parameters" deliveryTarget="details">
<title>参数</title>
<parml>
<plentry>
<pt/>
<pd/>
<plentry id="observer">
<pt>observer</pt>
<pd>接口对象实例,详见 <xref keyref="PlayerObserver"/>。</pd>
</plentry>
<plentry props="cpp apple" conkeyref="SetConfigs_Rte/err">
<pt></pt>
<pd></pd>
</plentry>
</parml> </section>
<section id="return_values">
<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>
<ul props="native unreal bp electron unity rn cs">
<li>0: 方法调用成功。</li>
<li>&lt; 0: 方法调用失败。<ph props="cn">详见<xref keyref="error-code-link"/>了解详情和解决建议。</ph></li>
</ul> </section>
<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>
Loading

0 comments on commit 40bb6c3

Please sign in to comment.