Skip to content

Commit acba248

Browse files
committed
video call setup and search
1 parent 2f66e87 commit acba248

File tree

13 files changed

+57
-58
lines changed

13 files changed

+57
-58
lines changed

Gradgap.xcodeproj/project.pbxproj

+3-4
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,6 @@
106106
882828E82528A74F0019F322 /* MeetingModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 882828E02528A74D0019F322 /* MeetingModel.swift */; };
107107
882828E92528A74F0019F322 /* VideoModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 882828E12528A74F0019F322 /* VideoModel.swift */; };
108108
882828EB2528A7920019F322 /* AppConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 882828EA2528A7920019F322 /* AppConfiguration.swift */; };
109-
882828F02528A7D00019F322 /* SegmentedControlIndex.swift in Sources */ = {isa = PBXBuildFile; fileRef = 882828ED2528A7D00019F322 /* SegmentedControlIndex.swift */; };
110109
882828F12528A7D00019F322 /* RosterAttendee.swift in Sources */ = {isa = PBXBuildFile; fileRef = 882828EE2528A7D00019F322 /* RosterAttendee.swift */; };
111110
882828F22528A7D00019F322 /* JoinMeetingResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = 882828EF2528A7D00019F322 /* JoinMeetingResponse.swift */; };
112111
882828F42528A80C0019F322 /* MeetingModule.swift in Sources */ = {isa = PBXBuildFile; fileRef = 882828F32528A80C0019F322 /* MeetingModule.swift */; };
@@ -127,6 +126,7 @@
127126
88294ACA250CDD8E009E3CCF /* CouponListResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = 88294AC9250CDD8E009E3CCF /* CouponListResponse.swift */; };
128127
8829BED92500F3D6007F9B25 /* RateReviewVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8829BED82500F3D6007F9B25 /* RateReviewVC.swift */; };
129128
8829BEDB25011AFD007F9B25 /* BankDetailVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8829BEDA25011AFD007F9B25 /* BankDetailVC.swift */; };
129+
8829FD3D253035FF000EC8E7 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 882828C02528947D0019F322 /* AVFoundation.framework */; };
130130
882A86FB24FF725700190C0F /* TransactionTVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 882A86F924FF725700190C0F /* TransactionTVC.swift */; };
131131
882A86FC24FF725700190C0F /* TransactionTVC.xib in Resources */ = {isa = PBXBuildFile; fileRef = 882A86FA24FF725700190C0F /* TransactionTVC.xib */; };
132132
882A86FF24FF752F00190C0F /* TransactionHeaderTVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 882A86FD24FF752F00190C0F /* TransactionHeaderTVC.swift */; };
@@ -398,7 +398,6 @@
398398
882828E02528A74D0019F322 /* MeetingModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MeetingModel.swift; sourceTree = "<group>"; };
399399
882828E12528A74F0019F322 /* VideoModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = VideoModel.swift; sourceTree = "<group>"; };
400400
882828EA2528A7920019F322 /* AppConfiguration.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppConfiguration.swift; sourceTree = "<group>"; };
401-
882828ED2528A7D00019F322 /* SegmentedControlIndex.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SegmentedControlIndex.swift; sourceTree = "<group>"; };
402401
882828EE2528A7D00019F322 /* RosterAttendee.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RosterAttendee.swift; sourceTree = "<group>"; };
403402
882828EF2528A7D00019F322 /* JoinMeetingResponse.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = JoinMeetingResponse.swift; sourceTree = "<group>"; };
404403
882828F32528A80C0019F322 /* MeetingModule.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MeetingModule.swift; sourceTree = "<group>"; };
@@ -570,6 +569,7 @@
570569
files = (
571570
881FE93F25065C5800DDB411 /* MessageUI.framework in Frameworks */,
572571
C049803181C81368D8775667 /* Pods_Gradgap.framework in Frameworks */,
572+
8829FD3D253035FF000EC8E7 /* AVFoundation.framework in Frameworks */,
573573
882AEAE7252AD48900B667D1 /* AmazonChimeSDK.framework in Frameworks */,
574574
882AEAEA252AD48B00B667D1 /* AmazonChimeSDKMedia.framework in Frameworks */,
575575
);
@@ -813,7 +813,6 @@
813813
882828EC2528A7D00019F322 /* data */ = {
814814
isa = PBXGroup;
815815
children = (
816-
882828ED2528A7D00019F322 /* SegmentedControlIndex.swift */,
817816
882828EE2528A7D00019F322 /* RosterAttendee.swift */,
818817
882828EF2528A7D00019F322 /* JoinMeetingResponse.swift */,
819818
);
@@ -1540,7 +1539,6 @@
15401539
88AEE8A224D15A78002225E9 /* NSError+RUI.swift in Sources */,
15411540
88F95A8724E104C900DFD0E7 /* BookingHeaderTVC.swift in Sources */,
15421541
88AEE8DB24D19B52002225E9 /* SignUpVC.swift in Sources */,
1543-
882828F02528A7D00019F322 /* SegmentedControlIndex.swift in Sources */,
15441542
882833332503624300C8739C /* NotificationResponse.swift in Sources */,
15451543
88AEE8A624D15A78002225E9 /* Colors.swift in Sources */,
15461544
88AEE89E24D15A78002225E9 /* Data+RUI.swift in Sources */,
@@ -1830,6 +1828,7 @@
18301828
FRAMEWORK_SEARCH_PATHS = (
18311829
"$(inherited)",
18321830
"$(PROJECT_DIR)",
1831+
"$(PROJECT_DIR)/../AmazonChimeSDK/",
18331832
);
18341833
INFOPLIST_FILE = Gradgap/Info.plist;
18351834
LD_RUNPATH_SEARCH_PATHS = (

Gradgap/AppDelegate.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
109109

110110
func getAboutUsData() {
111111
aboutVM.delegate = self
112-
// aboutVM.aboutData()
112+
aboutVM.aboutData()
113113
}
114114

115115
//MARK:- Navigation

Gradgap/Model/Profile/Faq/FaqListResponse.swift

+12-5
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,18 @@ struct FaqListDataModel: Codable {
4343

4444
// MARK: - FAQ
4545
struct FAQList: Codable {
46-
let id, question, answer, createdOn: String
47-
let updatedOn: String
46+
let id, answer: String
47+
let deleted: Bool
4848
let v: Int
49+
let question: String
50+
let createdOn, updatedOn: Int
51+
let deletedOn: String?
4952

5053
enum CodingKeys: String, CodingKey {
5154
case id = "_id"
52-
case question, answer, createdOn, updatedOn
55+
case answer, deleted
5356
case v = "__v"
57+
case question, createdOn, updatedOn, deletedOn
5458
}
5559

5660
init(from decoder: Decoder) throws {
@@ -60,7 +64,10 @@ struct FAQList: Codable {
6064
id = try values.decodeIfPresent(String.self, forKey: .id) ?? ""
6165
question = try values.decodeIfPresent(String.self, forKey: .question) ?? ""
6266
answer = try values.decodeIfPresent(String.self, forKey: .answer) ?? ""
63-
createdOn = try values.decodeIfPresent(String.self, forKey: .createdOn) ?? ""
64-
updatedOn = try values.decodeIfPresent(String.self, forKey: .updatedOn) ?? ""
67+
createdOn = try values.decodeIfPresent(Int.self, forKey: .createdOn) ?? 0
68+
updatedOn = try values.decodeIfPresent(Int.self, forKey: .updatedOn) ?? 0
69+
deletedOn = try values.decodeIfPresent(String.self, forKey: .deletedOn) ?? ""
70+
deleted = try values.decodeIfPresent(Bool.self, forKey: .deleted) ?? false
6571
}
72+
6673
}

Gradgap/ProjectHelper/API_Helper.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ struct API {
1616
// static let BASE_URL = "http://54.197.250.33/staging/api/"
1717
// static let IMAGE_URL = "https://gradgab.s3.us-east-2.amazonaws.com/staging/images/best/"
1818
// Local
19-
static let BASE_URL = "https://fd7b5f606c61.ngrok.io/api/"//"http://3.82.95.119/development/api/" //
19+
static let BASE_URL = "http://3.82.95.119/development/api/" //"http://c17819afdf3e.ngrok.io/api/"//
2020
static let IMAGE_URL = "https://gradgab.s3.us-east-2.amazonaws.com/development/images/best/"
2121

2222
struct USER {
@@ -89,7 +89,7 @@ struct API {
8989

9090
struct APPDETAIL {
9191
static let list = BASE_URL + "appDetails/list"
92-
static let listFaq = BASE_URL + "appDetails/listFaqs"
92+
static let listFaq = BASE_URL + "faq/list"
9393
}
9494

9595
struct BANK {

Gradgap/View/Home/BookingDetailVC.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ class BookingDetailVC: UIViewController {
113113
}
114114

115115
@IBAction func clickToJoinCall(_ sender: Any) {
116-
joinCallVM.getVideoCallData(request: VideoCallDataRequest(bookingRef: bookingDetail.id))
116+
// joinCallVM.getVideoCallData(request: VideoCallDataRequest(bookingRef: bookingDetail.id))
117117

118118
// joinMeeting(callKitOption: .outgoing, meetingId: "vishAB", name: "Vishal")
119119

Gradgap/View/Home/ConfirmBookingVC.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,8 @@ class ConfirmBookingVC: UIViewController {
156156
}
157157

158158
@IBAction func clickToApplyCoupon(_ sender: Any) {
159-
// let vc = STORYBOARD.HOME.instantiateViewController(withIdentifier: "ApplyCouponVC") as! ApplyCouponVC
160-
// self.navigationController?.pushViewController(vc, animated: true)
159+
let vc = STORYBOARD.HOME.instantiateViewController(withIdentifier: "ApplyCouponVC") as! ApplyCouponVC
160+
self.navigationController?.pushViewController(vc, animated: true)
161161
}
162162

163163

Gradgap/View/Home/SidemenuVC.swift

+4-4
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,8 @@ class SidemenuVC: UIViewController,UITableViewDelegate,UITableViewDataSource {
9999
else if indexPath.row == 2
100100
{
101101
if isMentor {
102-
// let vc = STORYBOARD.HOME.instantiateViewController(withIdentifier: "MyEarningVC") as! MyEarningVC
103-
// self.navigationController?.pushViewController(vc, animated: true)
102+
let vc = STORYBOARD.HOME.instantiateViewController(withIdentifier: "MyEarningVC") as! MyEarningVC
103+
self.navigationController?.pushViewController(vc, animated: true)
104104
}
105105
else {
106106
let vc = STORYBOARD.HOME.instantiateViewController(withIdentifier: "BookingListVC") as! BookingListVC
@@ -126,8 +126,8 @@ class SidemenuVC: UIViewController,UITableViewDelegate,UITableViewDataSource {
126126
self.navigationController?.pushViewController(vc, animated: true)
127127
}
128128
else {
129-
// let vc = STORYBOARD.PROFILE.instantiateViewController(withIdentifier: "TransactionVC") as! TransactionVC
130-
// self.navigationController?.pushViewController(vc, animated: true)
129+
let vc = STORYBOARD.PROFILE.instantiateViewController(withIdentifier: "TransactionVC") as! TransactionVC
130+
self.navigationController?.pushViewController(vc, animated: true)
131131
}
132132
}
133133
else if indexPath.row == 5

Gradgap/View/Profile/AboutUsVC.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ class AboutUsVC: UIViewController {
4747
AppDelegate().sharedDelegate().getAboutUsData()
4848
}
4949
else {
50-
// dataSetUp()
50+
dataSetUp()
5151
}
5252
}
5353

Gradgap/View/Profile/FaqVC.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class FaqVC: UIViewController {
3737
tblView.register(UINib.init(nibName: "CustomQuestionTVC", bundle: nil), forCellReuseIdentifier: "CustomQuestionTVC")
3838

3939
faqVM.delegate = self
40-
// faqVM.getFaqList()
40+
faqVM.getFaqList()
4141
}
4242

4343
//MARK: - Button Click

Gradgap/View/Profile/SettingVC.swift

+11-11
Original file line numberDiff line numberDiff line change
@@ -114,23 +114,23 @@ extension SettingVC : UITableViewDelegate, UITableViewDataSource {
114114

115115
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
116116
if indexPath.row == 0 {
117-
// let vc = STORYBOARD.PROFILE.instantiateViewController(withIdentifier: "AboutUsVC") as! AboutUsVC
118-
// vc.type = 0
119-
// self.navigationController?.pushViewController(vc, animated: true)
117+
let vc = STORYBOARD.PROFILE.instantiateViewController(withIdentifier: "AboutUsVC") as! AboutUsVC
118+
vc.type = 0
119+
self.navigationController?.pushViewController(vc, animated: true)
120120
}
121121
else if indexPath.row == 1 {
122-
// let vc = STORYBOARD.PROFILE.instantiateViewController(withIdentifier: "AboutUsVC") as! AboutUsVC
123-
// vc.type = 1
124-
// self.navigationController?.pushViewController(vc, animated: true)
122+
let vc = STORYBOARD.PROFILE.instantiateViewController(withIdentifier: "AboutUsVC") as! AboutUsVC
123+
vc.type = 1
124+
self.navigationController?.pushViewController(vc, animated: true)
125125
}
126126
else if indexPath.row == 2 {
127-
// let vc = STORYBOARD.PROFILE.instantiateViewController(withIdentifier: "AboutUsVC") as! AboutUsVC
128-
// vc.type = 2
129-
// self.navigationController?.pushViewController(vc, animated: true)
127+
let vc = STORYBOARD.PROFILE.instantiateViewController(withIdentifier: "AboutUsVC") as! AboutUsVC
128+
vc.type = 2
129+
self.navigationController?.pushViewController(vc, animated: true)
130130
}
131131
else if indexPath.row == 3 {
132-
// let vc = STORYBOARD.PROFILE.instantiateViewController(withIdentifier: "HelpVC") as! HelpVC
133-
// self.navigationController?.pushViewController(vc, animated: true)
132+
let vc = STORYBOARD.PROFILE.instantiateViewController(withIdentifier: "HelpVC") as! HelpVC
133+
self.navigationController?.pushViewController(vc, animated: true)
134134
}
135135
else {
136136
showAlertWithOption("Confirmation", message: "Are you sure you want to logout?", btns: ["Cancel","Ok"], completionConfirm: {

Gradgap/View/VideoCall/VideoCallVC.swift

+18-6
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class VideoCallVC: UIViewController {
3434

3535
var meetingModel: MeetingModel?
3636
private let logger = ConsoleLogger(name: "VideoCallVC")
37-
// private let audioVideoFacade: AudioVideoFacade
37+
3838

3939
override func viewDidLoad() {
4040
super.viewDidLoad()
@@ -72,10 +72,8 @@ class VideoCallVC: UIViewController {
7272
setupUI()
7373

7474
meetingModel.startMeeting()
75-
meetingModel.activeMode = .video
76-
videoCollection.reloadData()
77-
meetingModel.isLocalVideoActive = true
78-
75+
// meetingModel.activeMode = .video
76+
// videoCollection.reloadData()
7977

8078

8179
}
@@ -118,18 +116,32 @@ class VideoCallVC: UIViewController {
118116
// Video collection view
119117
videoCollection.delegate = self
120118
videoCollection.dataSource = self
119+
120+
meetingModel?.activeMode = .video
121+
meetingModel?.isLocalVideoActive = true
121122
}
122123

123124
private func configure(meetingModel: MeetingModel) {
125+
126+
meetingModel.activeModeDidSetHandler = { [weak self] activeMode in
127+
self?.videoCollection.reloadData()
128+
self?.videoCollection.isHidden = false
129+
}
124130
meetingModel.notifyHandler = { [weak self] message in
125131
self?.view?.makeToast(message, duration: 2.0, position: .top)
126132
}
133+
meetingModel.isMutedHandler = { [weak self] isMuted in
134+
self?.microPhoneBtn.isSelected = isMuted
135+
}
127136
meetingModel.isEndedHandler = {
128137
DispatchQueue.main.async {
129138
MeetingModule.shared().dismissMeeting(meetingModel)
130139
}
131140
}
132-
141+
meetingModel.rosterModel.rosterUpdatedHandler = { [weak self] in
142+
// self?.rosterTable.reloadData()
143+
}
144+
133145
meetingModel.videoModel.videoUpdatedHandler = { [weak self] in
134146
meetingModel.videoModel.resumeAllRemoteVideosInCurrentPageExceptUserPausedVideos()
135147
self?.videoCollection.reloadData()

Gradgap/View/VideoCall/data/SegmentedControlIndex.swift

-17
This file was deleted.

Gradgap/ViewModel/VideoCall/JoinCallViewModel.swift

+1-3
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,7 @@ struct JoinCallViewModel {
6767

6868
let meetingResp = getCreateMeetingResponse2(from: meeting)
6969
let attendeeResp = getCreateAttendeeResponse2(from: attendee)
70-
return MeetingSessionConfiguration(createMeetingResponse: meetingResp,
71-
createAttendeeResponse: attendeeResp,
72-
urlRewriter: urlRewriter2)
70+
return MeetingSessionConfiguration(createMeetingResponse: meetingResp, createAttendeeResponse: attendeeResp, urlRewriter: urlRewriter2)
7371
}
7472

7573
func getCreateMeetingResponse2(from joinMeetingResponse: MeetingData) -> CreateMeetingResponse {

0 commit comments

Comments
 (0)