Step9. Campaign preview

    Step9. Campaign preview


    Article summary

    You can start a live broadcast in in-app PIP mode with the muted audio.

    ShopLivePlayerPreviewData

    Property name

    Type

    Description

    campaignKey

    String

    Campaign (broadcast) key of the video to be played (required)

    useCloseButton

    bool

    Enables the close button. (Default: false)

    referrer

    String?

    Parameter used to track entry source statistics

    enableSwipeOut

    bool

    Determines whether the in-app PIP can be dismissed by swiping it off the screen. (Default: true)

    pipRadius

    double?

    Sets the InAppPipRadius. (Default: 10)

    pipMaxSize

    double?

    Sets the maximum size of the in-app PIP

    marginTop

    double?

    Sets the top margin

    marginBottom

    double?

    Sets the bottom margin

    marginLeft

    double?

    Sets the left margin

    position

    String?

    Sets the initial position of the in-app PIP (e.g. "TOP_LEFT", "TOP_RIGHT", "BOTTOM_LEFT", "BOTTOM_RIGHT")

    late final _shopLivePlayerPlugin = ShopLivePlayer();
    _shopLivePlayerPlugin.showPreview(data: data);
    _shopLivePlayer.showPreview(
      data: ShopLivePlayerPreviewData(
        campaignKey: "CampaignKey",
        useCloseButton: true,
        enableSwipeOut: true,
        pipRadius: 10,
        pipMaxSize: 400,
        marginTop: 10,
        marginBottom: 10,
        marginLeft: 10,
        marginRight: 10,
        position: "TOP_LEFT",
      ),
    );