ApiVideoLiveStream

@RequiresPermission(allOf = ["android.permission.RECORD_AUDIO", "android.permission.CAMERA"])
fun ApiVideoLiveStream(context: Context, apiVideoView: ApiVideoView, connectionListener: IConnectionListener, initialAudioConfig: AudioConfig? = null, initialVideoConfig: VideoConfig? = null, initialCameraPosition: CameraFacingDirection = CameraFacingDirection.BACK, permissionRequester: (List<String>, onGranted: () -> Unit) -> Unit = { _, onGranted -> onGranted() }): ApiVideoLiveStream

Parameters

context

application context

apiVideoView

where to display preview. Could be null if you don't have a preview.

connectionListener

connection callbacks

initialAudioConfig

initial audio configuration. Could be change later with audioConfig field.

initialVideoConfig

initial video configuration. Could be change later with videoConfig field.

initialCameraPosition

initial camera. Could be change later with cameraPosition field.

permissionRequester

permission requester. Called when permissions are required. Always call onGranted when permissions are granted.