Keep mute status

    Keep mute status


    Article summary

    In Shoplive shortform, you can maintain the sound state. The mute function persists in the shortform details.

    messageCallback of a Mute button click

    private var isMuted = false
    override func onEvent(command: String, payload: String?) {
        switch (command) {
            case "VIDEO_MUTED":
                isMuted = true
            case "VIDEO_UNMUTED":
                isMuted = false
        }
    }


    Pass the status settings of Mute to Shoplive Player

    private var isMuted = false
    ShopLiveShortform.showPreview(
        requestData:ShopLiveShortformPreviewData(productId: productId, isMuted: isMuted)
    )


    What's Next