Skip to content

Commit ee1df43

Browse files
Fix
1 parent aebeb2a commit ee1df43

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

WebRTC-Sample-App/ConferenceViewController.swift

+5-1
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ open class ConferenceViewController: UIViewController , AVCaptureVideoDataOutput
4343
publishStream = !publishStream;
4444
var title:String;
4545

46+
if publisherStreamId == nil {
47+
publisherStreamId = "\(Int.random(in: 0..<100))_streamId"
48+
}
49+
4650
//TODO: don't use flag(publishStream), use more trusted info @mekya
4751
if (publishStream) {
4852
self.conferenceClient?.publish(streamId: publisherStreamId, streamerName: "Muhammadjon", streamerMeta: "{ \"photoUrl\": \"https://img.freepik.com/free-vector/businessman-character-avatar-isolated_24877-60111.jpg\"")
@@ -89,7 +93,7 @@ open class ConferenceViewController: UIViewController , AVCaptureVideoDataOutput
8993
self.conferenceClient?.delegate = self
9094
self.conferenceClient?.setWebSocketServerUrl(url: self.clientUrl)
9195
self.conferenceClient?.setLocalView(container: self.localView)
92-
self.conferenceClient?.joinRoom(roomId: roomId)
96+
self.conferenceClient?.joinRoom(roomId: roomId, streamId: "\(Int.random(in: 0..<200))_stream_id")
9397
}
9498

9599
open override func viewWillDisappear(_ animated: Bool) {

0 commit comments

Comments
 (0)