Beispiel #1
0
        /// <summary>
        /// Send telemetry to report the beginning of a transaction, including any state properties which have been set.
        /// </summary>
        /// <param name="timeout">How long to keep the transaction 'open' without new activity</param>
        /// <param name="mode">The type of activity which will keep the transaction open</param>
        public void Send(Vector3 position)
        {
            float[] pos = new float[3] {
                0, 0, 0
            };

            pos[0] = position.x;
            pos[1] = position.y;
            pos[2] = position.z;

            Instrumentation.SendCustomEvent(_category, _properties, pos);
        }
        private void CognitiveVR_Manager_TickEvent()
        {
            if (IsVideo) { return; }
            if (WasPlaying)
            {
                if (!VideoPlayer.isPlaying)
                {
                    if (VideoPlayer.frame == 0)
                    {
                        //stopped event
                        Instrumentation.SendCustomEvent("cvr.media.stop", new List<KeyValuePair<string, object>>() {new KeyValuePair<string, object>( "videoTime", lastFrame ), new KeyValuePair<string, object>("mediaId", MediaSource ) },transform.position);
                    }
                    else
                    {
                        //paused event
                        Instrumentation.SendCustomEvent("cvr.media.pause", new List<KeyValuePair<string, object>>() { new KeyValuePair<string, object>("videoTime", VideoPlayer.frame ), new KeyValuePair<string, object>("mediaId", MediaSource ) }, transform.position);
                    }
                    WasPlaying = false;
                }
                lastFrame = VideoPlayer.frame;
            }
            else
            {
                if (VideoPlayer.isPlaying)
                {
                    //play event
                    Instrumentation.SendCustomEvent("cvr.media.play", new List<KeyValuePair<string, object>>() { new KeyValuePair<string, object>("videoTime", VideoPlayer.frame ), new KeyValuePair<string, object>("mediaId", MediaSource ) }, transform.position);
                    WasPlaying = true;
                }
            }
            //register to prepare_complete to see if video has finished buffering
            //how to tell if video starts buffering again?

            if (wasPrepared)
            {
                if (!VideoPlayer.isPrepared) //started buffering. possibly stopped
                {
                    wasPrepared = false;
                    Instrumentation.SendCustomEvent("cvr.media.videoBuffer", new List<KeyValuePair<string, object>>() { new KeyValuePair<string, object>("videoTime", VideoPlayer.frame ), new KeyValuePair<string, object>("mediaId", MediaSource ) }, transform.position);
                }
            }
            else
            {
                if (VideoPlayer.isPrepared) //finishing buffering
                {
                    wasPrepared = true;
                }
            }
        }
Beispiel #3
0
        /// <summary>
        /// Send telemetry to report the beginning of a transaction, including any state properties which have been set.
        /// </summary>
        /// <param name="timeout">How long to keep the transaction 'open' without new activity</param>
        /// <param name="mode">The type of activity which will keep the transaction open</param>
        public void Send()
        {
            if (HMD == null)
            {
                return;
            }

            float[] pos = new float[3] {
                0, 0, 0
            };

            pos[0] = HMD.position.x;
            pos[1] = HMD.position.y;
            pos[2] = HMD.position.z;

            Instrumentation.SendCustomEvent(_category, _properties, pos);
        }
Beispiel #4
0
        /// <summary>
        /// Send telemetry to report the beginning of a transaction, including any state properties which have been set.
        /// </summary>
        /// <param name="timeout">How long to keep the transaction 'open' without new activity</param>
        /// <param name="mode">The type of activity which will keep the transaction open</param>
        public void Send(Vector3 position)
        {
            float[] pos = new float[3] {
                0, 0, 0
            };

            pos[0] = position.x;
            pos[1] = position.y;
            pos[2] = position.z;

            float duration = Time.realtimeSinceStartup - startTime;

            if (duration > 0.011f)
            {
                SetProperty("duration", duration);
            }

            Instrumentation.SendCustomEvent(category, _properties, pos, dynamicObjectId);
        }
Beispiel #5
0
 public void beginAndEnd(Vector3 position, string result = TXN_SUCCESS)
 {
     Instrumentation.SendCustomEvent(_category, _properties, position);
 }
Beispiel #6
0
 public void begin(double timeout = 0, TimeoutMode mode = TimeoutMode.Transaction)
 {
     Instrumentation.SendCustomEvent(_category, _properties, HMD.position);
 }
Beispiel #7
0
 public void end(string result = TXN_SUCCESS)
 {
     Instrumentation.SendCustomEvent(_category, _properties, HMD.position);
 }
Beispiel #8
0
 public void update(int progress)
 {
     Instrumentation.SendCustomEvent(_category, _properties, HMD.position);
 }