When a VidyoConnector object is constructed in a composited layout, the default camera, microphone, and speaker are automatically selected. However, there may be circumstances where a developer would want to have one or more of those devices to be off by default.

The way to make this happen is as follows:

First, call VidyoConnectorConstruct with NULL as the viewId and follow that with a call to VidyoConnectorAssignViewToCompositeRenderer. This will prevent a camera, microphone or speaker from being selected until you register for their respective event listener.

So for example, if you wanted to start without a camera or microphone selected, you would do something like this:

VidyoConnectorConstruct( &vc, NULL, VIDYO_CONNECTORVIEWSTYLE_Default, NUM_REMOTE_PARTICIPANTS, "info@VidyoClient info@VidyoConnector warning", "", NULL );

VidyoConnectorAssignViewToCompositeRenderer(&vc, &hVideoPanel, VIDYO_CONNECTORVIEWSTYLE_Default, NUM_REMOTE_PARTICIPANTS);

// Register for speaker events, which will also select the default speaker.

VidyoConnectorRegisterLocalSpeakerEventListener( &vc, OnLocalSpeakerAdded, OnLocalSpeakerRemoved, OnLocalSpeakerSelected, OnLocalSpeakerStateUpdated);

If you want a camera or mic to be selected at some later time, then you would call VidyoConnectorRegisterLocalCameraEventListener and/or VidyoConnectorRegisterLocalMicrophoneEventListener whenever you would want that to happen.

 

Was this article helpful?
0 out of 0 found this helpful

0 Comments

Follow
Please sign in to leave a comment.