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

    RemoteDebugClient provides methods for handling remote debug commands and updating debug state.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    _keyEventNotificationsEnabled: boolean = false
    appId: string = ''
    appName: string = ''
    assignedPort?: number
    assignPortConnectionTimeoutMs?: number

    If set, sent to management server on assign-port so server releases port if WebSocket never connects within this ms.

    connectionOpenListeners: (() => void)[] = []

    Subscribers notified when the WebSocket opens (and immediately if already connected).

    debugUrl: string = ''
    deviceAppServerPort: number = 59152
    isConnected: boolean = false
    managementServerPort: number = 59150
    reconnectAttempts: number = 0
    registry: IDeviceRegistry = ...
    webAppServerPort: number = 59151
    wsClient?: IWebSocketClient

    Methods

    • Register a callback when the remote debug WebSocket connects (or immediately if already connected). Used to flush early remote.log() calls that occur before on_open.

      Parameters

      • listener: () => void

      Returns void

    • Parameters

      • app: BaseApp.BaseApp
      • OptionalwebAppServerPort: number
      • OptionaldeviceAppServerPort: number
      • OptionalassignPortConnectionTimeoutMs: number
      • OptionalconfigAppName: string
      • OptionalmanagementServerPort: number

      Returns void

    • Starts the remote debugger by initializing and connecting the WebSocketClient. Requests port assignment from the management server for multi-app support unless the caller supplies an explicit direct port.

      Parameters

      • ip: string
      • Optionalport: number

      Returns void

    • Connects to a specific port

      Parameters

      • ip: string
      • port: number

      Returns void

    • Requests port assignment from management server and connects

      Parameters

      • ip: string
      • appType: "device" | "web"

      Returns void

    • Returns DebugFileSystemUtil

    • Returns void

    • OUT: Dispatches a remote debug command to the debugger, via the WebSocket.

      Parameters

      Returns void

    • Returns string

    • Extracts a human-readable app name from the appId (removes timestamp suffix)

      Returns string

    • Gets the app type based on platform

      Returns "device" | "web"

    • Parameters

      • field: "os" | "platformId"

      Returns undefined | string

    • Returns TV

    • Returns string

    • Returns boolean

    • Returns boolean

    • Parameters

      • Optionalrecorder: string

      Returns {
          requiredBuildFlag?:
              | "REMOTE_DEBUG_CV_RECORDING"
              | "REMOTE_DEBUG_SCREEN_RECORDING";
          supported: boolean;
          warning?: string;
      }

    • Returns undefined | string

    • Registers this client as the focus-dev-relay so FocusManager stays debugger-agnostic. Called from configure() alongside app/scene setup (same lifecycle as injected focusManager).

      Returns void

    • IN: Handles an incoming debug command from the remote debugger, via the WebSocket.

      Parameters

      Returns void

    • Focus relay: called when focused view changes (from FocusManager via focus-dev-relay).

      Parameters

      • focus: FocusSnapshotRelayPayload

      Returns void

    • Focus relay: called when a key is pressed (from FocusManager via focus-dev-relay).

      Parameters

      • keyName: string
      • focus: FocusSnapshotRelayPayload

      Returns void

    • Resolves the BaseApp instance via fallback chain: this.app → GetGlobalAA().app → IoC container. Uses Hosanna's Roku-compatible global AA.

      Returns undefined | BaseApp.BaseApp

      BaseApp instance or undefined if not available

    • Resolves a view by _hid or id using a fallback chain:

      1. Direct lookup via getSubViewByHid
      2. SG node lookup → boundView._hid resolution
      3. CollectionView child lookup

      Parameters

      • rawId: string

        The _hid or id to search for

      • appView: BaseView.BaseView<ViewState>

        The root app view to search within

      Returns undefined | { _hid: string; view: BaseView.BaseView<ViewState> }

      The resolved view and its _hid, or undefined if not found

    • Type Parameters

      • T extends keyof RemoteDebugResponsePayloadMap

      Parameters

      • command: T
      • data: RemoteDebugResponsePayloadMap[T]

      Returns void

    • Type Parameters

      • T extends keyof RemoteDebugResponsePayloadMap

      Parameters

      • command: T
      • response: {
            then: (
                onFulfilled: (payload: RemoteDebugResponsePayloadMap[T]) => void,
                onRejected: (error: unknown) => void,
            ) => unknown;
        }
      • OptionalrequestId: string

      Returns void

    • Parameters

      • enabled: boolean

      Returns void