Classes(Swift)

  • BJNObservable is a generic type that generates a callback when its value is changed. It can be used to listen in on changes to a specific value, but not to update the value itself. BJNObservable is read-only, for write capabilities, see BJNMutableObservable

    Monitor any change to the value as:

    clientMuteState.onChange {
        print("the client is now \(clientMuteState.value ? "muted" : "unmuted")")
    }
    
    See more

    Declaration

    Swift

    public class BJNObservable<T>
  • BJNMutableObservable is a BJNObservable that allows its value to be changed.

    To modify a BJNMutableObservable‘s value,

    mutableObservableVar.value = true
    

    As a subclass of BJNObservable, you can still listen in on value changes.

    mutableObservableVar.onChange {
        print("value changed to ", mutableObservableVar.value)
    }
    
    See more

    Declaration

    Swift

    public class BJNMutableObservable<T> : BJNObservable<T>
  • BJNVideo encapsulates all of the BlueJeans API related to establishing an audio/video connection.

    It can be initialized as,

    let video = BJNVideo()
    

    To connect to an audio/video meeting,

    video.join(meetingID: "111111111", passcode: "2222", displayName: "John Doe", onSuccess: {
        print("Successfully joined the meeting")
    }, onFailure: {})
    

    To disconnect from the meeting,

    video.leave()
    

    BJNVideo has several observable properties, some of which can be mutated.

    All properties (BJNObservable and BJNMutableObservable) can be observed,

    video.videoMuted.onChange {
        print("video muted status changed to ", video.videoMuted.value)
    }
    

    and any properties that are of type BJNMutableObservable can be modified

    video.videoMuted.value = true
    
    See more

    Declaration

    Swift

    public class BJNVideo