- Print
API: Shortform
- Print
Play Shortform Detail View
With the ShopLiveShortform.play(context: Context, requestData: ShopLiveShortformCollectionData? = null)
, you can play the Shortform detail view of which playlist is associated with the ShopLiveShortformCollectionData
.
You can play the related detail view by entering one or more property values of
ShopLiveShortformCollectionData
.If
ShopLiveShortformCollectionData
is null, you can play the entire detail view.
ShopLiveShortformCollectionData
Property name | Type | Description |
---|---|---|
shortsId | String? | Shortform unique identifier |
shortsCollectionId | 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
|
brands | List? | Value for related brand search (searching both title and identifier) |
shuffle | Boolean? | Value for random playback (Default: |
referrer | String? | Value for tracking the path |
Shortform Detail View: All
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
Configure Intent for short-form content in detail
With the ShopLiveShortform.intent(context: Context, requestData: ShopLiveShortformCollectionData? = null)
, you can use an intent to play the Shortform detailed view of which playlist is 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
Property name | Type | Description |
---|---|---|
shortsId | String? | Shortform unique identifier |
shortsCollectionId | 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
|
brands | List? | Value for related brand search (searching both title and identifier) |
shuffle | Boolean? | Value for random playback (Default: |
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.
ShopLiveShortformVisibleFullTypeData
Property name | Type | Description |
---|---|---|
isLikeButtonVisible | Boolean | You can hide the like button. (Default: |
isCommentButtonVisible | Boolean | You can hide the comment button. (Default: |
isShareButtonVisible | Boolean | You can hide the share button. (Default: |
isBookmarkVisible | Boolean | You can hide the bookmark button. (Default: |
Play Shortform Preview
With the ShopLiveShortform.showPreview(activity: Activity, data: ShopLiveShortformRelatedData)
, you can play the Shortform preview of which playlist is associated with the ShopLiveShortformRelatedData
.
You can play the related preview by entering one or more of the property values of
ShopLiveShortformRelatedData
.
ShopLiveShortformRelatedData
Property name | 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
|
brands | List? | Value for related brand search (searching both title and identifier) |
shuffle | Boolean | Value for random playback (Default: |
referrer | String? | Value for tracking the path |
ShopLiveShortformPreviewData
Property name | Type | Description |
---|---|---|
width | Int? (px) | The width of shortform preview (Default: 180dp) |
height | Int? (px) | The height of shortform preview (Default: 180dp) |
marginTop | Int? (px) | The marginTop of shortform preview (Default: 16dp) |
marginBottom | Int? (px) | The marginBottom of shortform preview (Default: 16dp) |
marginLeft | Int? (px) | The marginLeft of shortform preview (Default: 16dp) |
marginRight | Int? (px) | The marginRight of shortform preview (Default: 16dp) |
radius | Int? (px) | The 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
ShopLiveShortform.hidePreview
Close the currently running Shortform preview.
Create a list of shortform contents using a specific shortform ID
Coroutine
With the ShopLiveShortform.play(context: Context, shortformIdsData: ShopLiveShortformIdsData, moreSuspendListener: ShopLiveShortformMoreSuspendListener)
, you can create a playlist with the shortformId received through the short-form API and play them in order.
ShopLiveShortformIdsData
Property name | 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
Property name | Type | Description |
---|---|---|
onMore | ShopLiveShortformIdsMoreData? | A function to compose a paginated list using Coroutines |
ShopLiveShortformIdsMoreData
Property name | 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
}
})
ShopLiveShortformIdsData
Property name | 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 |
ShopLiveShortformMoreFutureListener
Property name | Type | Description |
---|---|---|
onMore | Future<ShopLiveShortformIdsMoreData?> | A function to compose a paginated list using Futures |
ShopLiveShortformIdsMoreData
Property name | Type | Description |
---|---|---|
ids | List<String>? | A list of shortform IDs (up to 30 items) |
hasMore | Boolean? | Pagination availability |
API: Invoke detailed result values
With the ShopLiveShortform.get(context: Context, collectionData: ShopLiveShortformCollectionData? = null, callback: ShopLiveShortformCollectionListener)
, you can check the results of the collection in callback format.
You can pre-process data in a reusable
RecyclerView
.
ShopLiveShortformCollectionData
Property name | Type | Description |
---|---|---|
shortsId | String? | Shortform unique identifier |
shortsCollectionId | 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
|
brands | List? | Value for related brand search (searching both title and identifier) |
shuffle | Boolean? | Value for random playback (Default: |
referrer | String? | Value for tracking the path |
ShopLiveShortformCollectionListener
Function name | 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. |
API for Web & SDK connection in a hybrid environment
With the ShopLiveShortform.connectBridgeInterface(activity: Activity, webView: WebView)
, uou can connect Web and SDK in a hybrid environment.
With the ShopLiveShortform.receiveBridgeInterface(webView: WebView)
, you can exchange messages between Web and SDK in a hybrid environment.
With the ShopLiveShortform.updateVisitedHistory(view: WebView?, url: String?, isReload: Boolean)
, you can automatically remove the preview when navigating to a web page.