@viviedu/applet-sdk
    Preparing search index...

    Function newClientApplet

    • Initialise a new ClientApplet<Msg, Params> instance. Will error if called in a box applet.

      Due to limitations in Typescript, this function needs to be called in two steps so that Msg & Params can be specified explicitly without breaking inferences for the requiredFeatures option.

      • The generic Msg should be set to the type of the applet-messages to send and receive between.
      • The optional generic Params should be set to the type of the custom parameters that were passed to the applet on start. (from the startApplet message).

      Type Parameters

      • Msg
      • Params extends BaseParams = never

      Returns <
          const ReqFeats extends
              readonly (
                  | "client-badge"
                  | "client-can-leave-room"
                  | "client-captions"
                  | "client-clipboard"
                  | "client-cloud-exports"
                  | "client-edge-ai"
                  | "client-download-files"
                  | "client-downloads-images"
                  | "client-downloads"
                  | "client-events"
                  | "client-get-room-student-lock"
                  | "client-ip-discovery"
                  | "client-microphone"
                  | "client-navigate-home"
                  | "client-open-in-browser"
                  | "client-platform-info"
                  | "client-play-content-control"
                  | "client-privacy-mode"
                  | "client-room-access-mode"
                  | "client-screen-share-control"
                  | "client-screen-share-intercept"
                  | "client-signage-lock"
                  | "client-stop-applet"
                  | "client-storage"
                  | "client-student-control"
                  | "client-timer-controls"
                  | "client-token"
                  | "client-tts"
                  | "client-user-name"
                  | "client-user-roles-listing"
                  | "client-view-mode"
              )[] = [],
      >(
          opts?: ClientAppletOptions<ReqFeats>,
      ) => Promise<ClientApplet<Msg, Params, ReqFeats[number]>>