Interface VideoControllerApiInternal

interface VideoControllerApi {
    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>;
    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<undefined | ThumnbailVttUrlChangedEvent>;
    onVideoError$: Observable<VideoErrorEvent>;
    onVideoLoaded$: BehaviorSubject<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;
    clearHelpMenuGroups(): Observable<void>;
    clearSafeZones(): Observable<void>;
    createAudioContext(inputsNumber: number, outputsNumber?: number): Observable<void>;
    createAudioContextWithOutputsResolver(inputsNumber: number, outputsNumberResolver: ((maxChannelCount: number) => number)): Observable<void>;
    createAudioPeakProcessorWorkletNode(audioMeterStandard: AudioMeterStandard): Observable<void>;
    createSubtitlesVttTrack(subtitlesVttTrack: SubtitlesVttTrack): Observable<undefined | SubtitlesVttTrack>;
    destroy(): void;
    detachVideoWindow(): Observable<void>;
    formatToTimecode(time: number): string;
    getActiveAudioTrack(): undefined | OmakaseAudioTrack;
    getActiveSubtitlesTrack(): undefined | SubtitlesVttTrack;
    getAudioContext(): undefined | AudioContext;
    getAudioInputOutputNodes(): AudioInputOutputNode[][];
    getAudioPeakProcessorWorkletNode(): undefined | AudioWorkletNode;
    getAudioTracks(): OmakaseAudioTrack[];
    getBufferedTimespans(): BufferedTimespan[];
    getCurrentFrame(): number;
    getCurrentTime(): number;
    getCurrentTimecode(): string;
    getDuration(): number;
    getFrameRate(): number;
    getHelpMenuGroups(): HelpMenuGroup[];
    getHls(): undefined | Hls;
    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>;
    isAttachVideoWindowEnabled(): boolean;
    isDetachVideoWindowEnabled(): boolean;
    isFullscreen(): boolean;
    isMuted(): boolean;
    isPaused(): boolean;
    isPlaying(): boolean;
    isSeeking(): boolean;
    isVideoLoaded(): boolean;
    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>;
}

Hierarchy (view full)

Implemented by

Properties

Methods

Properties

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>
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<undefined | ThumnbailVttUrlChangedEvent>
onVideoError$: Observable<VideoErrorEvent>

Fires on if error occurs on video load

onVideoLoaded$: BehaviorSubject<undefined | VideoLoadedEvent>

Fires on video load. Initial value is undefined.

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
    • outputsNumberResolver: ((maxChannelCount: number) => number)
        • (maxChannelCount): number
        • Parameters

          • maxChannelCount: number

          Returns number

    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>

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