File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -150,7 +150,7 @@ export abstract class TokenSourceRefreshable extends TokenSourceConfigurable {
150
150
this . cachedResponse = null ;
151
151
}
152
152
153
- async generate ( ) : Promise < TokenSourceResponseObject > {
153
+ async getToken ( ) : Promise < TokenSourceResponseObject > {
154
154
const unlock = await this . fetchMutex . lock ( ) ;
155
155
try {
156
156
if ( this . cachedResponse && ! isResponseExpired ( this . cachedResponse ) ) {
@@ -181,7 +181,7 @@ export class TokenSourceLiteral extends TokenSourceFixed {
181
181
this . literalOrFn = literalOrFn ;
182
182
}
183
183
184
- async generate ( ) : Promise < TokenSourceResponseObject > {
184
+ async getToken ( ) : Promise < TokenSourceResponseObject > {
185
185
if ( typeof this . literalOrFn === 'function' ) {
186
186
return this . literalOrFn ( ) ;
187
187
} else {
Original file line number Diff line number Diff line change @@ -346,7 +346,7 @@ export function useSession(
346
346
await Promise . all ( [
347
347
// FIXME: swap the below line in once the new `livekit-client` changes are published
348
348
// room.connect(options.credentials),
349
- tokenSource . generate ( ) . then ( ( { serverUrl, participantToken } ) => (
349
+ tokenSource . getToken ( ) . then ( ( { serverUrl, participantToken } ) => (
350
350
room . connect ( serverUrl , participantToken )
351
351
) ) ,
352
352
@@ -367,7 +367,7 @@ export function useSession(
367
367
} , [ room ] ) ;
368
368
369
369
const prepareConnection = useCallback ( async ( ) => {
370
- const credentials = await tokenSource . generate ( ) ;
370
+ const credentials = await tokenSource . getToken ( ) ;
371
371
await room . prepareConnection ( credentials . serverUrl , credentials . participantToken ) ;
372
372
} , [ tokenSource , room ] ) ;
373
373
useEffect ( ( ) => {
You can’t perform that action at this time.
0 commit comments