Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
decanus committed Feb 3, 2021
1 parent 65ea519 commit 53d245f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
7 changes: 3 additions & 4 deletions Sources/ion/Client.swift
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,13 @@ class Client {
stream.delegate = self
}

// _ = publisher.createAudioTrack(label: "audio", streamId: "stream")

publisher.offer(completion: { result in
switch result {
case .failure:
break
case let .success(description):
break // @TODO
case let .success(description):
debugPrint(description)
// self.signal.offer(description)
}
})
}
Expand Down
13 changes: 6 additions & 7 deletions Sources/ion/WebRTC/WebRTC.swift
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,13 @@ final class WebRTCClient: NSObject {
return completion(.failure(error))
}

if let sdp = sdp {
return completion(.success(sdp))
}

// @TODO SET REMOTE
peerConnection.setRemoteDescription(sdp, completionHandler: { error in
if let error = error {
return completion(.failure(error))
}

fatalError("both SDP and Error were nil")
return completion(.success(sdp))
})
})
}

Expand Down Expand Up @@ -148,7 +148,6 @@ final class WebRTCClient: NSObject {

let track = WebRTCClient.factory.audioTrack(with: audioSource, trackId: label)

// @TODO FIGURE THIS PART OUT
peerConnection.add(track, streamIds: [streamId])
peerConnection.addTransceiver(with: track)

Expand Down

0 comments on commit 53d245f

Please sign in to comment.