Initialize Call Engine

CallEngine class should be instantiated and can be initialized just right after a main dependencies tree initialization: Please ensure that proper values set to match other clients in system

    sdkComponent.callEngine.setPrefs(
        CallPrefs.Builder()
            .setRelayOnly(true|false)
            .setVideoCodec(CallPrefs.VideoCodec.VP8)
            .setDecodeType(CallPrefs.DecodeType.AUTO)
            .setPlanTypeCallPrefs.PlanType.B)
            .build()
    )

To reflect call state on UI(or for other purposes), subscribe to call state, provided by engine:

sdkComponent.callEngine.observeState()
     .observeOn(AndroidSchedulers.mainThread())
 .doOnNext { state: CallState -> onCallState(state) }
     .subscribe()

Last updated