正在显示
7 个修改的文件
包含
58 行增加
和
23 行删除
| @@ -2,7 +2,9 @@ | @@ -2,7 +2,9 @@ | ||
| 2 | webrtc = "114.5735.09" | 2 | webrtc = "114.5735.09" |
| 3 | 3 | ||
| 4 | androidJainSipRi = "1.3.0-91" | 4 | androidJainSipRi = "1.3.0-91" |
| 5 | -androidx-core = "1.10.1" | 5 | +androidx-activity = "1.9.0" |
| 6 | +androidx-core = "1.13.1" | ||
| 7 | +androidx-fragment = "1.5.1" | ||
| 6 | androidx-lifecycle = "2.5.1" | 8 | androidx-lifecycle = "2.5.1" |
| 7 | audioswitch = "89582c47c9a04c62f90aa5e57251af4800a62c9a" | 9 | audioswitch = "89582c47c9a04c62f90aa5e57251af4800a62c9a" |
| 8 | autoService = '1.0.1' | 10 | autoService = '1.0.1' |
| @@ -19,15 +21,18 @@ preferenceKtx = "1.2.1" | @@ -19,15 +21,18 @@ preferenceKtx = "1.2.1" | ||
| 19 | protobuf = "3.22.0" | 21 | protobuf = "3.22.0" |
| 20 | protobufJavalite = "3.22.0" | 22 | protobufJavalite = "3.22.0" |
| 21 | semver4j = "3.1.0" | 23 | semver4j = "3.1.0" |
| 22 | -core-ktx = "1.12.0" | ||
| 23 | appcompat = "1.6.1" | 24 | appcompat = "1.6.1" |
| 24 | -material = "1.11.0" | 25 | +material = "1.12.0" |
| 26 | +viewpager2 = "1.0.0" | ||
| 25 | 27 | ||
| 26 | [libraries] | 28 | [libraries] |
| 27 | android-jain-sip-ri = { module = "javax.sip:android-jain-sip-ri", version.ref = "androidJainSipRi" } | 29 | android-jain-sip-ri = { module = "javax.sip:android-jain-sip-ri", version.ref = "androidJainSipRi" } |
| 30 | +androidx-activity-ktx = { module = "androidx.activity:activity-ktx", version.ref = "androidx-activity" } | ||
| 28 | androidx-core = { module = "androidx.core:core", version.ref = "androidx-core" } | 31 | androidx-core = { module = "androidx.core:core", version.ref = "androidx-core" } |
| 29 | -androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "core-ktx" } | 32 | +androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "androidx-core" } |
| 33 | +androidx-fragment-ktx = { module = "androidx.fragment:fragment-ktx", version.ref = "androidx-fragment" } | ||
| 30 | androidx-preference-ktx = { module = "androidx.preference:preference-ktx", version.ref = "preferenceKtx" } | 34 | androidx-preference-ktx = { module = "androidx.preference:preference-ktx", version.ref = "preferenceKtx" } |
| 35 | +androidx-viewpager2 = { module = "androidx.viewpager2:viewpager2", version.ref = "viewpager2" } | ||
| 31 | audioswitch = { module = "com.github.davidliu:audioswitch", version.ref = "audioswitch" } | 36 | audioswitch = { module = "com.github.davidliu:audioswitch", version.ref = "audioswitch" } |
| 32 | dagger-lib = { module = "com.google.dagger:dagger", version.ref = "dagger" } | 37 | dagger-lib = { module = "com.google.dagger:dagger", version.ref = "dagger" } |
| 33 | dagger-compiler = { module = "com.google.dagger:dagger-compiler", version.ref = "dagger" } | 38 | dagger-compiler = { module = "com.google.dagger:dagger-compiler", version.ref = "dagger" } |
| @@ -43,8 +48,8 @@ protobuf-javalite = { module = "com.google.protobuf:protobuf-javalite", version. | @@ -43,8 +48,8 @@ protobuf-javalite = { module = "com.google.protobuf:protobuf-javalite", version. | ||
| 43 | semver4j = { module = "com.vdurmont:semver4j", version.ref = "semver4j" } | 48 | semver4j = { module = "com.vdurmont:semver4j", version.ref = "semver4j" } |
| 44 | webrtc = { module = "io.github.webrtc-sdk:android-prefixed", version.ref = "webrtc" } | 49 | webrtc = { module = "io.github.webrtc-sdk:android-prefixed", version.ref = "webrtc" } |
| 45 | 50 | ||
| 46 | -androidx-annotation = { module = "androidx.annotation:annotation", version = "1.6.0" } | ||
| 47 | -androidx-activity-compose = { module = "androidx.activity:activity-compose", version = "1.7.1" } | 51 | +androidx-annotation = { module = "androidx.annotation:annotation", version = "1.7.1" } |
| 52 | +androidx-activity-compose = { module = "androidx.activity:activity-compose", version = "1.9.0" } | ||
| 48 | androidx-constraintlayout-compose = { module = "androidx.constraintlayout:constraintlayout-compose", version = "1.0.1" } | 53 | androidx-constraintlayout-compose = { module = "androidx.constraintlayout:constraintlayout-compose", version = "1.0.1" } |
| 49 | auto-service-compiler = { module = "com.google.auto.service:auto-service", version.ref = "autoService" } | 54 | auto-service-compiler = { module = "com.google.auto.service:auto-service", version.ref = "autoService" } |
| 50 | auto-service-annotations = { module = "com.google.auto.service:auto-service-annotations", version.ref = "autoService" } | 55 | auto-service-annotations = { module = "com.google.auto.service:auto-service-annotations", version.ref = "autoService" } |
| @@ -230,6 +230,8 @@ enum class DisconnectReason { | @@ -230,6 +230,8 @@ enum class DisconnectReason { | ||
| 230 | ROOM_DELETED, | 230 | ROOM_DELETED, |
| 231 | STATE_MISMATCH, | 231 | STATE_MISMATCH, |
| 232 | JOIN_FAILURE, | 232 | JOIN_FAILURE, |
| 233 | + MIGRATION, | ||
| 234 | + SIGNAL_CLOSE, | ||
| 233 | } | 235 | } |
| 234 | 236 | ||
| 235 | /** | 237 | /** |
| @@ -244,6 +246,8 @@ fun LivekitModels.DisconnectReason?.convert(): DisconnectReason { | @@ -244,6 +246,8 @@ fun LivekitModels.DisconnectReason?.convert(): DisconnectReason { | ||
| 244 | LivekitModels.DisconnectReason.ROOM_DELETED -> DisconnectReason.ROOM_DELETED | 246 | LivekitModels.DisconnectReason.ROOM_DELETED -> DisconnectReason.ROOM_DELETED |
| 245 | LivekitModels.DisconnectReason.STATE_MISMATCH -> DisconnectReason.STATE_MISMATCH | 247 | LivekitModels.DisconnectReason.STATE_MISMATCH -> DisconnectReason.STATE_MISMATCH |
| 246 | LivekitModels.DisconnectReason.JOIN_FAILURE -> DisconnectReason.JOIN_FAILURE | 248 | LivekitModels.DisconnectReason.JOIN_FAILURE -> DisconnectReason.JOIN_FAILURE |
| 249 | + LivekitModels.DisconnectReason.MIGRATION -> DisconnectReason.MIGRATION | ||
| 250 | + LivekitModels.DisconnectReason.SIGNAL_CLOSE -> DisconnectReason.SIGNAL_CLOSE | ||
| 247 | LivekitModels.DisconnectReason.UNKNOWN_REASON, | 251 | LivekitModels.DisconnectReason.UNKNOWN_REASON, |
| 248 | LivekitModels.DisconnectReason.UNRECOGNIZED, | 252 | LivekitModels.DisconnectReason.UNRECOGNIZED, |
| 249 | null, | 253 | null, |
| @@ -43,16 +43,35 @@ import io.livekit.android.webrtc.isDisconnected | @@ -43,16 +43,35 @@ import io.livekit.android.webrtc.isDisconnected | ||
| 43 | import io.livekit.android.webrtc.peerconnection.executeBlockingOnRTCThread | 43 | import io.livekit.android.webrtc.peerconnection.executeBlockingOnRTCThread |
| 44 | import io.livekit.android.webrtc.peerconnection.launchBlockingOnRTCThread | 44 | import io.livekit.android.webrtc.peerconnection.launchBlockingOnRTCThread |
| 45 | import io.livekit.android.webrtc.toProtoSessionDescription | 45 | import io.livekit.android.webrtc.toProtoSessionDescription |
| 46 | -import kotlinx.coroutines.* | 46 | +import kotlinx.coroutines.CoroutineDispatcher |
| 47 | +import kotlinx.coroutines.Job | ||
| 48 | +import kotlinx.coroutines.SupervisorJob | ||
| 49 | +import kotlinx.coroutines.coroutineScope | ||
| 50 | +import kotlinx.coroutines.delay | ||
| 51 | +import kotlinx.coroutines.ensureActive | ||
| 52 | +import kotlinx.coroutines.launch | ||
| 53 | +import kotlinx.coroutines.runBlocking | ||
| 47 | import kotlinx.coroutines.sync.Mutex | 54 | import kotlinx.coroutines.sync.Mutex |
| 48 | import kotlinx.coroutines.sync.withLock | 55 | import kotlinx.coroutines.sync.withLock |
| 56 | +import kotlinx.coroutines.yield | ||
| 49 | import livekit.LivekitModels | 57 | import livekit.LivekitModels |
| 50 | import livekit.LivekitRtc | 58 | import livekit.LivekitRtc |
| 51 | import livekit.LivekitRtc.JoinResponse | 59 | import livekit.LivekitRtc.JoinResponse |
| 52 | import livekit.LivekitRtc.ReconnectResponse | 60 | import livekit.LivekitRtc.ReconnectResponse |
| 53 | -import livekit.org.webrtc.* | 61 | +import livekit.org.webrtc.DataChannel |
| 62 | +import livekit.org.webrtc.IceCandidate | ||
| 63 | +import livekit.org.webrtc.MediaConstraints | ||
| 64 | +import livekit.org.webrtc.MediaStream | ||
| 65 | +import livekit.org.webrtc.MediaStreamTrack | ||
| 66 | +import livekit.org.webrtc.PeerConnection | ||
| 54 | import livekit.org.webrtc.PeerConnection.RTCConfiguration | 67 | import livekit.org.webrtc.PeerConnection.RTCConfiguration |
| 68 | +import livekit.org.webrtc.RTCStatsCollectorCallback | ||
| 69 | +import livekit.org.webrtc.RTCStatsReport | ||
| 70 | +import livekit.org.webrtc.RtpReceiver | ||
| 71 | +import livekit.org.webrtc.RtpSender | ||
| 72 | +import livekit.org.webrtc.RtpTransceiver | ||
| 55 | import livekit.org.webrtc.RtpTransceiver.RtpTransceiverInit | 73 | import livekit.org.webrtc.RtpTransceiver.RtpTransceiverInit |
| 74 | +import livekit.org.webrtc.SessionDescription | ||
| 56 | import java.net.ConnectException | 75 | import java.net.ConnectException |
| 57 | import java.nio.ByteBuffer | 76 | import java.nio.ByteBuffer |
| 58 | import javax.inject.Inject | 77 | import javax.inject.Inject |
| @@ -957,6 +976,14 @@ internal constructor( | @@ -957,6 +976,14 @@ internal constructor( | ||
| 957 | listener?.onUserPacket(dp.user, dp.kind) | 976 | listener?.onUserPacket(dp.user, dp.kind) |
| 958 | } | 977 | } |
| 959 | 978 | ||
| 979 | + LivekitModels.DataPacket.ValueCase.SIP_DTMF -> { | ||
| 980 | + // TODO | ||
| 981 | + } | ||
| 982 | + | ||
| 983 | + LivekitModels.DataPacket.ValueCase.TRANSCRIPTION -> { | ||
| 984 | + // TODO | ||
| 985 | + } | ||
| 986 | + | ||
| 960 | LivekitModels.DataPacket.ValueCase.VALUE_NOT_SET, | 987 | LivekitModels.DataPacket.ValueCase.VALUE_NOT_SET, |
| 961 | null, | 988 | null, |
| 962 | -> { | 989 | -> { |
| @@ -58,8 +58,8 @@ dependencies { | @@ -58,8 +58,8 @@ dependencies { | ||
| 58 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" | 58 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" |
| 59 | implementation libs.coroutines.lib | 59 | implementation libs.coroutines.lib |
| 60 | implementation libs.androidx.core | 60 | implementation libs.androidx.core |
| 61 | - implementation 'androidx.appcompat:appcompat:1.3.1' | ||
| 62 | - implementation 'com.google.android.material:material:1.4.0' | 61 | + implementation libs.appcompat |
| 62 | + implementation libs.material | ||
| 63 | implementation "androidx.compose.ui:ui:$compose_version" | 63 | implementation "androidx.compose.ui:ui:$compose_version" |
| 64 | implementation "androidx.compose.material:material:$compose_version" | 64 | implementation "androidx.compose.material:material:$compose_version" |
| 65 | implementation "androidx.compose.ui:ui-tooling-preview:$compose_version" | 65 | implementation "androidx.compose.ui:ui-tooling-preview:$compose_version" |
| @@ -73,8 +73,8 @@ dependencies { | @@ -73,8 +73,8 @@ dependencies { | ||
| 73 | implementation 'com.google.accompanist:accompanist-pager-indicators:0.19.0' | 73 | implementation 'com.google.accompanist:accompanist-pager-indicators:0.19.0' |
| 74 | implementation libs.timber | 74 | implementation libs.timber |
| 75 | testImplementation 'junit:junit:4.+' | 75 | testImplementation 'junit:junit:4.+' |
| 76 | - androidTestImplementation 'androidx.test.ext:junit:1.1.3' | ||
| 77 | - androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0' | 76 | + androidTestImplementation libs.androidx.test.junit |
| 77 | + androidTestImplementation libs.espresso | ||
| 78 | androidTestImplementation "androidx.compose.ui:ui-test-junit4:$compose_version" | 78 | androidTestImplementation "androidx.compose.ui:ui-test-junit4:$compose_version" |
| 79 | debugImplementation "androidx.compose.ui:ui-tooling:$compose_version" | 79 | debugImplementation "androidx.compose.ui:ui-tooling:$compose_version" |
| 80 | } | 80 | } |
| @@ -42,20 +42,19 @@ dependencies { | @@ -42,20 +42,19 @@ dependencies { | ||
| 42 | implementation fileTree(dir: 'libs', include: ['*.jar']) | 42 | implementation fileTree(dir: 'libs', include: ['*.jar']) |
| 43 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" | 43 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" |
| 44 | implementation libs.coroutines.lib | 44 | implementation libs.coroutines.lib |
| 45 | - implementation 'com.google.android.material:material:1.6.1' | ||
| 46 | - implementation 'androidx.appcompat:appcompat:1.4.2' | 45 | + implementation libs.appcompat |
| 46 | + implementation libs.material | ||
| 47 | implementation libs.androidx.core | 47 | implementation libs.androidx.core |
| 48 | - implementation "androidx.activity:activity-ktx:1.5.1" | ||
| 49 | - implementation 'androidx.fragment:fragment-ktx:1.5.1' | ||
| 50 | - implementation "androidx.viewpager2:viewpager2:1.0.0" | 48 | + implementation libs.androidx.activity.ktx |
| 49 | + implementation libs.androidx.fragment.ktx | ||
| 50 | + implementation libs.androidx.viewpager2 | ||
| 51 | implementation libs.androidx.lifecycle.runtime.ktx | 51 | implementation libs.androidx.lifecycle.runtime.ktx |
| 52 | implementation libs.androidx.lifecycle.viewmodel.ktx | 52 | implementation libs.androidx.lifecycle.viewmodel.ktx |
| 53 | implementation libs.androidx.lifecycle.common.java8 | 53 | implementation libs.androidx.lifecycle.common.java8 |
| 54 | - implementation 'com.google.android.material:material:1.6.1' | ||
| 55 | implementation libs.groupie | 54 | implementation libs.groupie |
| 56 | implementation libs.groupie.viewbinding | 55 | implementation libs.groupie.viewbinding |
| 57 | implementation libs.timber | 56 | implementation libs.timber |
| 58 | - testImplementation 'junit:junit:4.12' | ||
| 59 | - androidTestImplementation 'androidx.test.ext:junit:1.1.2' | ||
| 60 | - androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0' | 57 | + testImplementation libs.junit |
| 58 | + androidTestImplementation libs.androidx.test.junit | ||
| 59 | + androidTestImplementation libs.espresso | ||
| 61 | } | 60 | } |
-
请 注册 或 登录 后发表评论