Add reload speech command
This commit is contained in:
parent
b4c406f0ed
commit
bccf6777ad
|
@ -23,3 +23,10 @@ MonoBehaviour:
|
||||||
id: 0
|
id: 0
|
||||||
description: None
|
description: None
|
||||||
axisConstraint: 0
|
axisConstraint: 0
|
||||||
|
- localizationKey:
|
||||||
|
keyword: Reload
|
||||||
|
keyCode: 0
|
||||||
|
action:
|
||||||
|
id: 0
|
||||||
|
description: None
|
||||||
|
axisConstraint: 0
|
||||||
|
|
|
@ -4,14 +4,12 @@ using UnityEngine.Networking;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
// using TMPro;
|
|
||||||
using Microsoft.MixedReality.WebView;
|
using Microsoft.MixedReality.WebView;
|
||||||
|
|
||||||
public class EndpointLoader : MonoBehaviour
|
public class EndpointLoader : MonoBehaviour
|
||||||
{
|
{
|
||||||
public WebView webView1;
|
public WebView webView1;
|
||||||
public WebView webView2;
|
public WebView webView2;
|
||||||
// public Button ReloadButton;
|
|
||||||
|
|
||||||
private const string apiUrl = "http://windows.local:5000/api/endpoints";
|
private const string apiUrl = "http://windows.local:5000/api/endpoints";
|
||||||
private const string defaultEndpoint1 = "http://windows.local:8100/mystream/";
|
private const string defaultEndpoint1 = "http://windows.local:8100/mystream/";
|
||||||
|
@ -19,7 +17,6 @@ public class EndpointLoader : MonoBehaviour
|
||||||
|
|
||||||
private void Start()
|
private void Start()
|
||||||
{
|
{
|
||||||
// ReloadButton.onClick.AddListener(() => StartCoroutine(LoadEndpoints()));
|
|
||||||
StartCoroutine(LoadEndpoints());
|
StartCoroutine(LoadEndpoints());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -48,7 +45,6 @@ public class EndpointLoader : MonoBehaviour
|
||||||
{
|
{
|
||||||
Debug.LogError("Parsed endpoints are empty. Using default endpoints");
|
Debug.LogError("Parsed endpoints are empty. Using default endpoints");
|
||||||
UseDefaultEndpoints();
|
UseDefaultEndpoints();
|
||||||
// yield return null;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -57,6 +53,11 @@ public class EndpointLoader : MonoBehaviour
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void ReloadEndpoints()
|
||||||
|
{
|
||||||
|
StartCoroutine(LoadEndpoints());
|
||||||
|
}
|
||||||
|
|
||||||
private void UseDefaultEndpoints()
|
private void UseDefaultEndpoints()
|
||||||
{
|
{
|
||||||
webView1.Load(defaultEndpoint1);
|
webView1.Load(defaultEndpoint1);
|
||||||
|
|
Loading…
Reference in New Issue