diff --git a/example/src/renderer/utils/index.ts b/example/src/renderer/utils/index.ts index a088017c1..143f232d0 100644 --- a/example/src/renderer/utils/index.ts +++ b/example/src/renderer/utils/index.ts @@ -40,12 +40,12 @@ export const arrayToItems = (array: any[]): AgoraDropdownItem[] => { }; export const enumToItems = (enumType: any): AgoraDropdownItem[] => { - const items = Object.values(enumType); - const keys = items.filter((v) => typeof v === 'string') as string[]; - const values = items.filter((v) => typeof v === 'number') as number[]; - return keys.map((value, index) => ({ - label: value, - value: values[index], + const entries = Object.entries(enumType); + const items = entries.filter(([, value]) => typeof value === 'number'); + items.sort((a: any, b: any) => a[1] - b[1]); + return items.map(([key, value]) => ({ + label: key, + value: value, })); }; diff --git a/package.json b/package.json index 82f29ffe0..c42a2955e 100644 --- a/package.json +++ b/package.json @@ -142,9 +142,9 @@ "yuv-canvas": "1.2.6" }, "agora_electron": { - "iris_sdk_win": "https://download.agora.io/sdk/release/iris_4.5.0-dev.4_DCG_Windows_Video_Standalone_20240927_0549_544.zip", - "iris_sdk_mac": "https://download.agora.io/sdk/release/iris_4.5.0-dev.4_DCG_Mac_Video_Standalone_20240927_0549_505.zip", - "native_sdk_win": "https://download.agora.io/sdk/release/AgoraRtcEngine_windows_Preview_4.5.0-dev.4.zip", - "native_sdk_mac": "https://download.agora.io/sdk/release/AgoraRtcEngine_macOS_Preview_4.5.0-dev.4.zip" + "iris_sdk_win": "https://download.agora.io/sdk/release/iris_4.5.0-dev.6_DCG_Windows_Video_Standalone_20241011_0131_550.zip", + "iris_sdk_mac": "https://download.agora.io/sdk/release/iris_4.5.0-dev.6_DCG_Mac_Video_Standalone_20241011_0131_511.zip", + "native_sdk_win": "https://download.agora.io/sdk/release/AgoraRtcEngine_windows_Preview_4.5.0-dev.6.zip", + "native_sdk_mac": "https://download.agora.io/sdk/release/AgoraRtcEngine_macOS_Preview_4.5.0-dev.6.zip" } }