- Print
API: Shortform
- Print
Play Shortform Detail View
With the ShopLiveShortform.play(requestData: ShopLiveShortformCollectionData?)
, 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 | [String]? | Value for related tag search |
tagSearchOperator | ShopLiveTagSearchOperator? | Tag search options
|
brands | [String]? | Value for related brand search (searching both title and identifier) |
shuffle | Bool? // default = false | Value for random playback (Default: |
referrer | String? | Value for tracking the path |
Shortform Detail View: All
Play Shortform Preview
With the ShopLiveShortform.showPreview(requestData: ShopLiveShortformPreviewData?)
, 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 | String? | 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 | [String]? | Value for related tag search |
tagSearchOperator | ShopLiveTagSearchOperator? | Tag search options
|
brands | [String]? | Value for related brand search (searching both title and identifier) |
shuffle | Boolean? //default = false | Value for random playback (Default: |
referrer | String? | Value for tracking the path |
ShopLiveShortformPreviewData
Property name | Type | Description |
---|---|---|
previewScale | CGFloat? | |
previewRadius | CGFloat? | |
previewPosition | ShopLiveShortform.PreviewPosition? | |
previewEdgeInset | UIEdgeInset? | |
previewFloatingOffset | UIEdgeInset? | |
isMuted | Bool? | |
isEnabledVolumeKey | Bool | A feature has been added to the short-form preview that allow it to be unmuted based on the device’s volume (Default: false) |
maxCount | Int? | |
useCloseButton | Bool? | |
useCustomAction | Bool | |
enableSwipeOut | Bool? | |
clickEventCallBack | ( () → () ) ? |
Shortform Preview: ProductId Based
With the setVisibleFullTypeViews(options: ShopLiveShortformVisibleFullTypeData)
, you can configure whether to show buttons on the Shortform detail view screen. By including one or more property values of ShopLiveShortformVisibleFullTypeData
, you can also configure the visibility of related buttons.
ShopLiveShortformVisibleFullTypeData
Property name | Type | Description |
---|---|---|
isLikeButtonVisible | Bool | Hide the Like button. (Default: |
isCommentButtonVisible | Bool | Hide the Comment button. (Default: |
isShareButtonVisible | Bool | Hide the Share button. (Default: |
isBookmarkVisible | Bool | Hide the Bookmark button. (Default: |
Detailed shortform list - composed with a specific shortform ID
With the ShopLiveShortform.play(shortformIdsData: ShopLiveShortformIdsData, delegate: ShortsCollectionViewDataSourceRequestDelegate)
, you can compose a playlist using the shortformId
received via the shortform API and play them in order.
ShopLiveShortformIdsData
Property name | Type | Description |
---|---|---|
ids | [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 |
ShortsCollectionViewDataSourcRequestDelegate
protocol ShortsCollectionViewDataSourceDelegate : AnyObject {
func onShortformListPagination(completion : @escaping((ShopLiveShortformIdsMoreData?,Error?) -> ()))
func onShortformListPaginationError(error : Error)
}
The onShortformListPagination(completion:_)
function is called when there are no more shortform IDs to display. In such cases, you can continue to supply shortform IDs continuously by using completion(ShopLiveShortformIdsMoreData)
.
ShopLiveShortformIdsMoreData
Property name | Type | Description |
---|---|---|
ids | [String]? | A list of shortform IDs (up to 30 items) |
hasMore | Bool? | Pagination availability |
Shortform Detail: Keep video ratio
ShopLiveShortform.setResizeMode(options : ShopLiveResizeMode)
With the ShopLiveShortform.setResizeMode(options: ShopLiveResizeMode)
, you can maintain the aspect ratio of the video. (Default: .CENTER_CROP)
API for Web & SDK connection in a hybrid environment
With the ShopLiveShortform.BridgeInterface.connect(_webview: WKWebView)
, you can connect Web and SDK in a hybrid environment.
ShopLiveShortform.BridgeInterface.connect(webview)
ShopLiveShortform.Delegate.setDelegate(_ handler: ShopLiveShortformReceiveHandlerDelegate?)
With the ShopLiveShortform.Delegate.setDelegate(_handler: ShopLiveShortformReceiveHandlerDelegate?)
, you can exchange messages between Web and SDK in a hybrid environment.