You do not need this to render the right self-view.getLocalVideoStream already returns the processed virtualStream whenever
keepBackground is on, and the raw camera otherwise — the same rule the SDK's
own grid uses. Rendering localStreamVideo directly is what shows a user
their unprocessed background, so prefer the helper and ignore this.
This exists for UI that needs to describe the state ("Background on"), not
to choose a stream.
Known gap: applying or clearing a background is still modal-driven in the SDK
(isBackgroundModalVisible / autoClickBackground), so a returnUI={false}
surface cannot currently turn a background on by itself. Reading works
headlessly; controlling does not.
Read-only virtual-background state.
You do not need this to render the right self-view.
getLocalVideoStreamalready returns the processedvirtualStreamwheneverkeepBackgroundis on, and the raw camera otherwise — the same rule the SDK's own grid uses. RenderinglocalStreamVideodirectly is what shows a user their unprocessed background, so prefer the helper and ignore this.This exists for UI that needs to describe the state ("Background on"), not to choose a stream.
Known gap: applying or clearing a background is still modal-driven in the SDK (
isBackgroundModalVisible/autoClickBackground), so areturnUI={false}surface cannot currently turn a background on by itself. Reading works headlessly; controlling does not.