@microsoft/document-collaboration-sdk package
Interfaces
| AnnotationData |
Annotation event data for PowerPoint Live presentations. Used to synchronize annotation events across meeting participants. |
| BootDocumentParams |
Defines the input type for the |
| BootInfo |
Information returned by the Meeting and Document boot flows. |
| DocumentIdentifier |
Information to uniquely identify a document. |
| DocumentInfo |
Information about the document. |
| ErrorInfo |
Error information returned by |
| HostInfo |
Information about the external partner host. |
| JoinCollaborationParams |
Defines the input type for the |
| JoinPresentationParams |
The input type for the |
| MediaEventData |
Media event data for PowerPoint Live presentations. Used to synchronize media playback (video/audio) across meeting participants. |
| MeetingInfo |
Information about the meeting. |
| OpticalZoomData |
Optical zoom data for PowerPoint Live presentations. Used to synchronize zoom level and center point across meeting participants. |
| SessionInfo |
Information about the session. |
| SlideChangeData |
Slide change data for PowerPoint Live presentations. Used to synchronize slide navigation across meeting participants. |
| StartCollaborationParams |
Defines the input type for the |
| StartPresentationParams |
The input type for the |
| UiHostEventHandlers |
The callback for event handling. |
| UserInfo |
Information about the user. |
Enums
| Action |
Possible actions. |
| DocumentType |
Possible document types. |
| ErrorType |
Error types. |
| HostClientType |
Host client types. |
| MediaEventType |
Media event types for PowerPoint Live presentations. |
| MediaPlayerState |
Media player states for PowerPoint Live presentations. |
Functions
| accessibility |
Notify the Office for the Web experience whether to handle keyboard events related to focus change. |
| end |
Signals the end of the Office for the Web session. |
| initialize |
Initializes the document. Must be invoked first in order to prepare the experience and perform the needed licensing checks. |
| initialize |
Initializes the meeting. Must be invoked first in order to prepare the experience and perform the needed licensing checks. |
| join |
Allows a user to join an existing Collaborate session. Must have already called |
| join |
Allows an attendee to join an existing Present session. Must have already called |
| launch(Boot |
Initiates a new Office for the Web session. Must have already called |
| launch |
Initiates a new Start Page session. Must have already called |
| meeting |
Notify the Live or Collaborate experience how to handle keyboard events related to focus change. |
| start |
Initiates a Collaborate session. Must have already called |
| start |
Initiates a new Present session. Must have already called |
| stop |
Signals the end of the Collaborate session. IMPORTANT: Not implemented yet. |
| try |
Does a silent sign in attempt using MSAL. If failure or interaction required, returns false. If successful, returns true. |
Function Details
accessibilityLoopComplete(boolean)
Notify the Office for the Web experience whether to handle keyboard events related to focus change.
function accessibilityLoopComplete(navigateForward: boolean): boolean
Parameters
- navigateForward
-
boolean
Indicates the keyboard focus direction when the user switches between the Office app iframe
and the external partner host UI frame. true represents clockwise, otherwise false.
Returns
boolean
A boolean value indicating whether the loop has completed successfully.
endSession()
Note
This API is in Alpha and still in experimentation. Do not use this API in a production environment.
Signals the end of the Office for the Web session.
function endSession(): Promise<string>
Returns
Promise<string>
Pending...
initializeDocument(HostInfo)
Initializes the document. Must be invoked first in order to prepare the experience and perform the needed licensing checks.
function initializeDocument(hostInfo: HostInfo)
Parameters
- hostInfo
- HostInfo
Information about the external partner host. See definition of HostInfo for details.
initializeMeeting(HostInfo)
Initializes the meeting. Must be invoked first in order to prepare the experience and perform the needed licensing checks.
function initializeMeeting(hostInfo: HostInfo)
Parameters
- hostInfo
- HostInfo
Information about the external partner host. See definition of HostInfo for details.
joinCollaboration(JoinCollaborationParams)
Allows a user to join an existing Collaborate session. Must have already called initializeMeeting and startCollaboration.
function joinCollaboration(collabParams: JoinCollaborationParams): Promise<BootInfo>
Parameters
- collabParams
- JoinCollaborationParams
Information needed to join the Collaborate session. See definition of JoinCollaborationParams for details.
Returns
Promise<BootInfo>
Information about the session. See definition of BootInfo for details.
joinPresentation(JoinPresentationParams)
Allows an attendee to join an existing Present session. Must have already called initializeMeeting and startPresentation.
function joinPresentation(presParams: JoinPresentationParams): Promise<BootInfo>
Parameters
- presParams
- JoinPresentationParams
Information needed to join the existing Present session. See definition of JoinPresentationParams for details.
Returns
Promise<BootInfo>
Information about the session. See definition of BootInfo for details.
Remarks
Use the joinInfo property returned in the object returned by the startPresentation call that initialized the sharing session.
launch(BootDocumentParams)
Initiates a new Office for the Web session. Must have already called initializeDocument.
function launch(bootDocumentParams: BootDocumentParams): Promise<BootInfo>
Parameters
- bootDocumentParams
- BootDocumentParams
Information needed to boot the document. See definition of BootDocumentParams for details.
Returns
Promise<BootInfo>
Information about the session. See definition of BootInfo for details.
launchStartPage(BootStartPageParams)
Initiates a new Start Page session. Must have already called initializeDocument.
function launchStartPage(startPageParams: BootStartPageParams): Promise<BootInfo>
Parameters
- startPageParams
-
BootStartPageParams
Information needed to boot the start page. See definition of BootStartPageParams for details.
Returns
Promise<BootInfo>
Information about the session. See definition of BootInfo for details.
meetingAccessibilityLoopComplete(boolean)
Notify the Live or Collaborate experience how to handle keyboard events related to focus change.
function meetingAccessibilityLoopComplete(navigateForward: boolean): boolean
Parameters
- navigateForward
-
boolean
Indicates the keyboard focus direction when the user switches between the Office app iframe
and the external partner host UI frame. true represents clockwise, otherwise false.
Returns
boolean
A boolean value indicating whether the loop has completed successfully.
startCollaboration(JoinCollaborationParams)
Initiates a Collaborate session. Must have already called initializeMeeting.
function startCollaboration(collabParams: JoinCollaborationParams): Promise<BootInfo>
Parameters
- collabParams
- JoinCollaborationParams
Information needed to start the Collaborate session. See definition of JoinCollaborationParams for details.
Returns
Promise<BootInfo>
Information about the session. See definition of BootInfo for details.
startPresentation(StartPresentationParams)
Initiates a new Present session. Must have already called initializeMeeting.
function startPresentation(presParams: StartPresentationParams): Promise<BootInfo>
Parameters
- presParams
- StartPresentationParams
Returns
Promise<BootInfo>
Information about the session. See definition of BootInfo for details.
Remarks
Starts a new Present sharing session for a document and renders the presenter's view into the specified container element. If the
presentation starts successfully, the response will contain a joinInfo parameter. This must be passed to the attendee for them
to join the existing Present session. joinInfo contains secret info and must not be included in any telemetry or diagnostic logs.
stopCollaboration()
Note
This API is in Alpha and still in experimentation. Do not use this API in a production environment.
Signals the end of the Collaborate session.
IMPORTANT: Not implemented yet.
function stopCollaboration(): Promise<string>
Returns
Promise<string>
Pending...
trySilentAuth(string, string)
Note
This API is in Alpha and still in experimentation. Do not use this API in a production environment.
Does a silent sign in attempt using MSAL. If failure or interaction required, returns false. If successful, returns true.
function trySilentAuth(username: string, clientId: string): Promise<boolean>
Parameters
- username
-
string
The username (email) of the user to authenticate.
- clientId
-
string
App Id that is used to acquire the token silently.
Returns
Promise<boolean>
A boolean indicating whether the silent auth was successful.
Remarks
This function is used to check if the user is already signed in without prompting for credentials. It is useful for scenarios where you want to avoid user interaction.