FaceCamStopSession() public static method

public static FaceCamStopSession ( ) : void
return void
コード例 #1
0
    public void FaceCamToggle()
    {
        DebugLog("Face Cam Toggle!");

        if (Everyplay.FaceCamIsRecordingPermissionGranted())
        {
            isFaceCameOn = !isFaceCameOn;

            if (isFaceCameOn)
            {
                if (!Everyplay.FaceCamIsSessionRunning())
                {
                    Everyplay.FaceCamStartSession();
                    Everyplay.FaceCamSetAudioOnly(true);                      //added
                }
            }
            else
            {
                if (Everyplay.FaceCamIsSessionRunning())
                {
                    Everyplay.FaceCamStopSession();
                }
            }
        }
        else         //For the first time in the game we want to turn on the camera
        {
            Everyplay.FaceCamRequestRecordingPermission();
            startFaceCamWhenPermissionGranted = true;
        }
    }
コード例 #2
0
    private void FaceCamToggle()
    {
        if (faceCamPermissionGranted)
        {
            faceCamToggleButton.toggled = !faceCamToggleButton.toggled;

            if (faceCamToggleButton.toggled)
            {
                if (!Everyplay.FaceCamIsSessionRunning())
                {
                    Everyplay.FaceCamStartSession();
                }
            }
            else
            {
                if (Everyplay.FaceCamIsSessionRunning())
                {
                    Everyplay.FaceCamStopSession();
                }
            }
        }
        else
        {
            Everyplay.FaceCamRequestRecordingPermission();
            startFaceCamWhenPermissionGranted = true;
        }
    }
コード例 #3
0
 public void facecamStop()
 {
     #if BROADCAST_USE_EVERYPLAY
     Everyplay.FaceCamStopSession();
     #else
     #endif
 }
コード例 #4
0
 void OnGUI()
 {
     if (recordingPermissionGranted)
     {
         if (GUI.Button(new Rect(Screen.width - 10 - 158, 10, 158, 48), Everyplay.FaceCamIsSessionRunning() ? "Stop FaceCam session" : "Start FaceCam session"))
         {
             if (Everyplay.FaceCamIsSessionRunning())
             {
                 Everyplay.FaceCamStopSession();
             }
             else
             {
                 Everyplay.FaceCamStartSession();
             }
             #if UNITY_EDITOR
             Debug.Log("Everyplay FaceCam is not available in the Unity editor. Please compile and run on a device.");
             #endif
         }
     }
     else
     {
         if (GUI.Button(new Rect(Screen.width - 10 - 158, 10, 158, 48), "Request REC permission"))
         {
             Everyplay.FaceCamRequestRecordingPermission();
             #if UNITY_EDITOR
             Debug.Log("Everyplay FaceCam is not available in the Unity editor. Please compile and run on a device.");
             #endif
         }
     }
 }
コード例 #5
0
    public static void SetMicrophoneEnable(bool enabled)
    {
        MicrophoneEnabled = enabled;

        if (enabled)
        {
            Everyplay.FaceCamSetAudioOnly(true);
            Everyplay.FaceCamRequestRecordingPermission();
        }
        else
        {
            Everyplay.FaceCamStopSession();
        }
    }
コード例 #6
0
 public void FaceCamStopSession()
 {
     Everyplay.FaceCamStopSession();
 }
コード例 #7
0
 public static void StopRecord()
 {
     Everyplay.StopRecording();
     Everyplay.FaceCamStopSession();
 }