Skip to content
This repository was archived by the owner on Aug 30, 2024. It is now read-only.

Commit 5c425d3

Browse files
committed
Added App Key/Secret component
1 parent 9bb7eae commit 5c425d3

File tree

4 files changed

+39
-1
lines changed

4 files changed

+39
-1
lines changed

Runtime/Components/ConferenceController.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,10 @@ public void StartVideo()
127127
if (VideoDevice)
128128
{
129129
var dropdown = VideoDevice.GetComponent<VideoDeviceDropdown>();
130-
device = dropdown.CurrentDevice;
130+
if (dropdown)
131+
{
132+
device = dropdown.CurrentDevice;
133+
}
131134
}
132135

133136
DolbyIOManager.QueueOnMainThread(() =>
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
using UnityEngine;
2+
using System.Collections;
3+
4+
namespace DolbyIO.Comms.Unity
5+
{
6+
[AddComponentMenu("Dolby.io Comms/Credentials/App Key", 151)]
7+
public class AppKeyCredentials : Credentials
8+
{
9+
[Tooltip("Dolby.io App Key.")]
10+
public string AppKey;
11+
12+
[Tooltip("Dolby.io App Secret.")]
13+
public string AppSecret;
14+
15+
public override string GetToken()
16+
{
17+
return DolbyIOManager.GetToken(AppKey, AppSecret).Result;
18+
}
19+
}
20+
}
21+
22+
23+

Runtime/Components/credentials/AppKeyCredentials.cs.meta

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Runtime/Components/devices/VideoDeviceDropdown.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ public class VideoDeviceDropdown : MonoBehaviour
1616
private TMP_Dropdown _dropdown;
1717

1818
private List<VideoDevice> _currentDevices;
19+
1920
public VideoDevice CurrentDevice;
2021

2122
void Awake()

0 commit comments

Comments
 (0)