Skip to content

Commit

Permalink
Merge pull request #3797 from AgoraIO/4.4.1-harmony
Browse files Browse the repository at this point in the history
4.4.1 harmony
  • Loading branch information
Cilla-luodan authored Oct 25, 2024
2 parents 7ca1e38 + 65d8f32 commit 456a0f4
Show file tree
Hide file tree
Showing 18 changed files with 137 additions and 108 deletions.
2 changes: 1 addition & 1 deletion dita/RTC-NG/API/api_imusiccontentcenter_getcaches.dita
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<dd>v4.2.0</dd>
</dlentry>
</dl>
<p>调用该方法前,你需要预先分配一定大小的内存空间用来存储缓存音乐资源的信息。如果你需要设置可缓存的音乐资源数量,可通过 <xref keyref="initialize_IMusicContentCenter"/> 的 <parmname props="framework android cpp">configuration</parmname><parmname props="apple">config</parmname> 来设置。</p>
<p>调用该方法前,你需要预先分配一定大小的内存空间用来存储缓存音乐资源的信息。如果你需要设置可缓存的音乐资源数量,可通过 <xref keyref="initialize_IMusicContentCenter"/> 的 <parmname props="framework android hmos cpp">configuration</parmname><parmname props="apple">config</parmname> 来设置。</p>
<p>当你不再需要使用已缓存的音乐资源时,你需要及时释放内存以防止内存泄漏。</p>
</section>
<section id="parameters" props="cpp unreal bp unity cs flutter">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@
<parml>
<plentry>
<pt>songCode</pt>
<pd>音乐资源编号,用于标识音乐资源。你可以通过调用 <xref keyref="getMusicCollectionByMusicChartId"/> 或 <xref keyref="searchMusic"/> 方法来获取音乐资源,并通过由此触发的 <xref keyref="onMusicCollectionResult"/> 回调获取音乐资源的编号(<parmname>songCode</parmname>)。</pd>
<pd props="android cpp apple framework">音乐资源编号,用于标识音乐资源。你可以通过调用 <xref keyref="getMusicCollectionByMusicChartId"/> 或 <xref keyref="searchMusic"/> 方法来获取音乐资源,并通过由此触发的 <xref keyref="onMusicCollectionResult"/> 回调获取音乐资源的编号(<parmname>songCode</parmname>)。</pd>
<pd props="hmos">音乐资源编号,用于标识音乐资源。你可以通过调用 <xref keyref="getMusicCollectionByMusicChartId2"/> 或 <xref keyref="searchMusic2"/> 方法来获取音乐资源,并通过由此触发的 <xref keyref="onMusicCollectionResult"/> 回调获取音乐资源的编号(<parmname>songCode</parmname>)。</pd>
</plentry>
<plentry>
<pt>jsonOption</pt>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@
<dd>v4.2.2</dd>
</dlentry>
</dl>
<p>在调用该方法前,你需要先获取到对应的音乐资源的编号。你可以通过调用 <xref keyref="getMusicCollectionByMusicChartId"/> 或 <xref keyref="searchMusic"/> 方法来获取音乐资源,并通过由此触发的 <xref keyref="onMusicCollectionResult"/> 回调获取音乐资源的编号(<parmname>songCode</parmname>)。</p>
<p props="android cpp apple framework">在调用该方法前,你需要先获取到对应的音乐资源的编号。你可以通过调用 <xref keyref="getMusicCollectionByMusicChartId"/> 或 <xref keyref="searchMusic"/> 方法来获取音乐资源,并通过由此触发的 <xref keyref="onMusicCollectionResult"/> 回调获取音乐资源的编号(<parmname>songCode</parmname>)。</p>
<p props="hmos">在调用该方法前,你需要先获取到对应的音乐资源的编号。你可以通过调用 <xref keyref="getMusicCollectionByMusicChartId2"/> 或 <xref keyref="searchMusic2"/> 方法来获取音乐资源,并通过由此触发的 <xref keyref="onMusicCollectionResult"/> 回调获取音乐资源的编号(<parmname>songCode</parmname>)。</p>
<p>当你调用该方法后,SDK 会触发 <xref keyref="onSongSimpleInfoResult"/> 回调报告音乐资源的详细信息。</p>
</section>
<section id="parameters">
Expand Down
2 changes: 1 addition & 1 deletion dita/RTC-NG/API/api_imusiccontentcenter_initialize.dita
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
<title>参数</title>
<parml>
<plentry>
<pt props="framework android cpp">configuration</pt>
<pt props="framework android hmos cpp">configuration</pt>
<pt props="apple">config</pt>
<pd><apiname keyref="IMusicContentCenter"/> 的设置,详见 <xref keyref="MusicContentCenterConfiguration"/>。</pd>
</plentry>
Expand Down
2 changes: 1 addition & 1 deletion dita/RTC-NG/API/api_imusiccontentcenter_ispreloaded.dita
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<dd>v4.1.0</dd>
</dlentry>
</dl>
<p>该方法为同步调用。如需预加载新的音乐资源,可调用 <xref keyref="preload"/>。</p>
<p>该方法为同步调用。如需预加载新的音乐资源,可调用 <xref keyref="preload2"/>。</p>
</section>
<section id="parameters">
<title>参数</title>
Expand Down
3 changes: 2 additions & 1 deletion dita/RTC-NG/API/api_imusicontentcenter_preload.dita
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@
</dlentry>
</dl>
<p id="desc1">你可以调用该方法预先加载需要播放的音乐资源。成功调用该方法后,SDK 会触发 <xref keyref="onPreLoadEvent_IMusicContentCenterEventHandler"/> 回调报告预加载音乐资源的事件。</p>
<p id="desc2">在调用该方法来预加载音乐资源之前,你需要调用 <xref keyref="getMusicCollectionByMusicChartId"/> 或 <xref keyref="searchMusic"/> 方法来获取你需要播放的音乐资源,并通过由此触发的 <xref keyref="onMusicCollectionResult"/> 回调获取音乐资源的编号(<parmname>songCode</parmname>)。</p>
<p id="desc2"><ph props="android cpp apple framework">在调用该方法来预加载音乐资源之前,你需要调用 <xref keyref="getMusicCollectionByMusicChartId"/> 或 <xref keyref="searchMusic"/> 方法来获取你需要播放的音乐资源,并通过由此触发的 <xref keyref="onMusicCollectionResult"/> 回调获取音乐资源的编号(<parmname>songCode</parmname>)。</ph>
<ph props="hmos">在调用该方法前,你需要先获取到对应的音乐资源的编号。你可以通过调用 <xref keyref="getMusicCollectionByMusicChartId2"/> 或 <xref keyref="searchMusic2"/> 方法来获取音乐资源,并通过由此触发的 <xref keyref="onMusicCollectionResult"/> 回调获取音乐资源的编号(<parmname>songCode</parmname>)。</ph></p>
<note type="attention" id="note">如需销毁 <xref keyref="IRtcEngine"/> 对象,请在收到 <xref keyref="onPreLoadEvent_IMusicContentCenterEventHandler"/> 回调后,再调用 <xref keyref="release"/> 方法。</note>
</section>
<section id="parameters">
Expand Down
1 change: 1 addition & 0 deletions dita/RTC-NG/API/api_imusicplayer_setplaymode.dita
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
<section id="prototype">
<p outputclass="codeblock">
<codeblock props="android" outputclass="language-java">int setPlayMode(MusicPlayMode mode);</codeblock>
<codeblock props="hmos" outputclass="language-arkts">abstract setPlayMode(mode:Constants.MusicPlayMode):number</codeblock>
<codeblock props="ios mac" outputclass="language-objectivec">- (NSInteger)setPlayMode:(AgoraMusicPlayMode)mode NS_SWIFT_NAME(setPlayMode(mode:));</codeblock>
<codeblock props="cpp unreal" outputclass="language-cpp">virtual int setPlayMode(MusicPlayMode mode) = 0;</codeblock>
<codeblock props="bp" outputclass="language-cpp"></codeblock>
Expand Down
3 changes: 2 additions & 1 deletion dita/RTC-NG/API/api_irtcengine_playeffect3.dita
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,9 @@
<p>该方法在加入频道前后均可调用。</p>
</section>
<section id="restriction" deliveryTarget="details">
<title><ph props="android cpp apple framework">调用限制</ph></title>
<title>调用限制</title>
<p props="android cpp apple framework">如果你需要播放在线音效文件,声网建议先将在线音效文件缓存到本地设备,调用 <xref keyref="preloadEffect"/> 将缓存的音效文件预加载到内存中,然后再调用此方法播放音效。否则,可能出现因在线音效文件加载超时、加载失败而导致的播放失败和无声的问题。</p>
<p props="hmos">无。</p>
</section>
<section id="related" deliveryTarget="details">
<title>相关回调</title>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@


<ul>
<li>当缓冲数据支持的播放时间小于阈值(默认为 0)时,返回 <apiname keyref="PLAYER_EVENT_BUFFER_LOW"/>。</li>
<li>当缓冲数据支持的播放时间大于阈值(默认为 0)时,返回 <apiname keyref="PLAYER_EVENT_BUFFER_RECOVER"/>。</li>
<li>当缓冲数据支持的播放时间小于阈值(默认为 0)时,返回 <apiname keyref="PLAYER_EVENT_BUFFER_LOW"/> (6)。</li>
<li>当缓冲数据支持的播放时间大于阈值(默认为 0)时,返回 <apiname keyref="PLAYER_EVENT_BUFFER_RECOVER"/> (7)。</li>
</ul> </p>
</section>
<section id="parameters">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
<plentry>
<pt props="android hmos">list</pt>
<pt props="apple cpp framework">result</pt>
<pd> <ph>当前可播放的音乐榜单列表。</ph><ph>详见 <xref keyref="MusicChartInfo" props="android apple framework"/><xref keyref="MusicChartCollection" props="cpp unreal bp"/>。</ph></pd>
<pd> <ph>当前可播放的音乐榜单列表。</ph><ph>详见 <xref keyref="MusicChartInfo" props="android hmos apple framework"/><xref keyref="MusicChartCollection" props="cpp unreal bp"/>。</ph></pd>
</plentry>
</parml> </section>
</refbody>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
</dlentry>
</dl>
<p props="android cpp apple framework">当你调用 <xref keyref="getMusicCollectionByMusicChartId"/> 方法来获取指定榜单的音乐资源列表或调用 <xref keyref="searchMusic"/> 来搜索音乐资源时,SDK 会触发此回调报告榜单中音乐资源列表的详细信息。</p>
<p props="hmos">当你调用 <xref keyref="getMusicCollectionByMusicChartId2"/> 方法来获取指定榜单的音乐资源列表或调用 <xref keyref="searchMusic"/> 来搜索音乐资源时,SDK 会触发此回调报告榜单中音乐资源列表的详细信息。</p>
<p props="hmos">当你调用 <xref keyref="getMusicCollectionByMusicChartId2"/> 方法来获取指定榜单的音乐资源列表或调用 <xref keyref="searchMusic2"/> 来搜索音乐资源时,SDK 会触发此回调报告榜单中音乐资源列表的详细信息。</p>
</section>
<section id="parameters">
<title>参数</title>
Expand Down
2 changes: 2 additions & 0 deletions dita/RTC-NG/API/class_channelmediaoptions.dita
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@
public audioDelayMs?:number;

public mediaPlayerAudioDelayMs?:number;

public token?:string;

public enableBuiltInMediaEncryption?:boolean;

Expand Down
2 changes: 1 addition & 1 deletion dita/RTC-NG/API/class_musiccontentcenterconfiguration.dita
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

public eventHandler?:IMusicContentCenterEventHandler

public mccDomain:string = &quot;&quot;
public mccDomain?:string
}</codeblock>
<codeblock props="ios mac" outputclass="language-objectivec">__attribute__((visibility("default"))) @interface AgoraMusicContentCenterConfig : NSObject
@property(assign, nonatomic) AgoraRtcEngineKit* _Nullable rtcEngine;
Expand Down
9 changes: 5 additions & 4 deletions dita/RTC-NG/API/rtc_api_data_type.dita
Original file line number Diff line number Diff line change
Expand Up @@ -283,10 +283,10 @@
<li props="hide"><xref keyref="setDestChannelInfo"/></li>
<li><xref keyref="setSrcChannelInfo"/></li>
</ul> </li>
<li props="hide"><xref keyref="Music"/></li>
<li props="hide"><xref keyref="MusicChartInfo"/></li>
<li props="hide"><xref keyref="MusicCollection"/></li>
<li props="hide"><xref keyref="MusicContentCenterConfiguration"/></li>
<li><xref keyref="Music"/></li>
<li><xref keyref="MusicChartInfo"/></li>
<li><xref keyref="MusicCollection"/></li>
<li><xref keyref="MusicContentCenterConfiguration"/></li>
<li><xref keyref="ContentInspectConfig"/></li>
<li><xref keyref="ContentInspectModule"/></li>
<li><xref keyref="ClientRoleOptions"/></li>
Expand Down Expand Up @@ -1356,6 +1356,7 @@
<li><xref keyref="MEDIA_STREAM_TYPE"/></li>
<li props="reserve"><xref keyref="MEDIA_TRACE_EVENT"/></li>
<li props="reserve"><xref keyref="MusicContentCenterStateReason"/></li>
<li props="cn"><xref keyref="MusicPlayMode"/></li>
<li props="reserve"><xref keyref="ORIENTATION_MODE"/></li>
<li><xref keyref="PLAYER_PRELOAD_EVENT"/></li>
<li props="cn"><xref keyref="PreloadState"/></li>
Expand Down
26 changes: 15 additions & 11 deletions dita/RTC-NG/API/rtc_api_overview.dita
Original file line number Diff line number Diff line change
Expand Up @@ -1550,7 +1550,7 @@
</strow>
</simpletable>
</section>
<section id="media_player" props="android cpp apple framework">
<section id="media_player" props="android hmos cpp apple framework">
<title>媒体播放器</title>
<p props="cn">更多有关媒体播放器的方法,详见<xref href="toc_mediaplayer_initialize.dita">内置媒体播放器</xref>。</p>
<p props="en">更多有关媒体播放器的方法,详见 <xref keyref="IMediaPlayer"/>。</p>
Expand All @@ -1559,9 +1559,9 @@
<stentry>方法/回调</stentry>
<stentry>描述</stentry>
</sthead>
<strow props="android cpp apple framework">
<strow props="android hmos cpp apple framework">
<stentry><xref keyref="createMediaPlayer"/></stentry>
<stentry><ph conkeyref="createMediaPlayer/shortdesc" props="android cpp framework"/><ph conkeyref="createMediaPlayer/shortdesc1" props="apple"/></stentry>
<stentry><ph conkeyref="createMediaPlayer/shortdesc" props="android hmos cpp framework"/><ph conkeyref="createMediaPlayer/shortdesc1" props="apple"/></stentry>
</strow>
<strow props="android cpp apple unreal flutter electron rn unity cs">
<stentry><xref keyref="getMediaPlayerCacheManager"/></stentry>
Expand All @@ -1575,11 +1575,11 @@
<stentry><xref keyref="IMediaPlayer"/></stentry>
<stentry><ph conkeyref="IMediaPlayer/shortdesc"/></stentry>
</strow>
<strow props="native unreal flutter unity cs electron rn">
<strow props="android cpp apple unreal flutter unity cs electron rn">
<stentry><xref keyref="IMediaPlayerCacheManager"/></stentry>
<stentry><ph conkeyref="IMediaPlayerCacheManager/shortdesc"/></stentry>
</strow>
<strow>
<strow props="android hmos cpp apple framework">
<stentry><xref keyref="IMediaPlayerSourceObserver"/></stentry>
<stentry><ph conkeyref="IMediaPlayerSourceObserver/shortdesc"/></stentry>
</strow>
Expand Down Expand Up @@ -1658,7 +1658,7 @@
</strow>
</simpletable>
</section>
<section id="drm" props="android ios cpp unreal unity flutter rn">
<section id="drm" props="native unreal unity flutter rn">
<title><ph props="cn">版权音乐</ph></title>
<p props="cpp unreal unity flutter"><ph props="cn">本组方法仅适用于 Android 和 iOS。</ph></p>
<simpletable props="cn">
Expand All @@ -1682,7 +1682,7 @@
<stentry><xref keyref="destroyMusicPlayer"/></stentry>
<stentry><ph conkeyref="destroyMusicPlayer/shortdesc"/></stentry>
</strow>
<strow props="native unity cs unreal">
<strow props="android cpp apple unity cs unreal">
<stentry><xref keyref="preload"/></stentry>
<stentry><ph conkeyref="preload/shortdesc"/></stentry>
</strow>
Expand Down Expand Up @@ -1734,18 +1734,22 @@
<stentry><xref keyref="getMusicContentCenter"/></stentry>
<stentry><ph conkeyref="getMusicContentCenter/shortdesc"/></stentry>
</strow>
<strow>
<strow props="android cpp apple unreal unity flutter rn">
<stentry><xref keyref="getMusicCollectionByMusicChartId"/></stentry>
<stentry><ph conkeyref="getMusicCollectionByMusicChartId/shortdesc"/></stentry>
</strow>
<strow props="android hmos">
<stentry><xref keyref="getMusicCollectionByMusicChartId2"/></stentry>
<stentry><ph conkeyref="getMusicCollectionByMusicChartId2/shortdesc"/></stentry>
</strow>
<strow>
<strow props="android cpp apple unreal unity flutter rn">
<stentry><xref keyref="searchMusic"/></stentry>
<stentry><ph conkeyref="searchMusic/shortdesc"/></stentry>
</strow>
<strow props="hmos">
<stentry><xref keyref="searchMusic2"/></stentry>
<stentry><ph conkeyref="searchMusic2/shortdesc"/></stentry>
</strow>
<strow>
<stentry><xref keyref="setPlayMode"/></stentry>
<stentry><ph conkeyref="setPlayMode/shortdesc"/></stentry>
Expand All @@ -1770,15 +1774,15 @@
<stentry><xref keyref="getSongSimpleInfo"/></stentry>
<stentry><ph conkeyref="getSongSimpleInfo/shortdesc"/></stentry>
</strow>
<strow props="android hmos">
<strow props="android">
<stentry><xref keyref="getPlaySrc"/></stentry>
<stentry><ph conkeyref="getPlaySrc/shortdesc"/></stentry>
</strow>
<strow props="ios">
<stentry><xref keyref="enableMainQueueDispatch"/></stentry>
<stentry><ph conkeyref="enableMainQueueDispatch/shortdesc"/></stentry>
</strow>
<strow props="android hmos">
<strow props="android">
<stentry><xref keyref="stop_IMusicPlayer"/></stentry>
<stentry><ph conkeyref="stop_IMusicPlayer/shortdesc"/></stentry>
</strow>
Expand Down
Loading

0 comments on commit 456a0f4

Please sign in to comment.