添加 network_info_plus 依赖以支持局域网 IP 获取;在事件信息和录制页面中增强局域网 IP 查询功能,更新相关模型以包含 scheduleId 字段;重构录制页面以改善用户体验,修复推流控制器释放逻辑。

This commit is contained in:
2026-07-17 17:31:04 +08:00
parent a4333d3bd1
commit 25a07cbd3b
16 changed files with 273 additions and 51 deletions
@@ -1,2 +1,2 @@
#Mon Jul 13 17:53:35 CST 2026
#Fri Jul 17 16:25:39 CST 2026
gradle.version=8.2
@@ -175,8 +175,18 @@ class FlutterLiveStreamView(
}
fun dispose() {
stopStream()
streamer.stopPreview()
try {
stopStream()
} catch (e: Exception) {
android.util.Log.w("ApiVideoLiveStream", "stopStream during dispose failed", e)
_isStreaming = false
}
try {
streamer.stopPreview()
} catch (e: Exception) {
android.util.Log.w("ApiVideoLiveStream", "stopPreview during dispose failed", e)
}
_isPreviewing = false
flutterTexture.release()
}
@@ -195,14 +205,27 @@ class FlutterLiveStreamView(
}
fun stopStream() {
if (!_isStreaming && !streamer.isConnected) {
return
}
val isConnected = streamer.isConnected
runBlocking {
streamer.stopStream()
streamer.disconnect()
if (isConnected) {
onDisconnected()
try {
runBlocking {
streamer.stopStream()
streamer.disconnect()
if (isConnected) {
onDisconnected()
}
_isStreaming = false
}
} catch (e: Exception) {
android.util.Log.w("ApiVideoLiveStream", "stopStream failed", e)
_isStreaming = false
try {
streamer.disconnect()
} catch (_: Exception) {
// ignore secondary disconnect failures
}
}
}