Flashlight management while publishing video from main camera¶
Since build 1.1.0.17 it is possible to turn on and off flashlight while publishiung video from main device camera.
To turn flashlight on, use the function Flashphoner.turnOnFlashlight()
private void turnOnFlashlight() {
if (Flashphoner.turnOnFlashlight()) {
mSwitchFlashlightButton.setText(getResources().getString(R.string.turn_off_flashlight));
flashlight = true;
}
}
To turn flashlight off, use the function Flashphoner.turnOffFlashlight()
private void turnOffFlashlight() {
Flashphoner.turnOffFlashlight();
mSwitchFlashlightButton.setText(getResources().getString(R.string.turn_on_flashlight));
flashlight = false;
}
These functions may be called by keypress, for example