Skip to content

Commit

Permalink
Jira/ms 115566/hotfix/color (#471)
Browse files Browse the repository at this point in the history
* fix: add `AirPlay` to enum `AudioOutputRouting`

* Squashed 'android/src/main/java/io/agora/rtc/base/' changes from f1ed825..d36dc7e

d36dc7e fix: mapToColor issue
8443f1e fix: enable to enabled
fbf0147 fix: getAudioFileInfo & selectAudioTrack
987de50 feat: support 3.5.2
4ebf77c feat: support 3.5.1 & plugin
27c788c chore: mapToColor
0278629 feat: support 3.5.0.2
45dcd16 chore: add API which is missing
58ca4b0 fix: AudioRecordingConfiguration bug
4a32e12 chore: prepare to migrate to iris
276c9fe chore: support 3.4.5
783aecf chore: add ERR_ALREADY_IN_RECORDING
3aed6ce fix: startAudioRecording bug
510b405 chore: optimize
4f801b9 chore: optimize
ab71f52 chore: optimize startAudioRecording
07f81c7 chore: optimize
5a20e13 style: optimize
858b58f fix(uid compatible): int to uint
8d14d2d feat(upgrade): 3.4.1
be5efea Merge pull request #4 from AgoraLibrary/dev/3.3.0
382f858 Merge branch 'master' into dev/3.3.0
8671535 Merge pull request #3 from AgoraLibrary/dev/3.2.0
feabda3 Merge branch 'master' into dev/3.2.0
9e57891 Merge pull request #2 from AgoraLibrary/dev/3.1.0
ad03101 fix: merge some bug fix
df303ee fix: merge some bug fix
cd7a2cd feat: support 3.3.1 for Android
551ebfe fix: annotation build warning
9c48594 feat: support 3.3.0 for Android
de52ca6 Merge branch 'master' into dev/3.2.0
75f572d fix: use the better way to fix rendering problems
9ab28a7 fix: `MetadataReceived` event parameters bug
ddeaefb Merge branch 'master' into dev/3.2.0
313cddd chore: add .gitignore
c737102 fix: some rendering problems when change render widget order
2520e7a style: format with 2 spaces
2fef3ae feat: add `setClientRole(role: ClientRole, options?: ClientRoleOptions): Promise<void>`
fcb57cc feat: upgrade to 3.2.0
66eeaad Merge commit '0eab47114cde933482f90879e177fd019430cafd' into dev/raw_data
576473c Android add getNativeHandle
0eab471 feat: Android add getNativeHandle
66ed5b5 fix bug
e0d1d08 * fix `setDefaultAudioRoutetoSpeakerphone` crash bug * add `setAudioSessionOperationRestriction` and `sendCustomReportMessage` method
c82a9e1 finish
9fa3009 iOS finished
d69a73d android finished
51b093b - fix crash when rendering view without `channelId` property - fix `RtcLocalView` freezes after rendering remote view
10a3d01 - fix multiple channel render bug - remove `Types` from export, you can import enum or class by `import {} from 'react-native-agora'`
d998401 - add `startPreview` `stopPreview`
93621d3 - add `constructor` for typescript - fix Android `mapToChannelMediaInfo` crash - fix iOS `switchChannel` `sendMetadata` crash
d1d40f5 Merge commit 'b67450678710cbc3ad4fcf72d8b53dd695d0a8e8' into beta/3.0.0
b674506 Android finish
bdd398f change Double to Number
b17dd47 fix convert exception in mapToCameraCapturerConfiguration function
cf24c0b fix bugs
51f0ca3 fix bug from issue: #213 upgrade to 3.0.1

git-subtree-dir: android/src/main/java/io/agora/rtc/base
git-subtree-split: d36dc7ed0ad4f69ae251389330f75a5f9dca64b0
  • Loading branch information
LichKing-2234 authored Feb 8, 2022
1 parent 4a471ed commit b6eec9f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
7 changes: 1 addition & 6 deletions android/src/main/java/io/agora/rtc/base/BeanCovertor.kt
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package io.agora.rtc.base

import android.graphics.Color
import io.agora.rtc.RtcEngineConfig
import io.agora.rtc.audio.AgoraRhythmPlayerConfig
import io.agora.rtc.audio.AudioRecordingConfiguration
Expand Down Expand Up @@ -70,11 +69,7 @@ fun mapToTranscodingUser(map: Map<*, *>): TranscodingUser {
}

fun mapToColor(map: Map<*, *>): Int {
return Color.rgb(
(map["red"] as Number).toInt(),
(map["green"] as Number).toInt(),
(map["blue"] as Number).toInt()
)
return ((map["red"] as Number).toInt() shl 16) + ((map["green"] as Number).toInt() shl 8) + (map["blue"] as Number).toInt()
}

fun mapToLiveTranscoding(map: Map<*, *>): LiveTranscoding {
Expand Down
4 changes: 4 additions & 0 deletions src/common/Enums.ts
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,10 @@ export enum AudioOutputRouting {
* 5: Bluetooth headset.
*/
HeadsetBluetooth = 5,
/**
* 9: Apple AirPlay.
*/
AirPlay = 9,
}

/**
Expand Down

0 comments on commit b6eec9f

Please sign in to comment.