Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jira/ms 115566/hotfix/color #583

Merged
merged 5 commits into from
Feb 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
1 change: 1 addition & 0 deletions lib/src/enum_converter.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions lib/src/enums.dart
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,10 @@ enum AudioOutputRouting {
/// Bluetooth headset.
@JsonValue(5)
HeadsetBluetooth,

/// Apple AirPlay.
@JsonValue(9)
AirPlay,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

把所有枚举都加上吧

}

/// Audio profile.
Expand Down