VideoManager+socket.m 1.2 KB

123456789101112131415161718192021222324252627282930313233343536
  1. //
  2. // VideoManager+socket.m
  3. // SikeyComm
  4. //
  5. // Created by 刘振兴 on 2025/2/20.
  6. // Copyright © 2025 BaH Cy. All rights reserved.
  7. //
  8. #import "VideoManager+socket.h"
  9. @implementation VideoManager (socket)
  10. - (void)actionFromSocket:(SocketModel*)model dial:(NSInteger)dial {
  11. if (dial <= 0) {
  12. ChildModel* childModel = [[DataManager shared] getChildWithTicket:self.mTicket];
  13. BOOL isEquel = [model.sendId isEqualToString:childModel.cid];
  14. if (isEquel) {
  15. [EasyTextView showInfoText:NSLocalizedString(@"Video.Error.Hangup", nil)];
  16. [self termWithOther];
  17. }
  18. } else {
  19. if (self.uid.length > 0 && self.mTicket.length > 0) {
  20. //[EasyTextView showInfoText:NSLocalizedString(@"Video.Error.User.Busy", nil)];
  21. [self termWithRefuse];
  22. } else {
  23. SocketContentModel* content = [SocketContentModel mj_objectWithKeyValues:model.content];
  24. self.mToken = content.videoCallToken;
  25. self.roomId = content.roomId;
  26. self.uid = [DataManager shared].loginModel.uid;
  27. self.mTicket = [[DataManager shared] getDevice:model.sendId].ticket;
  28. [self videoCallIn];
  29. }
  30. }
  31. }
  32. @end