feat: 直播间历史记录

This commit is contained in:
guozhigq
2024-09-29 01:01:45 +08:00
parent bbf91e2f8f
commit ec6b6b48a0

View File

@ -97,6 +97,7 @@ class LiveRoomController extends GetxController {
autoplay: true,
);
plPlayerController.isOpenDanmu.value = danmakuSwitch.value;
heartBeat();
}
Future queryLiveInfo() async {
@ -281,8 +282,20 @@ class LiveRoomController extends GetxController {
}
}
// 历史记录
void heartBeat() {
LiveHttp.liveRoomEntry(roomId: roomId);
}
String encodeToBase64(String input) {
List<int> bytes = utf8.encode(input);
String base64Str = base64.encode(bytes);
return base64Str;
}
@override
void onClose() {
heartBeat();
plSocket?.onClose();
super.onClose();
}