GuidesAPI GuideChangelog
Log In
Guides

Payload Definition

This document explains how to define the payload object used when initializing the Saucelive player library.

setInit

ParametersTypeRequireDescription
broadcastIdStringtrueBroadcast ID
envStringfalseIf not used, it will be treated as an internal operation.example('stage')
platformStringfalse'CAFE24' \'SHOPBY' This value is used for simplified e-commerce integration.

For a practical example of how this works, refer to Basic Usage of the Library.

setFloatingType

Parameters

Type

Require

Description

type

'scroll' | 'basic'

true

This defines the floating player type.

size

width?: string; height?: String

false

Specifies the size of the floating player. The value follows standard CSS sizing.

restrictionArea

element?: HTMLElement;
elementId?: String;

false

Specifies the HTML element that can be used as the draggable area. Only one of the two options can be used.

position

position:String; offsetX?:number; offsetY?:number;

false

Must be configured as an Object. The position value can be set to one of the following: 'top left', 'top right', 'bottom left', or 'bottom right'. The floating element will be placed at the specified position with a 20px offset from the edge. If additional fine adjustment is needed, offsetX and offsetY can be used to adjust the position from the specified location.

buttonList

string[]

false

When adding buttonList, it must be defined as an Array parameter. You can specify 'exit' for the close button or 'fullscreen' for the fullscreen button in the Array. Only one option can be set.

For a practical example of how this works, refer to Floating Player Feature .

setMemberObject

ParametersTypeRequireDescription
nickNameStringtrueThe nickname displayed in the chat window.
memberIdStringtrueThe partner’s unique member ID.
genderStringfalseGender data.
memberType"0" \"1"falseA value of 1 indicates a registered member; 0 indicates a guest.
ageStringfalseAge data.

For a practical example of how this works, refer to Authentication with the Player Library .

setMemberToken

ParametersTypeRequireDescription
XStringtrueJWT Token

For a practical example of how this works, refer to Authentication with the Player Library.