launch
fun launch(context: Context, serviceClass: Class<out ScreenRecorderSrtLiveService>, enableAudio: Boolean = true, tsServiceInfo: TsServiceInfo = context.defaultTsServiceInfo, enableBitrateRegulation: Boolean = false, bitrateRegulatorConfig: BitrateRegulatorConfig? = null, onServiceCreated: (ScreenRecorderSrtLiveStreamer) -> Unit, onServiceDisconnected: (name: ComponentName?) -> Unit)
Starts and binds the service with the appropriate parameters.
Parameters
context
The application context.
serviceClass
The children service class.
enableAudio
Boolean.true to also capture audio. Boolean.false to disable audio capture.
tsServiceInfo
MPEG-TS service description
enableBitrateRegulation
Boolean.true to enable bitrate regulation. Boolean.false to disable bitrate regulation.
bitrateRegulatorConfig
bitrate regulator configuration. If bitrateRegulatorFactory is not null, bitrateRegulatorConfig must not be null.
onServiceCreated
Callback that returns the ScreenRecorderSrtLiveStreamer instance when the service has been connected.
onServiceDisconnected
Callback that will be called when the service is disconnected.