API - Play

    API - Play


    Article summary

    play

    Play the video using the ShopLivePlayerData.

    play(data : ShopLivePlayerData)

    ShopLivePlayerData

    Parameter name

    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, use the ShopLivePlayerDataObjc object.

    ShopLivePlayerCampaign

    Parameter name

    Description

    title

    Campaign title

    campaignStatus

    Campaign status (READY, ONAIR, CLOSED)

    ShopLivePlayerBrand

    Parameter name

    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

    Play the preview using the ShopLivePlayerData.

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

    ShopLivePlayerData

    Parameter name

    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, use the ShopLivePlayerDataObjc object.

    Sample code

    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