foo-webview-sdk
    Preparing search index...

    Interface SmpCompatApi

    Public surface installed onto window.smp by the SMP compatibility IIFE bundle. Matches the Spider Monkey Panel contract one-to-one.

    interface SmpCompatApi {
        __smpCompatLoaded?: boolean;
        cache: SmpCompatCache;
        ready: Promise<boolean>;
        dispose(): void;
        formatHandleId(path: string, subsong?: number): string;
        invoke<TResp = unknown>(
            method: string,
            params?: JsonObject,
        ): Promise<TResp>;
        parseHandleId(handleId: string): SmpHandleId;
        refreshCache(): Promise<void>;
        stripSubsongSuffix(pathOrHandleId: string): string;
    }
    Index
    __smpCompatLoaded?: boolean

    Internal load guard; consumers should not depend on this flag.

    Reactive-ish cache of synchronous playback / playlist state.

    ready: Promise<boolean>

    Resolves once the bootstrap has populated the cache.

    • Detach every event subscription wired by the bootstrap.

      Returns void

    • Low-level invoke escape hatch (delegates to window.fb2k.invoke).

      Type Parameters

      • TResp = unknown

      Parameters

      • method: string
      • Optionalparams: JsonObject

      Returns Promise<TResp>

    • Refresh the entire cache (playback + playlists + paths).

      Returns Promise<void>

    • Drop the |subsong:N suffix from a handle id (no-op on plain paths).

      Parameters

      • pathOrHandleId: string

      Returns string