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

Commit fd0ffb1

Browse files
authored
Expose public methods in VideoController (#64)
- Allow for registering with conference after the fact - Allow for creating renderer after the fact
1 parent d87566c commit fd0ffb1

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

Runtime/Components/video/VideoController.cs

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,15 @@ public class VideoController : MonoBehaviour
3636

3737
private VideoTrack _videoTrack;
3838

39-
void Awake()
39+
public void RegisterController()
4040
{
4141
if (Conference)
4242
{
4343
Conference.RegisterVideoController(this);
4444
}
4545
}
4646

47-
void Start()
47+
public void CreateRenderer()
4848
{
4949
var renderer = gameObject.GetComponent<Renderer>();
5050

@@ -54,6 +54,16 @@ void Start()
5454
}
5555
}
5656

57+
void Awake()
58+
{
59+
RegisterController();
60+
}
61+
62+
void Start()
63+
{
64+
CreateRenderer();
65+
}
66+
5767
private void Update()
5868
{
5969

@@ -76,4 +86,4 @@ internal void UpdateTrack(VideoTrack track)
7686
}
7787
}
7888
}
79-
}
89+
}

0 commit comments

Comments
 (0)