The local camera stream to render as the self-view.
The virtual-background case is the one everyone misses: when keepBackground
is on, the stream that carries the processed frames is virtualStream, and
localStreamVideo still holds the raw camera. Rendering the wrong one shows
the user their unprocessed background. This mirrors the SDK's own grid rule.
Returns null when the camera is off, so a falsy result is a truthful
"no self-view" rather than something to paint black.
Note: transport state such as videoParams or videoProducer is not
renderable media and is deliberately never consulted here.
The local camera stream to render as the self-view.
The virtual-background case is the one everyone misses: when
keepBackgroundis on, the stream that carries the processed frames isvirtualStream, andlocalStreamVideostill holds the raw camera. Rendering the wrong one shows the user their unprocessed background. This mirrors the SDK's own grid rule.Returns
nullwhen the camera is off, so a falsy result is a truthful "no self-view" rather than something to paint black.Note: transport state such as
videoParamsorvideoProduceris not renderable media and is deliberately never consulted here.