In dark environments, the camera needs to adjust the exposure time and white balance.
This process can take few seconds.
When using the camera in dark environments, suggest to turn on the Automatic Low Light function (go to the App > Settings > Automatic Low Light).
It will help you to get brighter images.