API: Shoplive Preview
- Print
API: Shoplive Preview
- Print
Article summary
Did you find this summary helpful?
Thank you for your feedback
You can directly implement the preview through the ShoplivePreview
or ShopliveSwipePrevew
component provided by ShopLive.
start
Start preview playback.
Parameter name | Type | Description |
---|---|---|
accessKey | String? | Customer key |
campaignKey | String? | Broadcast key |
pause
Pause the preview.
play
Play the paused preview.
release
Turn off preview.
setLifecycleObserver
By registering a LifecycleOwner
, the preview player can automatically play or pause according to the life cycle.
Parameter name | Type | Description |
---|---|---|
owner | LifecycleOwner | LifecycleOwner |
setOnCloseListener
You can receive the preview end event.
setOnDimensionRatioListener
You can get the aspect ratio of the preview screen.
useCloseButton
You can enable a Close button in Preview.
You can release the preview memory.