AzureLiveShareHost class
Note
This API is in Alpha and still in experimentation. Do not use this API in a production environment.
This host enables using Live Share through your own AzureClient
implementation.
This is not intended to be used with LiveShareClient
.
We provide no SLA guarantees on this implementation while it is in alpha.
Remarks
To use this API, first pass your ContainerSchema
through the getLiveContainerSchema
function.
This should be done before calling .getContainer()
or createContainer()
.
Then, call setAudience()
with the IAzureAudience
object (in AzureContainerServices
) returned by the AzureClient
.
Methods
create(boolean) | Static constructor for host enables using Live Share through your own |
get |
Gets the corresponding See ILiveShareHost.getClientInfo |
get |
See ILiveShareHost.getClientRoles |
get |
Will throw not implemented exception. Extend this class and override this function when using with See ILiveShareHost.getFluidContainerId |
get |
Will throw not implemented exception. Extend this class and override this function when using with See ILiveShareHost.getFluidTenantInfo |
get |
Will throw not implemented exception. Extend this class and override this function when using with See ILiveShareHost.getFluidToken |
get |
Uses local timestamp by default. See ILiveShareHost.getNtpTime |
register |
Register doesn't do anything special here, since we are using AzureAudience in this host See ILiveShareHost.registerClientId |
set |
This function should be called immediately after getting audience from |
set |
Will throw not implemented exception. Extend this class and override this function when using with See ILiveShareHost.setFluidContainerId |
Method Details
create(boolean)
Note
This API is in Beta and provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
Static constructor for host enables using Live Share through your own AzureClient
implementation.
static function create(shouldWarn?: boolean): AzureLiveShareHost
Parameters
- shouldWarn
-
boolean
Returns
new AzureLiveShareHost
instance
getClientInfo(string)
Gets the corresponding AzureAudience
IClientInfo
for a given clientId
See ILiveShareHost.getClientInfo
function getClientInfo(clientId: string): Promise<undefined | IClientInfo>
Parameters
- clientId
-
string
Returns
Promise<undefined | IClientInfo>
getClientRoles(string)
Warning
This API is now deprecated.
See ILiveShareHost.getClientRoles
function getClientRoles(clientId: string): Promise<undefined | UserMeetingRole[]>
Parameters
- clientId
-
string
Returns
Promise<undefined | UserMeetingRole[]>
getFluidContainerId()
Will throw not implemented exception. Extend this class and override this function when using with LiveShareClient
.
See ILiveShareHost.getFluidContainerId
function getFluidContainerId(): Promise<IFluidContainerInfo>
Returns
Promise<IFluidContainerInfo>
getFluidTenantInfo()
Will throw not implemented exception. Extend this class and override this function when using with LiveShareClient
.
See ILiveShareHost.getFluidTenantInfo
function getFluidTenantInfo(): Promise<IFluidTenantInfo>
Returns
Promise<IFluidTenantInfo>
getFluidToken(string)
Will throw not implemented exception. Extend this class and override this function when using with LiveShareClient
.
See ILiveShareHost.getFluidToken
function getFluidToken(containerId?: string): Promise<string>
Parameters
- containerId
-
string
Returns
Promise<string>
getNtpTime()
Uses local timestamp by default.
See ILiveShareHost.getNtpTime
function getNtpTime(): Promise<INtpTimeInfo>
Returns
Promise<INtpTimeInfo>
Remarks
To remove warning, either set shouldWarn in .create()
, or override this value with a timestamp from a server.
registerClientId(string)
Register doesn't do anything special here, since we are using AzureAudience in this host
See ILiveShareHost.registerClientId
function registerClientId(clientId: string): Promise<UserMeetingRole[]>
Parameters
- clientId
-
string
Returns
Promise<UserMeetingRole[]>
setAudience(IAzureAudience)
This function should be called immediately after getting audience from AzureClient
.
function setAudience(audience: IAzureAudience)
Parameters
- audience
-
IAzureAudience
Azure Audience
setFluidContainerId(string)
Will throw not implemented exception. Extend this class and override this function when using with LiveShareClient
.
See ILiveShareHost.setFluidContainerId
function setFluidContainerId(containerId: string): Promise<IFluidContainerInfo>
Parameters
- containerId
-
string
Returns
Promise<IFluidContainerInfo>