Interface VideoControllerApiInternal

interface VideoControllerApi {
    onActiveNamedEventStreamsChange$: Observable<OmpNamedEventEventName[]>;
    onAudioLoaded$: BehaviorSubject<undefined | AudioLoadedEvent>;
    onAudioSwitched$: Observable<AudioSwitchedEvent>;
    onBuffering$: Observable<VideoBufferingEvent>;
    onEnded$: Observable<VideoEndedEvent>;
    onFullscreenChange$: Observable<VideoFullscreenChangeEvent>;
    onHelpMenuChange$: Observable<VideoHelpMenuChangeEvent>;
    onMainAudioChange$: Observable<undefined | MainAudioChangeEvent>;
    onMainAudioPeakProcessorMessage$: Observable<
        AudioPeakProcessorMessageEvent,
    >;
    onNamedEvent$: Observable<OmpNamedEvent>;
    onPause$: Observable<VideoPlayEvent>;
    onPlay$: Observable<VideoPlayEvent>;
    onPlaybackRateChange$: Observable<VideoPlaybackRateEvent>;
    onPlaybackState$: Observable<PlaybackState>;
    onSeeked$: Observable<VideoSeekedEvent>;
    onSeeking$: Observable<VideoSeekingEvent>;
    onSidecarAudioChange$: Observable<SidecarAudioChangeEvent>;
    onSidecarAudioCreate$: Observable<SidecarAudioCreateEvent>;
    onSidecarAudioPeakProcessorMessage$: Observable<
        SidecarAudioPeakProcessorMessageEvent,
    >;
    onSidecarAudioRemove$: Observable<SidecarAudioRemoveEvent>;
    onSubtitlesCreate$: Observable<SubtitlesCreateEvent>;
    onSubtitlesHide$: Observable<SubtitlesEvent>;
    onSubtitlesLoaded$: BehaviorSubject<undefined | SubtitlesLoadedEvent>;
    onSubtitlesRemove$: Observable<SubtitlesEvent>;
    onSubtitlesShow$: Observable<SubtitlesEvent>;
    onThumbnailVttUrlChanged$: Observable<ThumnbailVttUrlChangedEvent>;
    onVideoError$: Observable<VideoErrorEvent>;
    onVideoLoaded$: Observable<undefined | VideoLoadedEvent>;
    onVideoLoading$: Observable<VideoLoadingEvent>;
    onVideoSafeZoneChange$: Observable<VideoSafeZoneChangeEvent>;
    onVideoTimeChange$: Observable<VideoTimeChangeEvent>;
    onVideoWindowPlaybackStateChange$: Observable<
        VideoWindowPlaybackStateChangeEvent,
    >;
    onVolumeChange$: Observable<VideoVolumeEvent>;
    activateSidecarAudioTracks(
        ids: string[],
        deactivateOthers: undefined | boolean,
    ): Observable<void>;
    addSafeZone(videoSafeZone: VideoSafeZone): Observable<VideoSafeZone>;
    appendHelpMenuGroup(helpMenuGroup: HelpMenuGroup): Observable<void>;
    attachVideoWindow(): Observable<void>;
    calculateFrameToTime(frameNumber: number): number;
    calculateTimeToFrame(time: number): number;
    canAttach(): boolean;
    canDetach(): boolean;
    clearHelpMenuGroups(): Observable<void>;
    clearSafeZones(): Observable<void>;
    createMainAudioPeakProcessor(
        audioMeterStandard?: AudioMeterStandard,
    ): Observable<Observable<AudioPeakProcessorMessageEvent>>;
    createMainAudioRouter(
        inputsNumber: number,
        outputsNumber?: number,
    ): Observable<OmpAudioRouterState>;
    createMainAudioRouterWithOutputsResolver(
        inputsNumber: number,
        outputsNumberResolver: (maxChannelCount: number) => number,
    ): Observable<OmpAudioRouterState>;
    createSidecarAudioPeakProcessor(
        sidecarAudioTrackId: string,
        audioMeterStandard?: AudioMeterStandard,
    ): Observable<Observable<AudioPeakProcessorMessageEvent>>;
    createSidecarAudioRouter(
        sidecarAudioTrackId: string,
        inputsNumber?: number,
        outputsNumber?: number,
    ): Observable<OmpAudioRouterState>;
    createSidecarAudioTrack(
        track: Partial<OmpAudioTrack>,
    ): Observable<OmpAudioTrack>;
    createSidecarAudioTracks(
        tracks: Partial<OmpAudioTrack>[],
    ): Observable<OmpAudioTrack[]>;
    createSubtitlesVttTrack(
        subtitlesVttTrack: SubtitlesVttTrack,
    ): Observable<undefined | SubtitlesVttTrack>;
    deactivateSidecarAudioTracks(ids: string[]): Observable<void>;
    destroy(): void;
    detachVideoWindow(): Observable<void>;
    disablePiP(): Observable<void>;
    enablePiP(): Observable<void>;
    exportMainAudioTracksToSidecar(
        mainAudioTrackIds: string[],
    ): Observable<OmpAudioTrack[]>;
    exportMainAudioTrackToSidecar(
        mainAudioTrackId: string,
    ): Observable<OmpAudioTrack>;
    formatToTimecode(time: number): string;
    getActiveAudioTrack(): undefined | OmpAudioTrack;
    getActiveNamedEventStreams(): OmpNamedEventEventName[];
    getActiveSidecarAudioTracks(): OmpAudioTrack[];
    getActiveSubtitlesTrack(): undefined | SubtitlesVttTrack;
    getAudioContext(): AudioContext;
    getAudioTracks(): OmpAudioTrack[];
    getBufferedTimespans(): BufferedTimespan[];
    getConfig(): VideoControllerConfig;
    getCurrentFrame(): number;
    getCurrentTime(): number;
    getCurrentTimecode(): string;
    getDuration(): number;
    getFrameRate(): number;
    getHelpMenuGroups(): HelpMenuGroup[];
    getHls(): undefined | Hls;
    getHTMLVideoElement(): HTMLVideoElement;
    getMainAudioRouter(): undefined | OmpAudioRouter;
    getMainAudioSourceNode(): AudioNode;
    getMainAudioState(): undefined | OmpMainAudioState;
    getPlaybackRate(): number;
    getPlaybackState(): undefined | PlaybackState;
    getSafeZones(): VideoSafeZone[];
    getSidecarAudio(id: string): undefined | SidecarAudioApi;
    getSidecarAudios(): SidecarAudioApi[];
    getSidecarAudioStates(): OmpSidecarAudioState[];
    getSidecarAudioTracks(): OmpAudioTrack[];
    getSubtitlesTracks(): SubtitlesVttTrack[];
    getThumbnailVttUrl(): undefined | string;
    getTotalFrames(): number;
    getVideo(): undefined | Video;
    getVideoLoadOptions(): undefined | VideoLoadOptions;
    getVideoWindowPlaybackState(): VideoWindowPlaybackState;
    getVolume(): number;
    hideSubtitlesTrack(id: string): Observable<void>;
    isDetachable(): boolean;
    isFullscreen(): boolean;
    isMuted(): boolean;
    isPaused(): boolean;
    isPiPSupported(): boolean;
    isPlaying(): boolean;
    isSeeking(): boolean;
    isVideoLoaded(): boolean;
    loadBlackVideo(): Observable<Video>;
    loadThumbnailVttUrl(thumbnailVttUrl: string): Observable<void>;
    loadVideo(sourceUrl: string, frameRate: string | number): Observable<Video>;
    loadVideo(
        sourceUrl: string,
        frameRate: string | number,
        options?: VideoLoadOptions,
    ): Observable<Video>;
    loadVideoInternal(
        sourceUrl: string,
        frameRate: string | number,
        options: undefined | VideoLoadOptions,
        optionsInternal: VideoLoadOptionsInternal,
    ): Observable<Video>;
    mute(): Observable<void>;
    parseTimecodeToFrame(timecode: string): number;
    parseTimecodeToTime(timecode: string): number;
    pause(): Observable<void>;
    play(): Observable<void>;
    prependHelpMenuGroup(helpMenuGroup: HelpMenuGroup): Observable<void>;
    reloadVideo(): Observable<Video>;
    removeAllSidecarAudioTracks(): Observable<void>;
    removeAllSubtitlesTracks(): Observable<void>;
    removeSafeZone(id: string): Observable<void>;
    removeSidecarAudioTracks(ids: string[]): Observable<void>;
    removeSubtitlesTrack(id: string): Observable<void>;
    routeMainAudioRouterNodes(
        newAudioInputOutputNodes: AudioInputOutputNode[],
    ): Observable<void>;
    routeSidecarAudioRouterNodes(
        sidecarAudioTrackId: string,
        newAudioInputOutputNodes: AudioInputOutputNode[],
    ): Observable<void>;
    seekFromCurrentFrame(framesCount: number): Observable<boolean>;
    seekFromCurrentTime(timeAmount: number): Observable<boolean>;
    seekNextFrame(): Observable<boolean>;
    seekPreviousFrame(): Observable<boolean>;
    seekToEnd(): Observable<boolean>;
    seekToFrame(frame: number): Observable<boolean>;
    seekToPercent(percent: number): Observable<boolean>;
    seekToTime(time: number): Observable<boolean>;
    seekToTimecode(timecode: string): Observable<boolean>;
    setActiveAudioTrack(id: string): Observable<void>;
    setPlaybackRate(playbackRate: number): Observable<void>;
    setVolume(volume: number): Observable<void>;
    showSubtitlesTrack(id: string): Observable<void>;
    toggleFullscreen(): Observable<void>;
    toggleMuteUnmute(): Observable<void>;
    togglePlayPause(): Observable<void>;
    unmute(): Observable<void>;
    updateActiveNamedEventStreams(
        eventNames: OmpNamedEventEventName[],
    ): Observable<void>;
}

Hierarchy (View Summary)

Implemented by

Properties

Methods

activateSidecarAudioTracks addSafeZone appendHelpMenuGroup attachVideoWindow calculateFrameToTime calculateTimeToFrame canAttach canDetach clearHelpMenuGroups clearSafeZones createMainAudioPeakProcessor createMainAudioRouter createMainAudioRouterWithOutputsResolver createSidecarAudioPeakProcessor createSidecarAudioRouter createSidecarAudioTrack createSidecarAudioTracks createSubtitlesVttTrack deactivateSidecarAudioTracks destroy detachVideoWindow disablePiP enablePiP exportMainAudioTracksToSidecar exportMainAudioTrackToSidecar formatToTimecode getActiveAudioTrack getActiveNamedEventStreams getActiveSidecarAudioTracks getActiveSubtitlesTrack getAudioContext getAudioTracks getBufferedTimespans getConfig getCurrentFrame getCurrentTime getCurrentTimecode getDuration getFrameRate getHelpMenuGroups getHls getHTMLVideoElement getMainAudioRouter getMainAudioSourceNode getMainAudioState getPlaybackRate getPlaybackState getSafeZones getSidecarAudio getSidecarAudios getSidecarAudioStates getSidecarAudioTracks getSubtitlesTracks getThumbnailVttUrl getTotalFrames getVideo getVideoLoadOptions getVideoWindowPlaybackState getVolume hideSubtitlesTrack isDetachable isFullscreen isMuted isPaused isPiPSupported isPlaying isSeeking isVideoLoaded loadBlackVideo loadThumbnailVttUrl loadVideo loadVideoInternal mute parseTimecodeToFrame parseTimecodeToTime pause play prependHelpMenuGroup reloadVideo removeAllSidecarAudioTracks removeAllSubtitlesTracks removeSafeZone removeSidecarAudioTracks removeSubtitlesTrack routeMainAudioRouterNodes routeSidecarAudioRouterNodes seekFromCurrentFrame seekFromCurrentTime seekNextFrame seekPreviousFrame seekToEnd seekToFrame seekToPercent seekToTime seekToTimecode setActiveAudioTrack setPlaybackRate setVolume showSubtitlesTrack toggleFullscreen toggleMuteUnmute togglePlayPause unmute updateActiveNamedEventStreams

Properties

onActiveNamedEventStreamsChange$: Observable<OmpNamedEventEventName[]>
onAudioLoaded$: BehaviorSubject<undefined | AudioLoadedEvent>
onAudioSwitched$: Observable<AudioSwitchedEvent>
onBuffering$: Observable<VideoBufferingEvent>

Fires on video buffering

onEnded$: Observable<VideoEndedEvent>

Fires on video end

onFullscreenChange$: Observable<VideoFullscreenChangeEvent>

Fires on fullscreen change

onHelpMenuChange$: Observable<VideoHelpMenuChangeEvent>
onMainAudioChange$: Observable<undefined | MainAudioChangeEvent>
onMainAudioPeakProcessorMessage$: Observable<AudioPeakProcessorMessageEvent>
onNamedEvent$: Observable<OmpNamedEvent>

Fires on event which has active stream (see updateActiveNamedEventStreams

onPause$: Observable<VideoPlayEvent>

Fires on video pause

onPlay$: Observable<VideoPlayEvent>

Fires on video play

onPlaybackRateChange$: Observable<VideoPlaybackRateEvent>

Fires on playback rate change

onPlaybackState$: Observable<PlaybackState>
onSeeked$: Observable<VideoSeekedEvent>

Fires on video seeked

onSeeking$: Observable<VideoSeekingEvent>

Fires on video seeking

onSidecarAudioChange$: Observable<SidecarAudioChangeEvent>
onSidecarAudioCreate$: Observable<SidecarAudioCreateEvent>
onSidecarAudioPeakProcessorMessage$: Observable<
    SidecarAudioPeakProcessorMessageEvent,
>
onSidecarAudioRemove$: Observable<SidecarAudioRemoveEvent>
onSubtitlesCreate$: Observable<SubtitlesCreateEvent>
onSubtitlesHide$: Observable<SubtitlesEvent>
onSubtitlesLoaded$: BehaviorSubject<undefined | SubtitlesLoadedEvent>
onSubtitlesRemove$: Observable<SubtitlesEvent>
onSubtitlesShow$: Observable<SubtitlesEvent>
onThumbnailVttUrlChanged$: Observable<ThumnbailVttUrlChangedEvent>
onVideoError$: Observable<VideoErrorEvent>

Fires on if error occurs on video load

onVideoLoaded$: Observable<undefined | VideoLoadedEvent>

Fires on video load. Initial value is undefined. Always emits the current value on subscription.

onVideoLoading$: Observable<VideoLoadingEvent>

Fires on video load start.

onVideoSafeZoneChange$: Observable<VideoSafeZoneChangeEvent>

Fires on video safe zone change

onVideoTimeChange$: Observable<VideoTimeChangeEvent>

Fires on video time change

onVideoWindowPlaybackStateChange$: Observable<
    VideoWindowPlaybackStateChangeEvent,
>

Fires on video window playback state change

onVolumeChange$: Observable<VideoVolumeEvent>

Fires on volume change

Methods

  • Parameters

    • ids: string[]
    • deactivateOthers: undefined | boolean

    Returns Observable<void>

  • Parameters

    • inputsNumber: number
    • OptionaloutputsNumber: number

    Returns Observable<OmpAudioRouterState>

  • Parameters

    • inputsNumber: number
    • outputsNumberResolver: (maxChannelCount: number) => number

    Returns Observable<OmpAudioRouterState>

  • Parameters

    • sidecarAudioTrackId: string
    • OptionalinputsNumber: number
    • OptionaloutputsNumber: number

    Returns Observable<OmpAudioRouterState>

  • Parameters

    • newAudioInputOutputNodes: AudioInputOutputNode[]

    Returns Observable<void>

  • Parameters

    • sidecarAudioTrackId: string
    • newAudioInputOutputNodes: AudioInputOutputNode[]

    Returns Observable<void>

  • Seeks to video frame offsetted by provided framesCount. Video must be in non-playing mode.

    Parameters

    • framesCount: number

      Positive (seek forward) or negative (seek backward) integer

    Returns Observable<boolean>

  • Seeks to video time offsetted by provided timeAmount. Video must be in non-playing mode.

    Parameters

    • timeAmount: number

      Positive (seek forward) or negative (seek backward) integer

    Returns Observable<boolean>

  • Seeks to particular video frame. Video must be in non-playing mode.

    Parameters

    • frame: number

      Video frame number

    Returns Observable<boolean>

  • Sets video playback rate

    Parameters

    • playbackRate: number

      Decimal value between [0.1, 16]. For example, if provided value is "2", video playback rate will be 2x of normal playback rate

    Returns Observable<void>