NEWDolby Interactivity APIs are now the Dolby.io Communications APIs Learn More >
X

FilePresentationService

The FilePresentationService allows presenting files during a conference. The Dolby.io Communications APIs service converts the user-provided file into multiple pages, as images, accessible through the getImage method.

The file presentation workflow:

1. The presenter calls the convertFile method to upload and convert a file.

2. The presenter calls the start method to start presenting the file.

3. The presenter and the viewers receive the FilePresentationStarted event that informs that the file presentation starts. Receiving the FilePresentationStarted event should trigger calling the getImage method to download the converted file and display the proper page of the file by retrieving the individual images.

4. The application is responsible for coordinating the page flip between the local and the presented files. The presenter calls the update method to inform the service to send the updated page number to the participants.

5. The presenter and viewers receive the FilePresentationUpdated event with the current page number. Receiving the FilePresentationUpdated event should trigger calling the getImage method to display the proper page of the file by retrieving the individual images.

6. The presenter may call the getThumbnail method to obtain thumbnail images of the file and implement a carousel control for the presenting user to flip pages locally.

7. The presenter calls the stop method to end the file presentation.

8. The presenter and the viewers receive the FilePresentationStopped event to inform about the end of the file presentation.

The conference participants can use the isOwner method to check if they are owners of the presented file. Participants can also check the status of the presented file by calling the getType method.

Available in the package com.voxeet.sdk.services.FilePresentationService.

The following diagram presents the easiest workflow for presenting files during a conference.


The file presentation diagramThe file presentation diagram

The file presentation diagram


Methods

getImage

getImage(fileId: String, pageNumber: int): String

Downloads and displays locally the presented file by retrieving URLs of the individual images.

Parameters

NameTypeDescription
fileIdStringThe ID of the presented file.
pageNumberintThe page number that corresponds to the currently presented page of the shared file.

Returns: @NonNull String - the formatted string.


getThumbnail

getThumbnail(fileId: String, pageNumber: int): String

Provides the thumbnail's URL that refers to a specific page of the presented file.

Parameters

NameTypeDescription
fileIdStringThe ID of the presented file.
pageNumberintThe page number that corresponds to the currently presented page of the shared file.

Returns: @NonNull String - the formatted string.


convertFile

convertFile(@NonNull file: File): Promise<FilePresentation>

Converts the user-provided file into multiple pages, as images, that can be shared during the file presentation. The file is uploaded as FormData.

Supported file formats are:

  • doc/docx (Microsoft Word)
  • ppt/pptx
  • pdf

After conversion, the files are broken into individual images with maximum resolution capped at 2560x1600.

Only the converted files can be shared during conferences.

Parameters

NameTypeDescription
fileFilenon null valid The file that the presenter wants to share during the conference.

Returns: @NonNull Promise<FilePresentation> - the promise to resolve.


start

start(@NonNull body: FilePresentationConverted): Promise<FilePresentation>

Starts a file presentation. The Dolby.io Communications APIs allow presenting only the converted files.

Parameters

NameTypeDescription
bodyFilePresentationConvertednon null The valid descriptor of the file.

Returns: @NonNull Promise<FilePresentation> - the promise to resolve.


start

start(@NonNull body: FilePresentationConverted, position: int): Promise<FilePresentation>

Starts a file presentation. The Dolby.io Communications APIs allow presenting only the converted files. This method allows presenting a specific page of the converted file.

Parameters

NameTypeDescription
bodyFilePresentationConvertednon null The valid descriptor of the file.
positionintThe page number that should be presented.

Returns: @NonNull Promise<FilePresentation> - the promise to resolve.


stop

stop(@NonNull fileId: String): Promise<FilePresentation>

Stops the file presentation.

Parameters

NameTypeDescription
fileIdStringnon null The ID of the presented file.

Returns: @NonNull Promise<FilePresentation> - the promise to resolve.


update

update(@NonNull fileId: String, position: int): Promise<FilePresentation>

Informs the service to send the updated page number to the conference participants.

Parameters

NameTypeDescription
fileIdStringnon null The ID of the presented file.
positionintThe page number that corresponds to the page that should be presented.

Returns: @NonNull Promise<FilePresentation> - the promise to resolve.


isOwner

isOwner(): boolean

Informs if the current participant is the owner of the presented file.

Returns: boolean


getType

getType(): String

Provides the event type related to the status of the presented file, such as started or stopped.

Returns: String

Events

FilePresentationStarted

FilePresentationStarted()

Emitted when the presenter started the file presentation.
This object can be accessed through the Websocket usage.

Available in the package com.voxeet.sdk.json.FilePresentationStarted.

conferenceId (String)

The conference ID.


userId (String)

The file owner's ID.


imageCount (int)

The number of images of the presented file.


fileId (String)

The file ID.


position (int)

The currently displayed page of the shared file.

FilePresentationUpdated

FilePresentationUpdated()

Emitted when the presenter changed the displayed page of the shared file. The event includes information about the current page number.
This object can be accessed through the Websocket usage.

Available in the package com.voxeet.sdk.json.FilePresentationUpdated.

conferenceId (String)

The conference ID.


userId (String)

The file owner's ID.


fileId (String)

The file ID.


position (int)

The currently displayed page of the shared file.

FilePresentationStopped

Emitted when the presenter ended the file presentation.
This object can be accessed through the Websocket usage.

Available in the package com.voxeet.sdk.json.FilePresentationStopped.

conferenceId (String)

The conference ID.


userId (String)

The file owner's ID.


fileId (String)

The file ID.


Did this page help you?