VideoPresentationService
The VideoPresentationService allows sharing videos during a conference. To present a video, the conference participant needs to provide the URL that defines the video location. We recommend sharing files in the MPEG-4 Part 14 or MP4 video formats.
The video presentation workflow:
1. The presenter calls the start method to start the video presentation. This method automatically starts playing the shared video file.
2. All participants receive the started event that includes in the VTVideoPresentation parameter the URL property specifying the video file location.
3. The presenter can call the pause method to pause the shared video. In such a situation, all conference participants receive the paused event.
4. The presenter can call the play method to resume the paused video. In such a situation, all conference participants receive the played event.
5. The presenter can call the seek method to navigate to a specific section of the shared video. After calling the seek method, all conference participants receive the sought event and watch the video from the specified timestamp.
6. The presenter calls the stop method to stop the video presentation. In such a situation, all conference participants receive the stopped event.
Events
started
▸ started(videoPresentation
: VTVideoPresentation)
Emitted when a video presentation is started.
Parameters:
Name | Type | Description |
---|---|---|
videoPresentation | VTVideoPresentation | The object containing properties specific to the event. |
stopped
▸ stopped(videoPresentation
: VTVideoPresentation)
Emitted when a video presentation is stopped.
Parameters:
Name | Type | Description |
---|---|---|
videoPresentation | VTVideoPresentation | The object containing properties specific to the event. |
played
▸ played(videoPresentation
: VTVideoPresentation)
Emitted when a video presentation is resumed.
Parameters:
Name | Type | Description |
---|---|---|
videoPresentation | VTVideoPresentation | The object containing properties specific to the event. |
paused
▸ paused(videoPresentation
: VTVideoPresentation)
Emitted when a video presentation is paused.
Parameters:
Name | Type | Description |
---|---|---|
videoPresentation | VTVideoPresentation | The object containing properties specific to the event. |
sought
▸ sought(videoPresentation
: VTVideoPresentation)
Emitted when a video presentation is sought.
Parameters:
Name | Type | Description |
---|---|---|
videoPresentation | VTVideoPresentation | The object containing properties specific to the event. |
Accessors
current
▸ current: VTVideoPresentation?
Returns information about the current video presentation. Use this accessor if you wish to receive information that is available in the VTVideoPresentation object, such as information about the participant who shares the video, the current timestamp, or the URL of the presented video file.
Returns: VTVideoPresentation?
state
▸ state: VTVideoPresentationState
Provides the current state of the video presentation.
Returns: VTVideoPresentationState
delegate
▸ delegate: VTVideoPresentationDelegate
Delegate, a means of communication between objects in the video presentation service.
Returns: VTVideoPresentationDelegate
Methods
start
▸ start(url
: URL, completion
: ((_ error: NSError?) -> Void)?)
Enables the video presentation and starts playing the shared video file.
Parameters:
Name | Type | Default | Description |
---|---|---|---|
url | URL | - | The URL that specifies the video file location. |
completion | ((_ error: NSError?) -> Void)? | nil | The block to execute when the query completes. |
stop
▸ stop(completion
: ((_ error: NSError?) -> Void)?)
Stops the video presentation.
Parameters:
Name | Type | Default | Description |
---|---|---|---|
completion | ((_ error: NSError?) -> Void)? | nil | The block to execute when the query completes. |
play
▸ play(completion
: ((_ error: NSError?) -> Void)?)
Resumes the paused video presentation.
Parameters:
Name | Type | Default | Description |
---|---|---|---|
completion | ((_ error: NSError?) -> Void)? | nil | The block to execute when the query completes. |
pause
▸ pause(timestamp
: Int, completion
: ((_ error: NSError?) -> Void)?)
Pauses the video presentation.
Parameters:
Name | Type | Default | Description |
---|---|---|---|
timestamp | Int | - | The timestamp that informs when the video needs to be paused, in milliseconds. |
completion | ((_ error: NSError?) -> Void)? | nil | The block to execute when the query completes. |
seek
▸ seek(timestamp
: Int, completion
: ((_ error: NSError?) -> Void)?)
Allows the presenter to navigate to the specific section of the shared video.
Parameters:
Name | Type | Default | Description |
---|---|---|---|
timestamp | Int | - | The timestamp the presenter wants to start playing the video from, in milliseconds. |
completion | ((_ error: NSError?) -> Void)? | nil | The block to execute when the query completes. |
Updated over 1 year ago