BB.LiveView.Camera.BBCamera (bb_liveview v0.5.1)

Copy Markdown View Source

The default BB.LiveView.Camera implementation: the real bb_camera, and bb_camera_webrtc to stream it.

Every call dispatches on a module held in a variable rather than written inline, and every entry point is guarded by an availability check. That is what makes both packages genuinely optional dependencies of this library: with them absent nothing here resolves a missing module, the compiler has no undefined call to warn about, and a dashboard for a robot with no cameras behaves exactly as it did before cameras existed.

Summary

Types

A stream: what BB.Camera.WebRTC.unwatch/3 needs, and the signalling channel this process is the browser's peer on.

Types

watch()

@type watch() :: %{
  robot: module(),
  camera: atom(),
  ref: reference(),
  signaling: struct()
}

A stream: what BB.Camera.WebRTC.unwatch/3 needs, and the signalling channel this process is the browser's peer on.