Media Item

The LiSA Player communicates key events related to the current media item by dispatching various messages:

  • Creator Join — Notifies when a creator enters a live stream.

  • Creator Leave — Notifies when a creator exists a live stream.

  • Emoji — Captures user reactions through emoji interactions.

  • Impression — Indicates when a media item has been viewed.

This message is sent by the LiSA Player to the host app / environment.

Properties

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

Name
Type
Description

mediaItemId

string

Required.

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

mediaItemType

MediaItemType

Required.

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

messageType

Literal

Required.

The messageType property specifies the distinct type of message.

progress

MediaProgress

Required.

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


Type Definition

interface MediaItemMessage extends Omit<
  Message,
  'messageType' | 'sender'
> {

  mediaItemId: string;
  mediaItemType: MediaItemType;
  messageType:
    | 'lsc:media:creator:join'
    | 'lsc:media:creator:leave'
    | 'lsc:media:emoji'
    | 'lsc:media:impression';
  progress: MediaProgress;
  sender: 'LiSA';
}

Type Definitions

Media Item Type

The MediaItemType property is an enum that defines the type of media item. It helps differentiate between live content, recorded replays, and short-form media.

  • live – A real-time live stream with an undefined duration (durationInMs = -1).

  • replay – A recorded playback of a previous live stream with a fixed duration.

  • story – A short-form media item, typically with a defined duration and limited availability.

type MediaItemType = 'live' | 'replay' | 'story';

Last updated