Context
The previewOnly prop on OTPublisher (feature request #222) renders the local camera before publishing, enabling a waiting-room / lobby experience. A common lobby need is a mic level indicator — showing the user their microphone works before they join.
Limitation
The native Android and iOS Vonage Video SDKs only begin audio capture when the publisher is published. In previewOnly mode the publisher is intentionally not published, so audioLevel events are never emitted — the React Native wrapper has no audio level to forward during preview.
Repro: mount <OTPublisher previewOnly /> with an audioLevel handler → no audioLevel events fire until previewOnly is set to false (the publisher publishes).
Why this isn't solved in the wrapper
Working around it at the RN layer would mean opening an independent microphone capture (an AVAudioEngine tap on iOS / AudioRecord on Android) alongside the SDK. That double-opens the mic, fights the SDK's own capture lifecycle, and risks audio-route/echo issues — so it shouldn't be done in the wrapper.
Suggested direction
- Short term (done): documented in the
previewOnly README — audioLevel is unavailable during preview.
- Proper fix: the native Video SDKs need to expose a preview-time audio level (or a standalone mic-level API) that the RN wrapper can forward while
previewOnly is active. This should be raised with the native Android/iOS SDK team.
Tracking this alongside the previewOnly feature (#222).
Context
The
previewOnlyprop onOTPublisher(feature request #222) renders the local camera before publishing, enabling a waiting-room / lobby experience. A common lobby need is a mic level indicator — showing the user their microphone works before they join.Limitation
The native Android and iOS Vonage Video SDKs only begin audio capture when the publisher is published. In
previewOnlymode the publisher is intentionally not published, soaudioLevelevents are never emitted — the React Native wrapper has no audio level to forward during preview.Repro: mount
<OTPublisher previewOnly />with anaudioLevelhandler → noaudioLevelevents fire untilpreviewOnlyis set tofalse(the publisher publishes).Why this isn't solved in the wrapper
Working around it at the RN layer would mean opening an independent microphone capture (an
AVAudioEnginetap on iOS /AudioRecordon Android) alongside the SDK. That double-opens the mic, fights the SDK's own capture lifecycle, and risks audio-route/echo issues — so it shouldn't be done in the wrapper.Suggested direction
previewOnlyREADME —audioLevelis unavailable during preview.previewOnlyis active. This should be raised with the native Android/iOS SDK team.Tracking this alongside the previewOnly feature (#222).