FilePresentationService class Services

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

The file presentation workflow:

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

  2. The presenter receives the FilePresentationServiceEventNames.fileConverted event when the file conversion is finished.

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

  4. The presenter and the viewers receive the FilePresentationServiceEventNames.filePresentationStarted event that informs that the file presentation is started.

  5. The presenter calls the getImage method to get the URL of the converted file and display the proper page of the file by retrieving the individual images.

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

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

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

  9. The presenter and the viewers receive the FilePresentationServiceEventNames.filePresentationStopped event that informs about the end of the file presentation.

Constructors

FilePresentationService()

Properties

hashCode int
The hash code for this object.
read-onlyinherited
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited

Methods

convert(File file) Future<FileConverted>
Converts a provided file into multiple images. The file is uploaded as FormData.
getCurrent() Future<FilePresentation>
Returns information about the current state of the file presentation.
getImage(int page) Future<String>
Provides the image URL that refers to a specific page of the presented file. The page parameter refers to the number of the presented page. Files that do not consist of pages, for example, jpg images, require setting the value of this parameter to 0.
getThumbnail(int page) Future<String>
Provides the URL of a thumbnail that refers to a specific page of the presented file. The page parameter refers to the number of the presented page. Files that do not consist of pages, for example, jpg images, require setting the value of this parameter to 0.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
onFileConverted() Stream<Event<FilePresentationServiceEventNames, FileConverted>>
Returns a Stream of the FilePresentationServiceEventNames.fileConverted events. By subscribing to the returned stream you will be notified about finished file conversions.
onFilePresentationChange() Stream<Event<FilePresentationServiceEventNames, FilePresentation>>
Returns a Stream of the FilePresentationServiceEventNames.filePresentationStarted, FilePresentationServiceEventNames.filePresentationStopped, and FilePresentationServiceEventNames.filePresentationUpdated events. By subscribing to the returned stream you will be notified about started, modified, and stopped file presentations.
setPage(num page) Future<void>
Informs the service to send the updated page number to conference participants. The page parameter refers to a required page number.
start(FileConverted fileConverted) Future<void>
Starts presenting a converted file. The fileConverted parameter refers to the file to be presented.
stop() Future<void>
Stops a file presentation.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited