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
  • Properties
  • Type Definition
  1. Guides
  2. Player Communication
  3. Message API Reference

Media

PreviousComments — JoinNextMedia — Complete

Last updated 3 months ago

The LiSA Player facilitates two-way communication by both sending and receiving messages related to media playback, ensuring synchronization with the host app or environment. These messages include:

  • — Can be sent by the player to indicate that playback has been paused or received to trigger a pause.

  • — Sent by the player to report the current playback position.

  • — Can be sent by the player to indicate playback has begun or resumed or received to trigger resumption.

  • — Sent by the player to indicate that media playback has ended.

While Pause and Resume messages can be both sent by the host app to control playback and sent by the player to reflect playback state changes, the other messages are exclusively sent by the LiSA Player to the host app/environment:

Properties

Along with all standard , a Media message includes the following additional properties:

Name
Type
Description

mediaItemId

Required.

The mediaItemId property uniquely identifies the Media Item from which this message originates.

mediaItemType

Required.

progress

Required.

For messages sent by the host app or environment, the mediaItemId, mediaItemType and progress properties can be omitted.

Legacy Properties

If your integration uses LiSA Player Version 1, none of the properties described above will be available.

For LiSA Player Version 2, legacy properties can be ignored.

Name
Type
Description

action

Required.

target

Required.


Type Definition

interface MediaMessage extends Omit<Message, 'messageType' | 'sender'> {
  messageType:
    | 'lsc:media:pause'
    | 'lsc:media:progress'
    | 'lsc:media:resume'
    | 'lsc:media:start'
    | 'lsc:media:stop';
  progress: MediaProgress;
}

Media Progress

The MediaProgress object provides detailed playback state information for a media item, including live streams, replays, and stories. It tracks the current playback position, buffering status, and total time spent on the media.

Name
Type
Description

bufferedTimeInMs

Required.

The bufferedTimeInMs property represents the amount of media content, in milliseconds, that has been buffered beyond the current playback position.

  • For on-demand content (e.g., replays, stories), this represents the duration of buffered media ahead of the current playback position.

  • For live streams, this value is always 0 since playback happens in real time without pre-buffering.

currentTimeInMs

Required.

The currentTimeInMs property represents the current playback position of the media item, measured in milliseconds from the start.

  • For on-demand content (e.g., replays, stories), this value indicates the exact position the user is watching.

  • For live streams, this value represents the current timestamp relative to the live broadcast

durationInMs

Required.

The durationInMs property represents the total duration of the media item, measured in milliseconds.

  • For on-demand content (e.g., replays, stories), this value reflects the full length of the media item.

  • For live media items, this value is always -1, as the total duration is undefined while the stream is ongoing.

elapsedTimeInMs

Required.

The elapsedTimeInMs property represents the total accumulated playback time, in milliseconds, since the media started playing.

  • This includes any time added when a user seeks forward or backward in the media.

  • It does not reset when seeking but continues to track the total time spent playing the media.

  • For live streams, this value reflects the time spent watching the stream, independent of the actual live position.

isLive

Required.

The isLive property indicates whether the media item is a live stream.

  • true – The media item is a live stream, meaning playback occurs in real time.

  • false – The media item is not live (e.g., a replay or story).

isPlaying

Required.

The isPlaying property indicates, whether the current media item is playing or paused.

skipTimeInMs

Required.

The skipTimeInMs property represents the amount of time, in milliseconds, that is skipped at the beginning of a live stream recording.

  • This can be used to bypass countdown intro video segments or other non-essential content in recordings of live streams.

  • The skipped time does not affect the actual media duration but adjusts the playback start position when viewing the recording.

visitorDwellTimeInMs

Required.

The visitorDwellTimeInMs property represents the total time, in milliseconds, that a visitor has spent on the current media item, including any paused segments.

  • This value accumulates even when the media is paused, reflecting the total time the visitor remained on the media item.

  • It is independent of elapsedTimeInMs, which tracks only active playback time.

interface MediaProgress {
  bufferedTimeInMs: number;
  currentTimeInMs: number;
  durationInMs: number;
  elapsedTimeInMs: number;
  isLive: boolean;
  isPlaying: boolean;
  skipTimeInMs: boolean;
  visitorDwellTimeInMs: boolean;
}

The mediaItemType property specifies the type of Media Item from which this message originates. Refer to for detailed information.

The progress property is an object that holds additional metadata related to the media playback progress of the current media item. Please refer to for detailed information.

The distinct action of the player message. Please use messageType instead.

app or player Please use messageType instead.

String
MediaItemType
MediaProgress
Literal
Literal
Number
Number
Number
Number
Boolean
Boolean
MediaProgress
Number
⚠️
⚠️
MediaProgress
Pause
Progress
Resume
Complete
Message properties
MediaItemType