Keeping mute status

    Keeping mute status


    Article summary

    You can keep the sound state in Shoplive Player.

    messageCallback of a Mute button click

    private var isMuted = false
    override fun log(data: ShopLiveLog.Data) {
        when (data.name) {
            "video_muted" -> {
                isMuted = true
            }
            "video_unmuted" -> {
                isMuted = false
            }
        }
    }


    Pass the status settings of Mute to Shoplive Player

    private var isMuted = false
    ShopLive.setMuteWhenPlayStart(isMuted)