Payload Definition
This document explains how to define the payload object used when initializing the Saucelive player library.
setInit
| Parameters | Type | Require | Description | |
|---|---|---|---|---|
| broadcastId | String | true | Broadcast ID | |
| env | String | false | If not used, it will be treated as an internal operation.example('stage') | |
| platform | String | false | '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; | 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
| Parameters | Type | Require | Description | |
|---|---|---|---|---|
| nickName | String | true | The nickname displayed in the chat window. | |
| memberId | String | true | The partner’s unique member ID. | |
| gender | String | false | Gender data. | |
| memberType | "0" \ | "1" | false | A value of 1 indicates a registered member; 0 indicates a guest. |
| age | String | false | Age data. |
For a practical example of how this works, refer to Authentication with the Player Library .
setMemberToken
| Parameters | Type | Require | Description |
|---|---|---|---|
| X | String | true | JWT Token |
For a practical example of how this works, refer to Authentication with the Player Library.
Updated 8 days ago