API - Play

    API - Play


    Article summary

    play(data : ShopLivePlayerData)

    Play the video using ShopLivePlayerData.

    play(data : ShopLivePlayerData)
    

    ShopLivePlayerData

    Parameter

    Description

    campaignKey

    CampaignKey of the video to be played(required)

    keepWindowStateOnPlayExecuted

    Whether  to start playing while maintaining th current mode of the playing player style. (Default : false)


    true: Keeps the current style of the player


    false: Turns to FullScreen

    referrer

    Parameter for collecting data of how customer joined the campaign (optional)

    campaignHandler

    ((ShopLivePlayerCampaign) -> ())?


    Listen to ShopLive Campaign data

    brandHandler

    ((ShopLivePlayerBrand) -> ())?


    Listen to ShopLive Campaign Brand data

    isEnabledVolumeKey

    A feature has been added to the preview that allows it to be unmuted based on devices’s volume(default : false)

    📘In an Objective-C environment, please use the ShopLivePlayerDataObjc object.

    ShopLivePlayerCampaign

    Parameter

    Description

    title

    Campaign title

    campaignStatus

    Campaign status (READY, ONAIR, CLOSED)

    ShopLivePlayerBrand

    Parameter

    Description

    name

    Brand name

    identifier

    Brand identifier

    imageUrl

    Thumbnail address of Brand

    sample code

    ShopLive.play(data:.init(campaignKey: "{CampaignKey}", keepWindowStateOnPlayExecuted: true, referrer: "{referrer}", campaignHandler : ((ShopLivePlayerCampaign) -> ())? = nil, brandHandler : ((ShopLivePlayerBrand) -> ())? = nil, isMuted : Bool? = nil))

    preview(data : ShopLivePlayerData,completion:)

    Play the preview using ShopLivePlayerData.

    preview(data : ShopLivePlayerData,completion: (() -> Void)?)
    

    ShopLivePlayerData

    Parameter

    Description

    campaignKey

    CampaignKey of the video to be played (required)

    keepWindowStateOnPlayExecuted

    Whether  to start playing while maintaining th current mode of the playing player style. (Default : false)


    true: Keeps the current style of the player


    false: Turns to InAppPip

    referrer

    Parameter for collecting data of how customer joined the campaign (optional)

    campaignHandler

    ((ShopLivePlayerCampaign) -> ())?


    Listen to ShopLive Campaign data

    brandHandler

    ((ShopLivePlayerBrand) -> ())?


    Listen to ShopLive Campaign Brand data

    isEnabledVolumeKey

    A feature has been added to the preview that allows it to be unmuted based on devices’s volume(default : false)

    isMuted

    use to mute or unmute Preview

    📘In an Objective-C environment, please use the ShopLivePlayerDataObjc object.

    SampleCode

    ShopLive.preview(data:.init(campaignKey: "{CampaignKey}", keepWindowStateOnPlayExecuted: true, referrer: "{진입경로}", campaignHandler : ((ShopLivePlayerCampaign) -> ())? = nil, brandHandler : ((ShopLivePlayerBrand) -> ())? = nil, isMuted : Bool? = nil),completion : nil)

    close()

    End the video currently being watched.

    sample code


    ShopLive.close()
    


    What's Next