/// <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; } } }
/// <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); }
/// <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); }
public void beginAndEnd(Vector3 position, string result = TXN_SUCCESS) { Instrumentation.SendCustomEvent(_category, _properties, position); }
public void begin(double timeout = 0, TimeoutMode mode = TimeoutMode.Transaction) { Instrumentation.SendCustomEvent(_category, _properties, HMD.position); }
public void end(string result = TXN_SUCCESS) { Instrumentation.SendCustomEvent(_category, _properties, HMD.position); }
public void update(int progress) { Instrumentation.SendCustomEvent(_category, _properties, HMD.position); }