Example #1
0
        void Update()
        {
            if (MixCast.IsRecordingOrStreaming() || context == null || context.Data == null || context.Data.unplugged || SelectableUtility.isInputFieldFocused)
            {
                return;
            }

            bool goUp = Input.GetKeyDown(goUpKey);

            if (goUpModifier != KeyCode.None)
            {
                goUp &= Input.GetKey(goUpModifier);
            }

            bool goDown = Input.GetKeyDown(goDownKey);

            if (goDownModifier != KeyCode.None)
            {
                goDown &= Input.GetKey(goDownModifier);
            }

            if (goUp && !Input.GetKey(excludedKey1) && !Input.GetKey(excludedKey2))
            {
                UpdateValue(step);
                Debug.Log("Increase buffer timing to " + context.Data.bufferTime);
            }
            else if (goDown && !Input.GetKey(excludedKey1) && !Input.GetKey(excludedKey2))
            {
                UpdateValue(-step);
                Debug.Log("Decrease buffer timing " + context.Data.bufferTime);
            }
        }
Example #2
0
        void DrawPluginGroup()
        {
            EditorGUILayout.BeginVertical(groupBoxStyle);

            EditorGUILayout.BeginHorizontal(GUILayout.Height(28));
            EditorGUILayout.LabelField("MixCast Plugin (" + MixCast.VERSION_STRING + ")", subHeaderStyle, GUILayout.Height(28));
            EditorGUILayout.EndHorizontal();

            EditorGUI.indentLevel++;

            //EditorGUILayout.LabelField("Version:", MixCast.VERSION_STRING, subHeaderStyle, GUILayout.Height(20));
            if (GUILayout.Button("Go To Website"))
            {
                MixCast.GoToWebsite();
            }
            if (GUILayout.Button("Get Support"))
            {
                Application.OpenURL(SUPPORT_URL);
            }
            if (GUILayout.Button("Check for Updates"))
            {
                UpdateChecker.RunCheck();
            }

            EditorGUI.indentLevel--;
            EditorGUILayout.EndVertical();
        }
Example #3
0
        static IEnumerator CheckForUpdates(bool headless)
        {
            WWW www = new WWW(VERSION_URL);

            while (!www.isDone)
            {
                yield return(null);
            }

            if (!string.IsNullOrEmpty(www.error) || string.IsNullOrEmpty(www.text))
            {
                if (!headless)
                {
                    EditorUtility.DisplayDialog("Oops!", "Couldn't contact the update server, try again later", "OK");
                }
                yield break;
            }

            if (MixCast.IsVersionBLaterThanVersionA(MixCast.VERSION_STRING, www.text))
            {
                int result = EditorUtility.DisplayDialogComplex("Update Available", string.Format("MixCast has a new version available ({0})!", www.text), "Get It Now", "Get It Later", "Ignore MixCast updates");
                switch (result)
                {
                case 0:
                    Application.OpenURL(PACKAGE_URL);
                    NextCheckTime = DateTime.UtcNow + new TimeSpan(0, UNCHANGED_COOLDOWN_MINUTES, 0);
                    yield break;

                case 1:
                    NextCheckTime = DateTime.UtcNow + new TimeSpan(LATER_COOLDOWN_HOURS, 0, 0);
                    yield break;

                case 2:
                    NextCheckTime = DateTime.UtcNow + new TimeSpan(999, 0, 0);
                    yield break;
                }
            }
            else if (MixCast.IsVersionBLaterThanVersionA(www.text, MixCast.VERSION_STRING))
            {
                NextCheckTime = DateTime.UtcNow + new TimeSpan(0, UNCHANGED_COOLDOWN_MINUTES, 0);

                if (!headless)
                {
                    EditorUtility.DisplayDialog("Wow!", string.Format("Your MixCast version is ahead of the public release ({0})!", www.text), "OK");
                }
            }
            else
            {
                NextCheckTime = DateTime.UtcNow + new TimeSpan(0, UNCHANGED_COOLDOWN_MINUTES, 0);

                if (!headless)
                {
                    EditorUtility.DisplayDialog("Up To Date", string.Format("MixCast is up to date at version {0}!", MixCast.VERSION_STRING), "OK");
                }
            }
        }
Example #4
0
        void HandleToggleSet(bool val)
        {
            MixCast.SetActive(val);

            //Open MixCast webpage if the user doesn't have MixCast calibrated
            if (val && MixCast.Settings.cameras.Count == 0)
            {
                Application.OpenURL(SETUP_URL);
            }
        }
        protected override void OnDisable()
        {
            isRecordingOrStreaming = MixCast.IsRecordingOrStreaming(checkRecording, checkStreaming);
            if (isRecordingOrStreaming == false)
            {
                AudioAsyncFeed.Instance(context.Data.id).PlayWithSettings(context.Data);
            }
            //else do nothing

            base.OnDisable();
        }
        void HandleToggleSet(bool val)
        {
            MixCast.SetActive(val);

            //Open MixCast webpage if the user doesn't have MixCast calibrated
            if (val && MixCast.Settings.cameras.Count == 0)
            {
                Application.OpenURL(SETUP_URL);
            }

            bool triggerDebug = val && debugKeys.Exists(k => Input.GetKey(k));

            debugObjects.ForEach(g => g.SetActive(triggerDebug));
        }
        void RefreshStatus()
        {
            bool isDataConfigured = MixCast.Settings.cameras.Count > 0;
            bool isServiceRunning = MixCastRegistry.IsServiceRunning();

            bool shouldMixCastBeActive = isDataConfigured && isServiceRunning;

            if (shouldMixCastBeActive && !MixCast.Active)
            {
                MixCast.SetActive(true);
            }
            else if (!shouldMixCastBeActive && MixCast.Active)
            {
                MixCast.SetActive(false);
            }
        }
 protected override void OnEnable()
 {
     base.OnEnable();
     isRecordingOrStreaming = MixCast.IsRecordingOrStreaming(checkRecording, checkStreaming);
 }