Skip to content

Commit

Permalink
fix ObjC RoomOptions
Browse files Browse the repository at this point in the history
  • Loading branch information
hiroshihorie committed Dec 13, 2023
1 parent 6c4f191 commit 5bd432c
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 5 deletions.
10 changes: 7 additions & 3 deletions Sources/LiveKit/E2EE/Options.swift
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,13 @@ extension Livekit_Encryption.TypeEnum {
}
}

public class E2EEOptions {
var keyProvider: BaseKeyProvider
var encryptionType: EncryptionType = .gcm
@objc
public class E2EEOptions: NSObject {
let keyProvider: BaseKeyProvider

@objc
let encryptionType: EncryptionType = .gcm

public init(keyProvider: BaseKeyProvider) {
self.keyProvider = keyProvider
}
Expand Down
20 changes: 18 additions & 2 deletions Sources/LiveKit/Types/Options/RoomOptions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,22 @@ public class RoomOptions: NSObject {
@objc
public let reportRemoteTrackStatistics: Bool

override public init() {
defaultCameraCaptureOptions = CameraCaptureOptions()
defaultScreenShareCaptureOptions = ScreenShareCaptureOptions()
defaultAudioCaptureOptions = AudioCaptureOptions()
defaultVideoPublishOptions = VideoPublishOptions()
defaultAudioPublishOptions = AudioPublishOptions()
defaultDataPublishOptions = DataPublishOptions()
adaptiveStream = false
dynacast = false
stopLocalTrackOnUnpublish = true
suspendLocalVideoTracksInBackground = true
e2eeOptions = nil
reportRemoteTrackStatistics = false
}

@objc
public init(defaultCameraCaptureOptions: CameraCaptureOptions = CameraCaptureOptions(),
defaultScreenShareCaptureOptions: ScreenShareCaptureOptions = ScreenShareCaptureOptions(),
defaultAudioCaptureOptions: AudioCaptureOptions = AudioCaptureOptions(),
Expand All @@ -80,7 +96,7 @@ public class RoomOptions: NSObject {
stopLocalTrackOnUnpublish: Bool = true,
suspendLocalVideoTracksInBackground: Bool = true,
e2eeOptions: E2EEOptions? = nil,
reportTrackStatistics: Bool = false)
reportRemoteTrackStatistics: Bool = false)
{
self.defaultCameraCaptureOptions = defaultCameraCaptureOptions
self.defaultScreenShareCaptureOptions = defaultScreenShareCaptureOptions
Expand All @@ -93,7 +109,7 @@ public class RoomOptions: NSObject {
self.stopLocalTrackOnUnpublish = stopLocalTrackOnUnpublish
self.suspendLocalVideoTracksInBackground = suspendLocalVideoTracksInBackground
self.e2eeOptions = e2eeOptions
reportRemoteTrackStatistics = reportTrackStatistics
self.reportRemoteTrackStatistics = reportRemoteTrackStatistics
}

// MARK: - Equal
Expand Down

0 comments on commit 5bd432c

Please sign in to comment.