import NativeEvents from '../../utils/NativeEvents'; import type { UnsubscribeFunction } from '../conference/models'; import type { VideoPresentationEventType } from './events'; import { VideoPresentationEventNames } from './events'; import type { VideoPresentation, VideoPresentationState } from './models'; /** * The VideoPresentationService allows sharing videos during a conference. To present a video, a conference participant needs to provide a URL that defines the video location. We recommend sharing files in the MPEG-4 Part 14 or MP4 video format. * * **The video presentation workflow:** * * **1.** The presenter calls the [start](#start) method to start a video presentation. This method automatically starts playing the shared video file. * * **2.** All participants receive [information](doc:rn-client-sdk-models-videopresentationeventtype) about the converted file via the [onVideoPresentationChange](#onvideopresentationchange) listener. * * **3.** The presenter can call the [pause](#pause) method to pause the shared video. In such a situation, all conference participants receive [information](doc:rn-client-sdk-models-videopresentationeventtype) about paused file via the [onVideoPresentationChange](#onvideopresentationchange) listener. * * **4.** The presenter can call the [play](#play) method to resume the paused video. In such a situation, all conference participants receive [information](doc:rn-client-sdk-models-videopresentationeventtype) about the resumed file via the [onVideoPresentationChange](#onvideopresentationchange) listener. * * **5.** The presenter can call the [seek](#seek) method to navigate to a specific section of the shared video. After calling the seek method, all conference participants receive [information](doc:rn-client-sdk-models-videopresentationeventtype) about the updated timestamp via the [onVideoPresentationChange](#onvideopresentationchange) listener. * * **6.** The presenter calls the [stop](#stop) method to stop the video presentation. In such a situation, all conference participants receive this information via the [onVideoPresentationStopped](#onvideopresentationstopped) listener. */ export declare class VideoPresentationService { /** @internal */ _nativeModule: any; /** @internal */ _nativeEvents: NativeEvents; /** * Returns information about the current video presentation. */ current(): Promise; /** * Pauses a video presentation. * @param timestamp The timestamp that informs when the video needs to be paused, in milliseconds. */ pause(timestamp: number): Promise; /** * Resumes the paused video. */ play(): Promise; /** * Allows a presenter to navigate to the specific section of the shared video. * @param timestamp The timestamp the presenter wants to start playing the video from, in milliseconds. */ seek(timestamp: number): Promise; /** * Starts a video presentation. * @param url The URL that specifies the video file location. */ start(url: string): Promise; /** * Provides the current state of a video presentation. */ state(): Promise; /** * Stops a video presentation. */ stop(): Promise; /** * Adds a listener to the video presentation started, sought, paused, and played events. * @param handler An event callback function. * @returns A function that unsubscribes from event listeners. */ onVideoPresentationChange(handler: (data: VideoPresentationEventType, type?: VideoPresentationEventNames.VideoPresentationStarted | VideoPresentationEventNames.VideoPresentationSought | VideoPresentationEventNames.VideoPresentationPaused | VideoPresentationEventNames.VideoPresentationPlayed) => void): UnsubscribeFunction; /** * Adds a listener to the video presentation stopped event. * @param handler Event callback function */ onVideoPresentationStopped(handler: () => void): UnsubscribeFunction; } declare const _default: VideoPresentationService; export default _default;