- Print
API - Shortform
- Print
Play - Shortform Detail View
ShopLiveShortform.play(context: Context, requestData: ShopLiveShortformCollectionData? = null)
Play the Shortform detail view. (Plays the playlist associated with the ShopLiveShortformCollectionData
.)
You can play the related detail view by entering one or more of the field values of ShopLiveShortformCollectionData
.
If ShopLiveShortformCollectionData
is null, you can play the entire detail view.
ShopLiveShortformCollectionData
field
type
description
shortsId
String?
Shortform unique identifier
shortsSrn
String?
This is the global resource name assigned to Shortform for resource management. It is an internally used value in Shoplive.
tags
List?
Value for related tag search
tagSearchOperator
ShopLiveShortformTagSearchOperator?
Tag search options
OR
: integrated searchAND
: cross search
brands
List?
Value for related brand search (searching both title and identifier)
shuffle
Boolean?
Value for random playback (Default:
false
)referrer
String?
Value for tracking the path
Shortform Detail View - Entire
Shortform Detail View - Playback after clicking on the list
Shortform Detail View - Playback after clicking on the related tag list
Shortform Detail View - Playback after clicking on the related brand list
Shortform Detail View - Playback of related tag
Shortform Detail View - Playback of related brand
Compose detailed intent for short-form content
ShopLiveShortform.intent(context: Context, requestData: ShopLiveShortformCollectionData? = null)
Provides an intent to play the Shortform detailed view (playlists associated with ShopLiveShortformCollectionData
)
You can play the related detail view by entering one or more of the field values of ShopLiveShortformCollectionData
.
If ShopLiveShortformCollectionData
is null, you can play the entire detail view.
ShopLiveShortformCollectionData
field
type
description
shortsId
String?
Shortform unique identifier
shortsSrn
String?
This is the global resource name assigned to Shortform for resource management. It is an internally used value in Shoplive.
tags
List?
Value for related tag search
tagSearchOperator
ShopLiveShortformTagSearchOperator?
Tag search options
OR
: integrated searchAND
: cross search
brands
List?
Value for related brand search (searching both title and identifier)
shuffle
Boolean?
Value for random playback (Default:
false
)referrer
String?
Value for tracking the path
Shortform Detail View - Playback after clicking on the list
Shortform Detail View - Playback after clicking on the related tag list
Shortform Detail View - Playback after clicking on the related brand list
Shortform Detail View - Playback of related tag
Shortform Detail View - Playback of related brand
Close detail view
Close Shortform detail view.
Hide Button on Detail View
Configure whether to show buttons on the Shortform detail view screen.
ShopLiveShortfromVisibleFullTypeData
field
type
description
isLikeButtonVisible
Boolean
You can hide the like button. (Default:
true)
isCommentButtonVisible
Boolean
You can hide the comment button. (Default:
true)
isShareButtonVisible
Boolean
You can hide the share button. (Default:
true)
isBookmarkVisible
Boolean
You can hide the bookmark button. (Default:
true)
Play - Shortform Preview
ShopLiveShortform.showPreview(activity: Activity, data: ShopLiveShortformRelatedData)
Play the Shortform preview. (Playlist associated with ShopLiveShortformRelatedData
)
You can play the related preview by entering one or more of the field values of ShopLiveShortformRelatedData
.
ShopLiveShortformRelatedData
field
type
description
productId
Long?
Unique ID of the product, automatically issued upon product registration
sku
String?
Unique SKU information of the product
name
String?
Product name
url
String?
URL of the product's detailed page
tags
List?
Value for related tag search
tagSearchOperator
ShopLiveShortformTagSearchOperator?
Tag search options
OR
: integrated searchAND
: cross search
brands
List?
Value for related brand search (searching both title and identifier)
shuffle
Boolean
Value for random playback (Default:
false
)referrer
String?
Value for tracking the path
ShopLiveShortformPreviewData
field
type
description
width
Int? (px)
width of shortform preview (Default: 180dp)
height
Int? (px)
height of shortform preview (Default: 180dp)
marginTop
Int? (px)
marginTop of shortform preview (Default: 16dp)
marginBottom
Int? (px)
marginBottom of shortform preview (Default: 16dp)
marginLeft
Int? (px)
marginLeft of shortform preview (Default: 16dp)
marginRight
Int? (px)
marginRight of shortform preview (Default: 16dp)
radius
Int? (px)
radius of shortform preview (Default: 10dp)
isMuted
Bool?
This is used to set the mute option for shortform preview. (Default: false)
position
ShopLivePreviewPositionConfig?
This is used to set the initial display position for shortform preview.
(Default: ShopLivePreviewPositionConfig.BOTTOM_RIGHT)maxCount
Int?
You use this to set the number of videos to play in the preview of a shortform.
useCloseButton
Boolean?
This is used to enable or disable the x button in the top left corner of the short-form preview. (Default: true)
useCustomAction
Boolean
This is used when you want to define the click events of the shortform preview manually. (Default: false)
enableSwipeOut
Boolean?
This is used to allow or disallow closing the shortform preview by swiping it off the screen. (Default: true)
conClickListener
View.OnClickListener?
You can receive events triggered when the shortform preview is clicked.
By setting useCustomAction to true, you can define the behavior and manually handle the preview’s click events.
Shortform Preview - ProductId Based
Shortform Preview - SKU Based
Shortform Preview - Tag Based
Shortform Preview - Brand Based
Shortform Preview Close
ShopLiveShortform.hidePreview()
Close the currently running Shortform preview.
ShopLiveShortformIdsData
field
type
description
ids
List<String>?
A list of shortform IDs (up to 30 items)
currentId
String?
The item in the list that can currently be focused on
referrer
String?
A value to track the referral path
ShopLiveShortformMoreSuspendListener
function
return
description
onMore
ShopLiveShortformIdsMoreData?
A function to compose a paginated list using Coroutines
ShopLiveShortformIdsMoreData
field
type
description
ids
List<String>?
A list of shortform IDs (up to 30 items)
hasMore
Boolean?
Pagination availability
ShopLiveShortform.play(context, ShopLiveShortformIdsData().apply {
ids = "{YOUR_IDS}"
currentId = "{YOUR_CURRENT_ID}"
}, ShopLiveShortformMoreSuspendListener {
val moreResponse =
kotlin.runCatching {
"{YOUR_MORE_API_RESPONSE}"
}.getOrNull() ?: return@ShopLiveShortformMoreSuspendListener null
val ids = moreResponse.shortsList?.mapNotNull { it.shortsId } ?: emptyList()
val hasMore = moreResponse.hasMore
return@ShopLiveShortformMoreSuspendListener ShopLiveShortformIdsMoreData().apply {
this.ids = ids
this.hasMore = hasMore
}
})
ShopLiveShortformCollectionData
field
type
description
shortsId
String?
Shortform unique identifier
shortsSrn
String?
This is the global resource name assigned to Shortform for resource management. It is an internally used value in Shoplive.
tags
List?
Value for related tag search
tagSearchOperator
ShopLiveShortformTagSearchOperator?
Tag search options
OR
: integrated searchAND
: cross search
brands
List?
Value for related brand search (searching both title and identifier)
shuffle
Boolean?
Value for random playback (Default:
false
)referrer
String?
Value for tracking the path
ShopLiveShortformCollectionListener
function
description
onData(response: ShopLiveShortformCollectionResponse)
When ShopLiveShortform.get is successful, you can receive and handle the response.
onError(e: Exception)
When ShopLiveShortform.get fails, you can handle the exception.
Connect API for a hybrid environment
ShopLiveShortform.connectBridgeInterface(activity: Activity, webView: WebView)
Connects Web and SDK in a hybrid environment.
ShopLiveShortform.receiveBridgeInterface(webView: WebView)
Exchanges messages between Web and SDK in a hybrid environment.
ShopLiveShortform.updateVisitedHistory(view: WebView?, url: String?, isReload: Boolean)
You can automatically remove the preview when navigating to a web page.