Interface VideoControllerApiInternal

interface VideoControllerApi {
    onActiveNamedEventStreamsChange$: Observable<OmpNamedEvents[]>;
    onAudioContextChange$: Observable<AudioContextChangeEvent>;
    onAudioLoaded$: BehaviorSubject<undefined | AudioLoadedEvent>;
    onAudioPeakProcessorWorkletNodeMessage$: Observable<
        AudioPeakProcessorWorkletNodeMessageEvent,
    >;
    onAudioRouting$: Observable<AudioRoutingEvent>;
    onAudioSwitched$: Observable<AudioSwitchedEvent>;
    onAudioWorkletNodeCreated$: BehaviorSubject<
        undefined
        | AudioWorkletNodeCreatedEvent,
    >;
    onBuffering$: Observable<VideoBufferingEvent>;
    onEnded$: Observable<VideoEndedEvent>;
    onFullscreenChange$: Observable<VideoFullscreenChangeEvent>;
    onHelpMenuChange$: Observable<VideoHelpMenuChangeEvent>;
    onNamedEvent$: Observable<OmpNamedEvent>;
    onPause$: Observable<VideoPlayEvent>;
    onPlay$: Observable<VideoPlayEvent>;
    onPlaybackRateChange$: Observable<VideoPlaybackRateEvent>;
    onPlaybackState$: Observable<PlaybackState>;
    onSeeked$: Observable<VideoSeekedEvent>;
    onSeeking$: Observable<VideoSeekingEvent>;
    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>;
    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>;
    createAudioContext(contextOptions?: AudioContextOptions): Observable<void>;
    createAudioPeakProcessorWorkletNode(
        audioMeterStandard: AudioMeterStandard,
    ): Observable<void>;
    createAudioRouter(
        inputsNumber: number,
        outputsNumber?: number,
    ): Observable<void>;
    createAudioRouterWithOutputsResolver(
        inputsNumber: number,
        outputsNumberResolver: (maxChannelCount: number) => number,
    ): Observable<void>;
    createSubtitlesVttTrack(
        subtitlesVttTrack: SubtitlesVttTrack,
    ): Observable<undefined | SubtitlesVttTrack>;
    destroy(): void;
    detachVideoWindow(): Observable<void>;
    disablePiP(): Observable<void>;
    dispatchVideoTimeChange(): void;
    enablePiP(): Observable<void>;
    formatToTimecode(time: number): string;
    getActiveAudioTrack(): undefined | OmakaseAudioTrack;
    getActiveNamedEventStreams(): OmpNamedEvents[];
    getActiveSubtitlesTrack(): undefined | SubtitlesVttTrack;
    getAudioContext(): undefined | AudioContext;
    getAudioInputOutputNodes(): AudioInputOutputNode[][];
    getAudioPeakProcessorWorkletNode(): undefined | AudioWorkletNode;
    getAudioTracks(): OmakaseAudioTrack[];
    getBufferedTimespans(): BufferedTimespan[];
    getConfig(): VideoControllerConfig;
    getCurrentFrame(): number;
    getCurrentTime(): number;
    getCurrentTimecode(): string;
    getDuration(): number;
    getFrameRate(): number;
    getHelpMenuGroups(): HelpMenuGroup[];
    getHls(): undefined | Hls;
    getHTMLAudioUtilElement(): HTMLAudioElement;
    getHTMLVideoElement(): HTMLVideoElement;
    getMediaElementAudioSourceNode(): undefined | MediaElementAudioSourceNode;
    getPlaybackRate(): number;
    getPlaybackState(): undefined | PlaybackState;
    getSafeZones(): VideoSafeZone[];
    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;
    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>;
    removeAllSubtitlesTracks(): Observable<void>;
    removeSafeZone(id: string): Observable<void>;
    removeSubtitlesTrack(id: string): Observable<void>;
    routeAudioInputOutputNode(
        newAudioInputOutputNode: AudioInputOutputNode,
    ): Observable<void>;
    routeAudioInputOutputNodes(
        newAudioInputOutputNodes: AudioInputOutputNode[],
    ): Observable<void>;
    seekFromCurrentFrame(framesCount: number): Observable<boolean>;
    seekFromCurrentTime(timeAmount: number): Observable<boolean>;
    seekNextFrame(): Observable<boolean>;
    seekPreviousFrame(): 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: OmpNamedEvents[],
    ): Observable<void>;
}

Hierarchy (View Summary)

Implemented by

Properties

Methods

addSafeZone appendHelpMenuGroup attachVideoWindow calculateFrameToTime calculateTimeToFrame canAttach canDetach clearHelpMenuGroups clearSafeZones createAudioContext createAudioPeakProcessorWorkletNode createAudioRouter createAudioRouterWithOutputsResolver createSubtitlesVttTrack destroy detachVideoWindow disablePiP dispatchVideoTimeChange enablePiP formatToTimecode getActiveAudioTrack getActiveNamedEventStreams getActiveSubtitlesTrack getAudioContext getAudioInputOutputNodes getAudioPeakProcessorWorkletNode getAudioTracks getBufferedTimespans getConfig getCurrentFrame getCurrentTime getCurrentTimecode getDuration getFrameRate getHelpMenuGroups getHls getHTMLAudioUtilElement getHTMLVideoElement getMediaElementAudioSourceNode getPlaybackRate getPlaybackState getSafeZones getSubtitlesTracks getThumbnailVttUrl getTotalFrames getVideo getVideoLoadOptions getVideoWindowPlaybackState getVolume hideSubtitlesTrack isDetachable isFullscreen isMuted isPaused isPlaying isSeeking isVideoLoaded loadBlackVideo loadThumbnailVttUrl loadVideo loadVideoInternal mute parseTimecodeToFrame parseTimecodeToTime pause play prependHelpMenuGroup reloadVideo removeAllSubtitlesTracks removeSafeZone removeSubtitlesTrack routeAudioInputOutputNode routeAudioInputOutputNodes seekFromCurrentFrame seekFromCurrentTime seekNextFrame seekPreviousFrame seekToFrame seekToPercent seekToTime seekToTimecode setActiveAudioTrack setPlaybackRate setVolume showSubtitlesTrack toggleFullscreen toggleMuteUnmute togglePlayPause unmute updateActiveNamedEventStreams

Properties

onActiveNamedEventStreamsChange$: Observable<OmpNamedEvents[]>
onAudioContextChange$: Observable<AudioContextChangeEvent>
onAudioLoaded$: BehaviorSubject<undefined | AudioLoadedEvent>
onAudioPeakProcessorWorkletNodeMessage$: Observable<
    AudioPeakProcessorWorkletNodeMessageEvent,
>
onAudioRouting$: Observable<AudioRoutingEvent>
onAudioSwitched$: Observable<AudioSwitchedEvent>
onAudioWorkletNodeCreated$: BehaviorSubject<
    undefined
    | AudioWorkletNodeCreatedEvent,
>
onBuffering$: Observable<VideoBufferingEvent>

Fires on video buffering

onEnded$: Observable<VideoEndedEvent>

Fires on video end

onFullscreenChange$: Observable<VideoFullscreenChangeEvent>

Fires on fullscreen change

onHelpMenuChange$: Observable<VideoHelpMenuChangeEvent>
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

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

    • inputsNumber: number
    • OptionaloutputsNumber: number

    Returns Observable<void>

  • Parameters

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

    Returns Observable<void>

  • Parameters

    • newAudioInputOutputNode: AudioInputOutputNode

    Returns Observable<void>

  • Parameters

    • 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>