Table of Contents

Class TokenSourceComponent

Namespace
LiveKit

MonoBehaviour wrapper that builds an ITokenSource from an inspector-assigned TokenSourceComponentConfig ScriptableObject. To skip the asset entirely, create a source at runtime via the TokenSource factory methods (Literal(string, string), DevelopmentTokenServer(string), Endpoint(string, IEnumerable<StringPair>), or Custom(CustomTokenFunction)).

public class TokenSourceComponent : MonoBehaviour
Inheritance
TokenSourceComponent
Extension Methods

Methods

Awake()

public void Awake()

FetchConnectionDetails()

Fetches connection details using only the values on the asset-backed TokenSourceComponentConfig. Equivalent to FetchConnectionDetails(null).

public TaskYieldInstruction<ConnectionDetails> FetchConnectionDetails()

Returns

TaskYieldInstruction<ConnectionDetails>

FetchConnectionDetails(TokenSourceFetchOptions)

Fetches connection details, merging per-call options over the asset-backed TokenSourceComponentConfig. For each field, a value provided on options overrides the config value (empty strings are treated as unset and fall through to the config). Ignored for fixed token sources (ITokenSourceFixed, i.e. those created via Literal(string, string) or Custom(CustomTokenFunction)).

public TaskYieldInstruction<ConnectionDetails> FetchConnectionDetails(TokenSourceFetchOptions options)

Parameters

options TokenSourceFetchOptions

Returns

TaskYieldInstruction<ConnectionDetails>