File tree 2 files changed +9
-11
lines changed
2 files changed +9
-11
lines changed Original file line number Diff line number Diff line change @@ -36,14 +36,13 @@ class Client {
36
36
stream. delegate = self
37
37
}
38
38
39
- // _ = publisher.createAudioTrack(label: "audio", streamId: "stream")
40
-
41
39
publisher. offer ( completion: { result in
42
40
switch result {
43
41
case . failure:
44
- break
45
- case let . success( description) :
46
42
break // @TODO
43
+ case let . success( description) :
44
+ debugPrint ( description)
45
+ // self.signal.offer(description)
47
46
}
48
47
} )
49
48
}
Original file line number Diff line number Diff line change @@ -108,13 +108,13 @@ final class WebRTCClient: NSObject {
108
108
return completion ( . failure( error) )
109
109
}
110
110
111
- if let sdp = sdp {
112
- return completion ( . success( sdp) )
113
- }
114
-
115
- // @TODO SET REMOTE
111
+ peerConnection. setRemoteDescription ( sdp, completionHandler: { error in
112
+ if let error = error {
113
+ return completion ( . failure( error) )
114
+ }
116
115
117
- fatalError ( " both SDP and Error were nil " )
116
+ return completion ( . success( sdp) )
117
+ } )
118
118
} )
119
119
}
120
120
@@ -148,7 +148,6 @@ final class WebRTCClient: NSObject {
148
148
149
149
let track = WebRTCClient . factory. audioTrack ( with: audioSource, trackId: label)
150
150
151
- // @TODO FIGURE THIS PART OUT
152
151
peerConnection. add ( track, streamIds: [ streamId] )
153
152
peerConnection. addTransceiver ( with: track)
154
153
You can’t perform that action at this time.
0 commit comments