Some VideoKit components (like
StreamHost) will automatically
open a connection with the camera sensor available on the device.
We offer control over some core camera features through the
Camera interface and its listeners.
You can typically access the camera object from the parent component, for example:
You can choose which sensor is active by changing the camera
You can observe the facing value with a listener:
You can control the flash behavior by changing the camera
You can observe the flash value with a listener:
You can control the sensor zoom by changing the camera
zoom value. This value
goes from 0 to 1, where 0 means no zoom and 1 means that maximum zoom will been applied.
You can observe the zoom value with a listener: