Skip to content

Commit

Permalink
Expose public methods in VideoController (#64)
Browse files Browse the repository at this point in the history
- Allow for registering with conference after the fact
- Allow for creating renderer after the fact
  • Loading branch information
djova-dolby committed Oct 11, 2023
1 parent d87566c commit fd0ffb1
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions Runtime/Components/video/VideoController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@ public class VideoController : MonoBehaviour

private VideoTrack _videoTrack;

void Awake()
public void RegisterController()
{
if (Conference)
{
Conference.RegisterVideoController(this);
}
}

void Start()
public void CreateRenderer()
{
var renderer = gameObject.GetComponent<Renderer>();

Expand All @@ -54,6 +54,16 @@ void Start()
}
}

void Awake()
{
RegisterController();
}

void Start()
{
CreateRenderer();
}

private void Update()
{

Expand All @@ -76,4 +86,4 @@ internal void UpdateTrack(VideoTrack track)
}
}
}
}
}

0 comments on commit fd0ffb1

Please sign in to comment.