LiSA Social Commerce
Developers
Developers
  • Developers
  • Guides
    • Integration Guide
      • Web Integration
      • App Integration
        • Android
          • Communication
          • Storage
          • File Downloads
          • Theming
        • iOS
          • Communication
          • Storage
          • File Downloads
          • Theming
        • React Native
          • Communication
          • Storage
          • File Downloads
          • Theming
        • Picture in Picture
      • Entrypoints
        • Query Parameter (v1)
    • Player Communication
      • Message API Reference
        • App
          • App — Heartbeat
          • App — Message Acknowledge
          • App — Message Error
          • App — Listen
        • CTA
          • CTA — Link in Comments
          • CTA — Sponsor Badge
        • Cart — View Cart
        • Comments — Join
        • Media
          • Media — Complete
          • Media — Pause
          • Media — Progress
          • Media — Resume
        • Media Item
          • Media Item — Emoji
          • Media Item — Impression
        • Player
          • Player — Dismiss
          • Player — Native Picture-in-Picture (PiP)
          • Player — Pass Visual Viewport
          • Player — Request Visual Viewport
          • Player — UI Transition
        • Products
          • Products — Add to Cart
          • Products — Add to Wishlist
          • Products — Click
          • Products — Close Product List
          • Products — Emoji
          • Products — Emoji State Update
          • Products — Impression
          • Products — Open Product List
        • Stickers
          • Stickers — Activate
          • Stickers — Click
          • Stickers — Expire
          • Stickers — Impression
          • Stickers — Publish
          • Stickers — Unlock
          • Stickers — Unpublish
          • Stickers — Update
          • Stickers — Voucher Claim
        • Visitor — Pass User Context
        • Shared Legacy Message Properties
    • Products
      • Product Update Notification API
  • Widgets
    • Content Hub
    • Quick Start Guide
    • Appearance
      • Markup
      • Responsive design
    • Configuration options
      • Autoplay
      • Channel
      • Client
      • Data
      • Debug
      • Host node
      • Layout
      • Language
      • On
      • Player
      • Query string
      • Quick view
      • Sections
      • Store
      • Template
    • API reference
      • Library API reference
      • Player API reference
      • Quick View API reference
    • Customisations
      • Template
      • Bring your own template
      • Type definitions
    • Examples
    • Type definitions
      • Asset
      • Product
      • Other
    • Promo Widget
      • Quick Start Guide
      • Configuration options
        • Autoplay
        • Channel
        • Countdown (deprecated)
        • Enabled
        • Image modifier
        • Lead time
        • Live (deprecated)
        • Position
        • Replay (deprecated)
        • Show ID
        • URL
  • Media Player Introduction
    • Picture-in-Picture Mode
  • Analytics
  • REST API
    • Authentication
    • Rate limits
    • Response status and error codes
    • API Documentation
Powered by GitBook
On this page
  • Type definition
  • Automatic show selection
  • Individual show selection
  • Query parameter lisa_autoplay
  1. Widgets
  2. Configuration options

Autoplay

The optional autoplay option automatically launches a show without a viewer having to actively click a library item. autoplay accepts either a boolean value or a callback function.

Type definition

type Autoplay =
  | boolean
  | ((sources: ComposedShow[], library: Library) => string | undefined);

Automatic show selection

window.LiSA.library.configs.push({
  autoplay: true,
});

If autoplay is set to true, LiSA Library selects the show to be launched automatically by applying the following checks in their order of priority as listed below:

The next upcoming show that is scheduled between T - 1 hour and T + 3 hours — with T being the current time.

If 1. does not apply to any show, the most recent show that was scheduled T - 48 hours and T is selected — with T being the current time.

If neither 1. or 2. apply, the next upcoming show is selected.

If no upcoming show is available, the most recent show not matching Rule 2. is selected.

If none of the above rules apply, LiSA Library will not launch any show automatically.

Individual show selection

window.LiSA.library.configs.push({
  autoplay: (shows, library) => {
    return shows.find((show) => {
      /* your code goes here... */
    })
  },
});

You can also provide a callback function to select the desired show, applying custom logic. The callback function accepts an iterable collection of shows and the library instance. It's return value is either the desired show's identifier (id) or undefined, if the desired your requirements do not apply to any of the shows.

Query parameter lisa_autoplay

In addition to launching a show using the autoplay option, LiSA Library also checks your content page URL's query string for the lisa_autoplay parameter.

Example: https://your-storefront.com/live-shopping?lisa_autoplay=a0377e94-0f09-4cb7-a630-f5b2c3df74ed

In this example LiSA Library automatically launches the show with the ID a0377e94-0f09-4cb7-a630-f5b2c3df74ed either in an overlay or an embedded player (stage) — irrelevant of that particular show being listed in the library or not.

PreviousConfiguration optionsNextChannel

Last updated 1 year ago