diff --git a/ts/Private/IAgoraRtcEngine.ts b/ts/Private/IAgoraRtcEngine.ts index e35d51237..869865662 100644 --- a/ts/Private/IAgoraRtcEngine.ts +++ b/ts/Private/IAgoraRtcEngine.ts @@ -108,6 +108,7 @@ import { LogConfig, LogFilterType, LogLevel } from './IAgoraLog'; import { IMediaPlayer } from './IAgoraMediaPlayer'; import { AudioMixingDualMonoMode, IMediaEngine } from './IAgoraMediaEngine'; import { IAudioDeviceManager } from './IAudioDeviceManager'; +import { IMusicContentCenter } from './IAgoraMusicContentCenter'; import { IMediaRecorder } from './IAgoraMediaRecorder'; import { ILocalSpatialAudioEngine } from './IAgoraSpatialAudio'; /** @@ -5696,6 +5697,11 @@ export abstract class IRtcEngine { */ abstract getVideoDeviceManager(): IVideoDeviceManager; + /** + * @ignore + */ + abstract getMusicContentCenter(): IMusicContentCenter; + /** * Gets one IMediaEngine object. * Make sure the IRtcEngine is initialized before you call this method. diff --git a/ts/Private/extension/IAgoraMusicContentCenterExtension.ts b/ts/Private/extension/IAgoraMusicContentCenterExtension.ts new file mode 100644 index 000000000..cb0ff5c3b --- /dev/null +++ b/ts/Private/extension/IAgoraMusicContentCenterExtension.ts @@ -0,0 +1 @@ +export {}; diff --git a/ts/Private/impl/IAgoraRtcEngineImpl.ts b/ts/Private/impl/IAgoraRtcEngineImpl.ts index 1c77bb737..d777b4242 100644 --- a/ts/Private/impl/IAgoraRtcEngineImpl.ts +++ b/ts/Private/impl/IAgoraRtcEngineImpl.ts @@ -89,6 +89,7 @@ import { AudioMixingDualMonoMode, IMediaEngine } from '../IAgoraMediaEngine'; import { LogFilterType, LogLevel } from '../IAgoraLog'; import { AgoraRhythmPlayerConfig } from '../IAgoraRhythmPlayer'; import { IAudioDeviceManager } from '../IAudioDeviceManager'; +import { IMusicContentCenter } from '../IAgoraMusicContentCenter'; import { IMediaRecorder } from '../IAgoraMediaRecorder'; import { ILocalSpatialAudioEngine } from '../IAgoraSpatialAudio'; export function processIRtcEngineEventHandler( @@ -6524,6 +6525,17 @@ export class IRtcEngineImpl implements IRtcEngine { return 'RtcEngine_getVideoDeviceManager'; } + getMusicContentCenter(): IMusicContentCenter { + const apiType = this.getApiTypeFromGetMusicContentCenter(); + const jsonParams = {}; + const jsonResults = callIrisApi.call(this, apiType, jsonParams); + return jsonResults.result; + } + + protected getApiTypeFromGetMusicContentCenter(): string { + return 'RtcEngine_getMusicContentCenter'; + } + getMediaEngine(): IMediaEngine { const apiType = this.getApiTypeFromGetMediaEngine(); const jsonParams = {}; diff --git a/ts/Private/internal/RtcEngineExInternal.ts b/ts/Private/internal/RtcEngineExInternal.ts index eb8617948..b930b17dd 100644 --- a/ts/Private/internal/RtcEngineExInternal.ts +++ b/ts/Private/internal/RtcEngineExInternal.ts @@ -19,6 +19,7 @@ import { IAudioSpectrumObserver } from '../AgoraMediaBase'; import { IMediaEngine } from '../IAgoraMediaEngine'; import { IMediaPlayer } from '../IAgoraMediaPlayer'; import { IMediaRecorder } from '../IAgoraMediaRecorder'; +import { IMusicContentCenter } from '../IAgoraMusicContentCenter'; import { ChannelMediaOptions, DirectCdnStreamingMediaOptions, @@ -33,7 +34,7 @@ import { ScreenCaptureSourceInfo, SDKBuildInfo, Size, - ExtensionInfo + ExtensionInfo, } from '../IAgoraRtcEngine'; import { RtcConnection } from '../IAgoraRtcEngineEx'; import { IAudioDeviceManager } from '../IAudioDeviceManager'; @@ -51,6 +52,7 @@ import { MediaRecorderInternal } from './MediaRecorderInternal'; import { ILocalSpatialAudioEngine } from '../IAgoraSpatialAudio'; import { LocalSpatialAudioEngineInternal } from './LocalSpatialAudioEngineInternal'; import { IAudioDeviceManagerImpl } from '../impl/IAudioDeviceManagerImpl'; +import { IMusicContentCenterImpl } from '../impl/IAgoraMusicContentCenterImpl'; import { processIDirectCdnStreamingEventHandler, processIMetadataObserver, @@ -76,6 +78,8 @@ export class RtcEngineExInternal extends IRtcEngineExImpl { new IVideoDeviceManagerImpl(); private _media_engine: IMediaEngine = new MediaEngineInternal(); private _media_recorder: IMediaRecorder = new MediaRecorderInternal(); + private _music_content_center: IMusicContentCenter = + new IMusicContentCenterImpl(); private _local_spatial_audio_engine: ILocalSpatialAudioEngine = new LocalSpatialAudioEngineInternal(); private _events: Map< @@ -335,8 +339,8 @@ export class RtcEngineExInternal extends IRtcEngineExImpl { streamConfig?: SimulcastStreamConfig ): string { return streamConfig === undefined - ?'RtcEngine_setDualStreamMode' - :'RtcEngine_setDualStreamMode2'; + ? 'RtcEngine_setDualStreamMode' + : 'RtcEngine_setDualStreamMode2'; } protected getApiTypeFromLeaveChannelEx( @@ -365,7 +369,6 @@ export class RtcEngineExInternal extends IRtcEngineExImpl { return 'RtcEngine_enableExtension2'; } - protected getApiTypeFromSetExtensionProperty( provider: string, extension: string, @@ -421,6 +424,10 @@ export class RtcEngineExInternal extends IRtcEngineExImpl { return this._media_recorder; } + getMusicContentCenter(): IMusicContentCenter { + return this._music_content_center; + } + getLocalSpatialAudioEngine(): ILocalSpatialAudioEngine { return this._local_spatial_audio_engine; }