|
|
@ -1,5 +1,6 @@ |
|
|
import 'dart:async'; |
|
|
import 'dart:async'; |
|
|
import 'dart:convert'; |
|
|
import 'dart:convert'; |
|
|
|
|
|
import 'dart:math'; |
|
|
|
|
|
|
|
|
import 'package:dating_touchme_app/config/env_config.dart'; |
|
|
import 'package:dating_touchme_app/config/env_config.dart'; |
|
|
import 'package:dating_touchme_app/controller/discover/room_controller.dart'; |
|
|
import 'package:dating_touchme_app/controller/discover/room_controller.dart'; |
|
|
@ -116,7 +117,7 @@ class HomeController extends GetxController { |
|
|
if (Get.isRegistered<RoomController>()) { |
|
|
if (Get.isRegistered<RoomController>()) { |
|
|
final roomController = Get.find<RoomController>(); |
|
|
final roomController = Get.find<RoomController>(); |
|
|
if(data["data"]["illegalHandle"] == 1){ |
|
|
if(data["data"]["illegalHandle"] == 1){ |
|
|
RTCManager.instance.publishAudio(); |
|
|
|
|
|
|
|
|
// RTCManager.instance.closeCamera(); |
|
|
|
|
|
|
|
|
// 隐藏 overlay |
|
|
// 隐藏 overlay |
|
|
if(!roomController.isDialogShowing.value){ |
|
|
if(!roomController.isDialogShowing.value){ |
|
|
@ -185,6 +186,7 @@ class HomeController extends GetxController { |
|
|
), |
|
|
), |
|
|
).onTap(() { |
|
|
).onTap(() { |
|
|
|
|
|
|
|
|
|
|
|
// RTCManager.instance.reOpenCamera(); |
|
|
// 隐藏 overlay |
|
|
// 隐藏 overlay |
|
|
SmartDialog.dismiss(); |
|
|
SmartDialog.dismiss(); |
|
|
roomController.setDialogDismiss(false); |
|
|
roomController.setDialogDismiss(false); |
|
|
@ -313,7 +315,9 @@ class HomeController extends GetxController { |
|
|
onError: (error) { |
|
|
onError: (error) { |
|
|
print("SSE Error: $error"); |
|
|
print("SSE Error: $error"); |
|
|
sseClient.close(connectionId: "connectionId"); |
|
|
sseClient.close(connectionId: "connectionId"); |
|
|
Future.delayed(Duration(seconds: 3), () async { |
|
|
|
|
|
|
|
|
final random = Random(); |
|
|
|
|
|
int value = random.nextInt(8) + 3; |
|
|
|
|
|
Future.delayed(Duration(seconds: value), () async { |
|
|
|
|
|
|
|
|
openSSE(); |
|
|
openSSE(); |
|
|
}); |
|
|
}); |
|
|
|