diff --git a/android/app/build.gradle.kts b/android/app/build.gradle.kts index 5f45a8a3f..ad5eafd7b 100644 --- a/android/app/build.gradle.kts +++ b/android/app/build.gradle.kts @@ -1,8 +1,6 @@ repositories { google() mavenCentral() - maven { url = uri("https://artifact.bytedance.com/repository/Volcengine/") } - maven { url = uri("https://oss.sonatype.org/content/repositories/snapshots/") } } plugins { @@ -49,9 +47,7 @@ android { } dependencies { - // WebRTC依赖已移除 - // implementation("io.antmedia:webrtc-android-framework:2.8.0-SNAPSHOT") - + // 添加OkHttp依赖 implementation("com.squareup.okhttp3:okhttp:4.9.3") diff --git a/ios/Runner/AudioSessionManager.swift b/ios/Runner/AudioSessionManager.swift index feaeee830..d41d2fbf5 100644 --- a/ios/Runner/AudioSessionManager.swift +++ b/ios/Runner/AudioSessionManager.swift @@ -206,7 +206,7 @@ import UIKit // 重新激活会话 try audioSession.setActive(true, options: .notifyOthersOnDeactivation) isActive = true - + // 切换到扬声器 // 记录当前配置 currentCategory = category currentMode = mode @@ -319,6 +319,8 @@ import UIKit ], force: false // 是否强制重新配置 ) + try audioSession.overrideOutputAudioPort(.speaker) + } @@ -516,6 +518,8 @@ import UIKit force: force // 是否强制重新配置 ) + try audioSession.overrideOutputAudioPort(.speaker) + // 额外的优化配置 if configureAdditionalSettings { // 获取当前是否使用耳机