/
UpdateVideoInput (Unity)

UpdateVideoInput (Unity)

- Declaration

public static void UpdateVideoInput(CavrnusVideoInputDevice device)

- Description

Sets which camera the user wishes to use. Note that the CavrnusVideoInputDevice provided to this function can only be acquired by calling FetchVideoInputs to search for available cameras.

- Sample

public class VideoInputSelector : MonoBehaviour { private List<CavrnusVideoInputDevice> videoDevices; private int currentDeviceIndex = 0; private void Start() { CavrnusFunctionLibrary.AwaitAnySpaceConnection(spaceConn => { CavrnusFunctionLibrary.FetchVideoInputs(devices => { videoDevices = devices; }); }); } public void SelectNextVideoSource() { if (videoDevices.Count == 0) { Debug.LogWarning("No video devices available."); return; } currentDeviceIndex = (currentDeviceIndex + 1) % videoDevices.Count; CavrnusFunctionLibrary.UpdateVideoInput(videoDevices[currentDeviceIndex]); } }

Related content

FetchVideoInputs (Unity)
FetchVideoInputs (Unity)
More like this
UpdateVideoInput (Unreal Engine)
UpdateVideoInput (Unreal Engine)
More like this
FetchVideoInputs (Unreal Engine)
FetchVideoInputs (Unreal Engine)
More like this
CavrnusVideoInputDevice (Unity)
CavrnusVideoInputDevice (Unity)
More like this
SetLocalUserStreamingState (Unity)
SetLocalUserStreamingState (Unity)
More like this
FCavrnusVideoInputDevice (Unreal Engine)
FCavrnusVideoInputDevice (Unreal Engine)
More like this