Hosanna UI API v2.3.0-next
    Preparing search index...

    Shared Roku Video contract. Declaring a field does not imply that the browser emulator implements its native playback behavior.

    interface ISGNVideo {
        asyncStopSemantics?: boolean;
        audioFormat?: string;
        audioSelectionPreferences?: IVideoAudioSelectionPreferences;
        audioTrack: string;
        autoplayAfterSeek?: boolean;
        availableAudioTracks: IVideoAudioTrackInfo[];
        availableSubtitleTracks: IVideoSubtitleTrackInfo[];
        bifDisplay?: ISGNBifDisplay;
        boundView?: unknown;
        bufferingBar?: ISGNProgressBar;
        bufferingStatus?: any;
        bufferingTextColor?: IColor;
        captionRenderArea?: IVideoCaptionRenderArea;
        captionStyle: any;
        castActive?: boolean;
        castAvailable?: boolean;
        castKind?: "none" | "airplay" | "chromecast";
        cdnSwitch?: IVideoCdnSwitch[];
        cgms?: 0 | 1 | 2 | 3;
        change?: { [key: string]: any };
        childRenderOrder?: string;
        clipId?: number;
        clippingRect?: number[];
        completedStreamInfo?: IVideoCompletedStreamInfo;
        content?: ISGNNode;
        contentBlocked?: boolean;
        contentIndex?: number;
        contentIsPlaylist?: boolean;
        contentUri?: string;
        control?: VideoControl;
        currentAudioTrack: string;
        currentSubtitleTrack: string;
        decoderStats?: any;
        disableScreenSaver?: boolean;
        div?: HTMLDivElement;
        downloadedSegment?: any;
        drmHttpAgent?: ISGIHttpAgent;
        duration?: number;
        enableDecoderStats?: boolean;
        enableLiveAvailabilityWindow?: boolean;
        enableRenderTracking?: boolean;
        enableScreenSaverWhilePlaying?: boolean;
        enableThumbnailTilesDuringLive?: boolean;
        enableTrickPlay: boolean;
        enableUI: boolean;
        errorCode?: VideoErrorCode;
        errorInfo?: any;
        errorMsg?: string;
        errorStr?: string;
        focusable?: boolean;
        focusedChild?: ISGNNode;
        getCastController?: () => unknown;
        globalCaptionMode: VideoCaptionMode;
        height: number;
        id: string;
        inheritParentOpacity?: boolean;
        inheritParentTransform?: boolean;
        licenseStatus?: any;
        loop?: boolean;
        maxVideoDecodeResolution?: [number, number];
        mediaType?: MediaType;
        mute: boolean;
        muteAudioGuide?: boolean;
        nextContentIndex?: number;
        notificationInterval: number;
        opacity: number;
        pauseBufferEnd?: number;
        pauseBufferEpochOffset?: number;
        pauseBufferOverflow?: boolean;
        pauseBufferPosition?: number;
        pauseBufferStart?: number;
        pivotNode?: ISGNGroup;
        playbackActionButtonFocused?: number;
        playbackActionButtonFocusedTextColor?: IColor;
        playbackActionButtonFocusedTextFont?: ISGROFont;
        playbackActionButtonFocusIndicatorBlendColor?: IColor;
        playbackActionButtons?: any;
        playbackActionButtonSelected?: number;
        playbackActionButtonUnfocusedTextColor?: IColor;
        playbackActionButtonUnfocusedTextFont?: ISGROFont;
        playbackSpeed?: number;
        playStartInfo?: any;
        position?: number;
        positionInfo?: IVideoPositionInfo;
        renderPass?: number;
        renderTracking?: string;
        retrievingBar?: ISGNProgressBar;
        retrievingTextColor?: IColor;
        rotation: number;
        scale: [number, number];
        scaleRotateCenter: [number, number];
        seamlessAudioTrackSelection?: boolean;
        seek?: number;
        seekMode: string;
        showCastPicker?: () => Promise<void>;
        state?: VideoState;
        streamInfo?: IVideoStreamInfo;
        streamingSegment?: any;
        subtitleSelectionPreferences?: IVideoSubtitleSelectionPreferences;
        subtitleTrack: string;
        supplementaryAudioVolume?: number;
        suppressCaptions: boolean;
        thumbnailTiles?: ThumbnailTiles;
        timedMetaData?: { [key: string]: any };
        timedMetaData2?: IVideoTimedMetaData2;
        timedMetaDataSelectionKeys?: string[];
        timeToStartStreaming?: number;
        translation: [number, number];
        trickPlayBackgroundOverlay?: string;
        trickPlayBar?: ISGNTrickPlayBar;
        videoFormat?: VideoCodec;
        visible: boolean;
        width: number;
        addField(fieldName: string, type: string, alwayNotify: boolean): boolean;
        addFields(fields: any): boolean;
        AddReplace(key: string, value: any): any;
        ancestorBoundingRect(
            ancestor: undefined | null | ISGROSGNode,
        ): I2DRectangle;
        ancestorSubBoundingRect(
            itemnumber: string,
            ancestor: ISGROSGNode,
        ): I2DRectangle;
        Append(aa: any): any;
        appendChild(child: ISGNNode): boolean;
        appendChildren(child_nodes: any): boolean;
        boundingRect(): I2DRectangle;
        CallFunc(funcName: string, ...args: unknown[]): unknown;
        Clear(): any;
        clone(isDeepCopy: boolean): any;
        Count(): number;
        createChild<T extends ISGNNode = ISGNNode>(nodeType: string): T;
        createChildren<T extends ISGNNode = ISGNNode>(
            num_children: number,
            subtype: string,
        ): T[];
        Delete(key: string): boolean;
        DoesExist(key: string): boolean;
        findNode(name: string): any;
        getAll(): any;
        getAllMeta(): any;
        getChild(index: number): any;
        getChildCount(): number;
        getChildren(num_children: number, index: number): any;
        getField<T = unknown>(fieldName: string): T;
        getFields(): JsonData;
        getFieldType(fieldName: string): string;
        getFieldTypes(): string[];
        getHttpAgent(): any;
        getParent(): undefined | ISGNNode;
        getRoots(): any;
        getRootsMeta(): any;
        getScene(): ISGNNode;
        hasField(fieldName: string): boolean;
        hasFocus(): boolean;
        insertChild(child: ISGNNode, index: number): boolean;
        insertChildren(child_nodes: any, index: number): boolean;
        isInFocusChain(): boolean;
        isSameNode(node: any): boolean;
        isSubtype(nodeType: string): boolean;
        Items(): any;
        Keys(): string[];
        localBoundingRect(): I2DRectangle;
        localSubBoundingRect(itemnumber: string): I2DRectangle;
        Lookup(key: string): any;
        LookupCI(key: string): any;
        mount(): void;
        observeField(
            fieldName: string,
            functionName: Function,
            infoFields?: string[],
        ): boolean;
        observeField(
            fieldName: string,
            functionName: string,
            infoFields?: string[],
        ): boolean;
        observeField(fieldName: string, port: any, infoFields?: string[]): boolean;
        observeFieldScoped(
            fieldName: string,
            functionName: string,
            infoFields?: string[],
        ): boolean;
        observeFieldScoped(
            fieldName: string,
            functionName: Function,
            infoFields?: string[],
        ): boolean;
        observeFieldScoped(
            fieldName: string,
            port: ISGROMessagePort,
            infoFields?: string[],
        ): boolean;
        observeFieldScopedEx(
            fieldName: string,
            port: ISGROMessagePort,
            infoFields?: string[],
        ): boolean;
        parentSubtype(nodeType: string): string;
        queueFields(queueNode: boolean): boolean;
        removeChild(child: ISGNNode): boolean;
        removeChildIndex(index: number): boolean;
        removeChildren(child_nodes: ISGNNode[]): boolean;
        removeChildrenIndex(num_children: number, index: number): boolean;
        removeField(fieldName: string): boolean;
        removeFields(fieldNames: any): boolean;
        render(): void;
        reparent(newParent: ISGNNode, adjustTransform: boolean): boolean;
        replaceChild(newChild: ISGNNode, index: number): boolean;
        replaceChildren(child_nodes: any, index: number): boolean;
        sceneBoundingRect(): I2DRectangle;
        sceneSubBoundingRect(itemnumber: string): I2DRectangle;
        setField(fieldName: string, value: any): boolean;
        setFields(fields: any): boolean;
        setFocus(on: boolean): boolean;
        setHttpAgent(HTTP_agent: any): boolean;
        SetModeCaseSensitive(): any;
        showDebugBounds(show: boolean): void;
        signalBeacon(beacon: string): number;
        subBoundingRect(itemnumber: string): I2DRectangle;
        subtype(): string;
        threadinfo(): any;
        unmount(): void;
        unobserveField(fieldName: string): boolean;
        unobserveFieldScoped(fieldName: string): boolean;
        update(fields: any, addFields?: boolean): any;
    }

    Hierarchy (View Summary)

    Index

    Properties

    asyncStopSemantics? audioFormat? audioSelectionPreferences? audioTrack autoplayAfterSeek? availableAudioTracks availableSubtitleTracks bifDisplay? boundView? bufferingBar? bufferingStatus? bufferingTextColor? captionRenderArea? captionStyle castActive? castAvailable? castKind? cdnSwitch? cgms? change? childRenderOrder? clipId? clippingRect? completedStreamInfo? content? contentBlocked? contentIndex? contentIsPlaylist? contentUri? control? currentAudioTrack currentSubtitleTrack decoderStats? disableScreenSaver? div? downloadedSegment? drmHttpAgent? duration? enableDecoderStats? enableLiveAvailabilityWindow? enableRenderTracking? enableScreenSaverWhilePlaying? enableThumbnailTilesDuringLive? enableTrickPlay enableUI errorCode? errorInfo? errorMsg? errorStr? focusable? focusedChild? getCastController? globalCaptionMode height id inheritParentOpacity? inheritParentTransform? licenseStatus? loop? maxVideoDecodeResolution? mediaType? mute muteAudioGuide? nextContentIndex? notificationInterval opacity pauseBufferEnd? pauseBufferEpochOffset? pauseBufferOverflow? pauseBufferPosition? pauseBufferStart? pivotNode? playbackActionButtonFocused? playbackActionButtonFocusedTextColor? playbackActionButtonFocusedTextFont? playbackActionButtonFocusIndicatorBlendColor? playbackActionButtons? playbackActionButtonSelected? playbackActionButtonUnfocusedTextColor? playbackActionButtonUnfocusedTextFont? playbackSpeed? playStartInfo? position? positionInfo? renderPass? renderTracking? retrievingBar? retrievingTextColor? rotation scale scaleRotateCenter seamlessAudioTrackSelection? seek? seekMode showCastPicker? state? streamInfo? streamingSegment? subtitleSelectionPreferences? subtitleTrack supplementaryAudioVolume? suppressCaptions thumbnailTiles? timedMetaData? timedMetaData2? timedMetaDataSelectionKeys? timeToStartStreaming? translation trickPlayBackgroundOverlay? trickPlayBar? videoFormat? visible width

    Methods

    Properties

    asyncStopSemantics?: boolean

    Enable asynchronous stop on Roku OS 12.5+. Wait for stopped before reuse.

    audioFormat?: string

    Format of the currently playing audio stream.

    audioSelectionPreferences?: IVideoAudioSelectionPreferences

    Audio track selection priorities, available on Roku OS 12.5+.

    audioTrack: string

    Audio track

    autoplayAfterSeek?: boolean

    Resume playback after seek rebuffering. Defaults to true.

    availableAudioTracks: IVideoAudioTrackInfo[]

    Available audio tracks

    availableSubtitleTracks: IVideoSubtitleTrackInfo[]

    Available subtitle tracks

    bifDisplay?: ISGNBifDisplay

    Internal native playback UI nodes.

    boundView?: unknown
    bufferingBar?: ISGNProgressBar
    bufferingStatus?: any

    Buffering status

    bufferingTextColor?: IColor
    captionRenderArea?: IVideoCaptionRenderArea

    Caption positioning and scaling, available on Roku OS 15.3+.

    captionStyle: any

    Caption style settings

    castActive?: boolean

    Whether playback is routed to a wireless/cast target

    castAvailable?: boolean

    Whether a cast target is available

    castKind?: "none" | "airplay" | "chromecast"

    Current web cast route kind, when supported by the platform

    cdnSwitch?: IVideoCdnSwitch[]

    CDN-switch notification entries.

    cgms?: 0 | 1 | 2 | 3

    Analog copy protection: none, no more copies, copy once, or no copies.

    change?: { [key: string]: any }

    Change object

    childRenderOrder?: string

    Child render order

    clipId?: number

    ID of the currently playing clip.

    clippingRect?: number[]

    Clipping rectangle

    completedStreamInfo?: IVideoCompletedStreamInfo

    Information about the last completed or interrupted stream.

    content?: ISGNNode

    Video content node

    contentBlocked?: boolean

    Whether the current content is blocked.

    contentIndex?: number

    Current content index

    contentIsPlaylist?: boolean

    Whether content is a playlist

    contentUri?: string

    URI of video content

    control?: VideoControl

    Video control state

    currentAudioTrack: string

    Currently active audio track

    currentSubtitleTrack: string

    Currently active subtitle track

    decoderStats?: any

    Decoder statistics

    disableScreenSaver?: boolean

    Suppress the screensaver, including for audio-only playback.

    div?: HTMLDivElement
    downloadedSegment?: any

    Most recently downloaded segment information

    drmHttpAgent?: ISGIHttpAgent
    duration?: number

    Video duration

    enableDecoderStats?: boolean

    Whether decoder stats are enabled

    enableLiveAvailabilityWindow?: boolean

    Allow trick-play scrubbing within a live stream's availability window.

    enableRenderTracking?: boolean

    Enable render tracking

    enableScreenSaverWhilePlaying?: boolean

    Allow screensaver activation when video occupies less than half the screen.

    enableThumbnailTilesDuringLive?: boolean

    Allow thumbnailTiles updates during live HLS/DASH playback.

    enableTrickPlay: boolean

    Whether trick play is enabled

    enableUI: boolean

    Whether video UI is enabled

    errorCode?: VideoErrorCode

    Video error code

    errorInfo?: any

    Error information

    errorMsg?: string

    Error message

    errorStr?: string

    Error string

    focusable?: boolean

    Is focusable

    focusedChild?: ISGNNode

    Focused child

    getCastController?: () => unknown

    Returns the platform cast controller when the target exposes one

    globalCaptionMode: VideoCaptionMode

    Global caption display mode

    height: number

    Video height

    id: string

    Node ID

    inheritParentOpacity?: boolean

    Inherit parent opacity

    inheritParentTransform?: boolean

    Inherit parent transform

    licenseStatus?: any

    License status

    loop?: boolean

    Whether video loops

    maxVideoDecodeResolution?: [number, number]

    Maximum decode size [width, height]; zero means unlimited.

    mediaType?: MediaType

    Type of media

    mute: boolean

    Whether audio is muted

    muteAudioGuide?: boolean

    Mute audio guide

    nextContentIndex?: number

    Next content index

    notificationInterval: number

    Interval for notifications

    opacity: number

    Opacity value

    pauseBufferEnd?: number

    End of the buffered range while live video is paused, in seconds.

    pauseBufferEpochOffset?: number

    Offset for converting relative pause-buffer times to UTC.

    pauseBufferOverflow?: boolean

    Whether the paused live buffer could not retain all incoming video.

    pauseBufferPosition?: number

    Presentation position within the paused live buffer, in seconds.

    pauseBufferStart?: number

    Start of the buffered range while live video is paused, in seconds.

    pivotNode?: ISGNGroup

    Renderable node shown while playback is paused.

    playbackActionButtonFocused?: number

    Index of focused playback action button

    playbackActionButtonFocusedTextColor?: IColor

    Text color for focused playback button

    playbackActionButtonFocusedTextFont?: ISGROFont

    Font for focused playback button

    playbackActionButtonFocusIndicatorBlendColor?: IColor

    Blend color for focus indicator

    playbackActionButtons?: any

    Playback action buttons

    playbackActionButtonSelected?: number

    Index of selected playback button

    playbackActionButtonUnfocusedTextColor?: IColor

    Text color for unfocused playback button

    playbackActionButtonUnfocusedTextFont?: ISGROFont

    Font for unfocused playback button

    playbackSpeed?: number

    Playback speed multiplier; 1 is normal speed. Maps to the native Video node playbackSpeed field on Roku (OS 11.5+, trick-play-capable streams), HTMLMediaElement.playbackRate in the browser.

    playStartInfo?: any

    Playback start information

    position?: number

    Current playback position

    positionInfo?: IVideoPositionInfo

    Positions of the last rendered audio and video samples.

    renderPass?: number

    Render pass

    renderTracking?: string

    Render tracking

    retrievingBar?: ISGNProgressBar
    retrievingTextColor?: IColor
    rotation: number

    Rotation angle

    scale: [number, number]

    Scale values

    scaleRotateCenter: [number, number]

    Scale/rotate center point

    seamlessAudioTrackSelection?: boolean

    HLS audio switching without interrupting video, available on Roku OS 13+.

    seek?: number

    Seek position

    seekMode: string
    showCastPicker?: () => Promise<void>

    Shows the platform cast picker when supported

    state?: VideoState

    Video playback state

    streamInfo?: IVideoStreamInfo

    Information about the stream currently playing or buffering.

    streamingSegment?: any

    Currently streaming segment information

    subtitleSelectionPreferences?: IVideoSubtitleSelectionPreferences

    Subtitle track selection priorities, available on Roku OS 12.5+.

    subtitleTrack: string

    Selected subtitle track

    supplementaryAudioVolume?: number

    Description-track volume, from 0 to 100. Defaults to 50.

    suppressCaptions: boolean

    Whether captions are suppressed

    thumbnailTiles?: ThumbnailTiles

    Thumbnail tiles

    timedMetaData?: { [key: string]: any }

    Timed metadata emitted by the current stream

    timedMetaData2?: IVideoTimedMetaData2

    Timed metadata including its timestamp and source.

    timedMetaDataSelectionKeys?: string[]

    Timed metadata keys to keep when native stream metadata is emitted

    timeToStartStreaming?: number

    Playback startup time in seconds; zero outside the playing state.

    translation: [number, number]

    Translation values

    trickPlayBackgroundOverlay?: string

    Background overlay URI for the native playback UI.

    trickPlayBar?: ISGNTrickPlayBar
    videoFormat?: VideoCodec

    Video format/codec

    visible: boolean

    Visibility

    width: number

    Video width

    Methods

    • Adds field to node

      Parameters

      • fieldName: string
      • type: string
      • alwayNotify: boolean

      Returns boolean

    • Adds multiple fields

      Parameters

      • fields: any

      Returns boolean

    • Adds or replaces a key-value pair

      Parameters

      • key: string
      • value: any

      Returns any

    • Appends another associative array

      Parameters

      • aa: any

      Returns any

    • Appends multiple child nodes

      Parameters

      • child_nodes: any

      Returns boolean

    • Parameters

      • funcName: string
      • ...args: unknown[]

      Returns unknown

    • Clears the associative array

      Returns any

    • Clones node

      Parameters

      • isDeepCopy: boolean

      Returns any

    • Gets the count of items

      Returns number

    • Deletes an item by key

      Parameters

      • key: string

      Returns boolean

    • Checks if a key exists

      Parameters

      • key: string

      Returns boolean

    • Finds node by name

      Parameters

      • name: string

      Returns any

    • Gets all child nodes

      Returns any

    • Gets child node at index

      Parameters

      • index: number

      Returns any

    • Gets multiple child nodes

      Parameters

      • num_children: number
      • index: number

      Returns any

    • Gets field value

      Type Parameters

      • T = unknown

      Parameters

      • fieldName: string

      Returns T

    • Gets field type

      Parameters

      • fieldName: string

      Returns string

    • Checks if field exists

      Parameters

      • fieldName: string

      Returns boolean

    • Checks if node has focus

      Returns boolean

    • Inserts multiple child nodes at index

      Parameters

      • child_nodes: any
      • index: number

      Returns boolean

    • Checks if nodes are same

      Parameters

      • node: any

      Returns boolean

    • Checks if node is subtype

      Parameters

      • nodeType: string

      Returns boolean

    • Gets all keys

      Returns string[]

    • Gets local sub-item bounding rect

      Parameters

      • itemnumber: string

      Returns I2DRectangle

    • Looks up a value by key

      Parameters

      • key: string

      Returns any

    • Looks up a value by key (case insensitive)

      Parameters

      • key: string

      Returns any

    • Observes field changes

      Parameters

      • fieldName: string
      • functionName: Function
      • OptionalinfoFields: string[]

      Returns boolean

    • Parameters

      • fieldName: string
      • functionName: string
      • OptionalinfoFields: string[]

      Returns boolean

    • Parameters

      • fieldName: string
      • port: any
      • OptionalinfoFields: string[]

      Returns boolean

    • Observes field changes with scope

      Parameters

      • fieldName: string
      • functionName: string
      • OptionalinfoFields: string[]

      Returns boolean

    • Parameters

      • fieldName: string
      • functionName: Function
      • OptionalinfoFields: string[]

      Returns boolean

    • Parameters

      • fieldName: string
      • port: ISGROMessagePort
      • OptionalinfoFields: string[]

      Returns boolean

      Use observeFieldScopedEx for scoped message-port registration.

    • Registers a scoped port observer. Returns false without registering when Roku's Ex API is unavailable.

      Parameters

      • fieldName: string
      • port: ISGROMessagePort
      • OptionalinfoFields: string[]

      Returns boolean

    • Gets parent subtype

      Parameters

      • nodeType: string

      Returns string

    • Queues field updates

      Parameters

      • queueNode: boolean

      Returns boolean

    • Removes child node at index

      Parameters

      • index: number

      Returns boolean

    • Removes multiple child nodes at index

      Parameters

      • num_children: number
      • index: number

      Returns boolean

    • Removes field

      Parameters

      • fieldName: string

      Returns boolean

    • Removes multiple fields

      Parameters

      • fieldNames: any

      Returns boolean

    • Changes node parent

      Parameters

      • newParent: ISGNNode
      • adjustTransform: boolean

      Returns boolean

    • Replaces multiple child nodes at index

      Parameters

      • child_nodes: any
      • index: number

      Returns boolean

    • Gets scene sub-item bounding rect

      Parameters

      • itemnumber: string

      Returns I2DRectangle

    • Sets field value

      Parameters

      • fieldName: string
      • value: any

      Returns boolean

    • Sets multiple field values

      Parameters

      • fields: any

      Returns boolean

    • Sets node focus

      Parameters

      • on: boolean

      Returns boolean

    • Sets HTTP agent

      Parameters

      • HTTP_agent: any

      Returns boolean

    • Signals beacon

      Parameters

      • beacon: string

      Returns number

    • Gets sub-item bounding rect

      Parameters

      • itemnumber: string

      Returns I2DRectangle

    • Gets node subtype

      Returns string

    • Stops observing field

      Parameters

      • fieldName: string

      Returns boolean

    • Stops observing scoped field

      Parameters

      • fieldName: string

      Returns boolean

    • Updates node fields

      Parameters

      • fields: any
      • OptionaladdFields: boolean

      Returns any