FilePresentationService
The FilePresentationService allows an application to present a file during the conference. The Voxeet service converts the provided file into multiple pages (images) accessible through the getImage method.
Typical application workflow:
1. The application calls the convertFile method to upload and convert a file.
2. The application can display the converted file locally by retrieving individual images through the getImage method.
3. The application then starts presenting the file by calling the start method.
4. The application is responsible for coordinating the page flip between local and presented files. By calling the update method the application informs the service to send the updated page number to the participants.
5. The application calls the stop method to end the file presentation.
6. The application may choose to call the getThumbnail method to obtain thumbnail images of the file. This method implements a carousel control for the presenting participant to enable flipping pages locally. This way of flipping pages can be also used for standard size images by using the getImage method.
Additionally, the application can use the isOwner method to check if the current participant is the owner of the presented file. To check the status of the presented file, the application may call the getType method.
The application receives information about file presentation status through the FilePresentationStarted, FilePresentationUpdated, and FilePresentationStopped events.
Available in the package com.voxeet.sdk.services.FilePresentationService.
Methods
getImage
▸ getImage(fileId
: String, pageNumber
: int): String
Displays the converted file locally by retrieving URLs of individual images.
Parameters
Name | Type | Description |
---|---|---|
fileId | String | the ID of the remote file |
pageNumber | int | the requested page number |
Returns: @NonNull String - the formatted string.
getThumbnail
▸ getThumbnail(fileId
: String, pageNumber
: int): String
Obtains URLs of thumbnail images of the file to implement a carousel control for the presenting participant to flip pages locally.
Parameters
Name | Type | Description |
---|---|---|
fileId | String | the ID of the remote file |
pageNumber | int | the requested page number |
Returns: @NonNull String - the formatted string.
convertFile
▸ convertFile(@NonNull file
: File): Promise<FilePresentation>
Starts uploading and converting the local file and waits for its management on the server side.
Parameters
Name | Type | Description |
---|---|---|
file | File | non null valid file to uploa |
Returns: @NonNull Promise<FilePresentation> - the promise to resolve.
start
▸ start(@NonNull body
: FilePresentationConverted): Promise<FilePresentation>
Starts presenting the converted file.
Parameters
Name | Type | Description |
---|---|---|
body | FilePresentationConverted | non null valid descriptor of the file |
Returns: @NonNull Promise<FilePresentation> - the promise to resolve.
start
▸ start(@NonNull body
: FilePresentationConverted, position
: int): Promise<FilePresentation>
Starts presenting the specific page of the converted file.
Parameters
Name | Type | Description |
---|---|---|
body | FilePresentationConverted | non null valid descriptor of the file |
position | int | the starting position |
Returns: @NonNull Promise<FilePresentation> - the promise to resolve.
stop
▸ stop(@NonNull fileId
: String): Promise<FilePresentation>
Stops presenting the file.
Parameters
Name | Type | Description |
---|---|---|
fileId | String | non null ID of the file |
Returns: @NonNull Promise<FilePresentation> - the promise to resolve.
update
▸ update(@NonNull fileId
: String, position
: int): Promise<FilePresentation>
Changes the position (page of the presented file) to the specific one in the current presentation.
Parameters
Name | Type | Description |
---|---|---|
fileId | String | non null ID of the file |
position | int | the new position (page of the presented file) |
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 one of the conference participants has started a file presentation. This object can be accessed through the Websocket usage.
Available in the package com.voxeet.sdk.json.FilePresentationStarted.
conferenceId (String)
The ID of the conference.
userId (String)
The ID of the conference participant that shares a file.
imageCount (int)
The number of images of the presented file.
fileId (String)
The ID of the presented file.
position (int)
The currently displayed file.
FilePresentationUpdated
▸ FilePresentationUpdated()
Emitted when the participant changes the position (page) of the presented file. This object can be accessed through the Websocket usage.
Available in the package com.voxeet.sdk.json.FilePresentationUpdated.
conferenceId (String)
The ID of the conference.
userId (String)
The ID of the conference participant that shares a file.
fileId (String)
The ID of the presented file.
position (int)
The currently displayed file.
FilePresentationStopped
Emitted when the participant ends the file presentation. This object can be accessed through the Websocket usage.
Available in the package com.voxeet.sdk.json.FilePresentationStopped.
conferenceId (String)
The ID of the conference.
userId (String)
The ID of the conference participant that shares a file.
fileId (String)
The ID of the presented file.