123456789101112131415161718192021222324252627282930313233343536 |
- //
- // VideoManager+socket.m
- // SikeyComm
- //
- // Created by 刘振兴 on 2025/2/20.
- // Copyright © 2025 BaH Cy. All rights reserved.
- //
- #import "VideoManager+socket.h"
- @implementation VideoManager (socket)
- - (void)actionFromSocket:(SocketModel*)model dial:(NSInteger)dial {
- if (dial <= 0) {
- ChildModel* childModel = [[DataManager shared] getChildWithTicket:self.mTicket];
- BOOL isEquel = [model.sendId isEqualToString:childModel.cid];
- if (isEquel) {
- [EasyTextView showInfoText:NSLocalizedString(@"Video.Error.Hangup", nil)];
- [self termWithOther];
- }
- } else {
- if (self.uid.length > 0 && self.mTicket.length > 0) {
- //[EasyTextView showInfoText:NSLocalizedString(@"Video.Error.User.Busy", nil)];
- [self termWithRefuse];
- } else {
- SocketContentModel* content = [SocketContentModel mj_objectWithKeyValues:model.content];
- self.mToken = content.videoCallToken;
- self.roomId = content.roomId;
- self.uid = [DataManager shared].loginModel.uid;
- self.mTicket = [[DataManager shared] getDevice:model.sendId].ticket;
- [self videoCallIn];
- }
- }
- }
- @end
|