# `BB.Message.Camera.BeginCapture`
[🔗](https://github.com/beam-bots/bb_camera/blob/main/lib/bb/message/camera/begin_capture.ex#L5)

A camera has started capturing.

Published when the *driver* confirms capture with
`BB.Camera.Hub.capture_started/2` - not when a consumer subscribes. A driver
whose device fails to open never produces this message; it produces
`BB.Message.Camera.EndCapture` with `reason: :error` instead. There is no
window in which the system says it is capturing and isn't.

Carries no image data, as nothing published on `BB.PubSub` ever does.

# `t`

```elixir
@type t() :: %BB.Message.Camera.BeginCapture{
  stream_info: BB.Camera.StreamInfo.t(),
  subscriber_count: non_neg_integer()
}
```

# `new`

```elixir
@spec new(atom(), keyword()) :: {:ok, BB.Message.t()} | {:error, term()}
```

---

*Consult [api-reference.md](api-reference.md) for complete listing*
