bambuser / bambuser-livevideoshoppingplayer-sdk-ios

This SDK helps you add a Bambuser live shopping player to your UIKit and SwiftUI apps.
8 stars 2 forks source link

Matas feedback - Unable to remove UI overlay #8

Closed JesperBerthelsen closed 2 years ago

JesperBerthelsen commented 2 years ago

We are unable to remove the chat, products and ”…” buttons in “small mode”

JesperBerthelsen commented 2 years ago

Your anwer: If you want to toggle between hiding and showing the UI overlay you can do that by: Hiding:

playerView.invoke(.hideUI, completion: {_ in // do stuff }) showing:

playerView.invoke(.showUI, completion: {_ in // do stuff }) and if you want to hide it right from the start of playback you could do something like this in your event handler:

if eventInfo.event == .playerDidBecomeReady { self.playerView.invoke(.hideUI, completion: {_ in // do stuff }) } In a coming release(probably already in the next) we are adding to the .hideUI call the possibility to specify which parts of the UI to hide.

JesperBerthelsen commented 2 years ago

Thanks we will check up on this :-)

ken-bam commented 2 years ago

We have change the interface of the .hideUI call. It now takes a PlayerUISections struct as input. Now it is possible to hide only certain parts of the UI. E.g you could do something like this to toggle emojis hidden / visible:

if hiddenState == false {
    self.playerView.invoke(.hideUI(sections: PlayerUISections(emojis: .hidden)), completion: {_ in
        self.hiddenState = true
    })
} else {
    self.playerView.invoke(.showUI, completion: {_ in
        self.hiddenState = false
    })
}

to hide everything as before use the PlayerUISections.allHidden and do .hideUI(sections: .allHidden).

JesperBerthelsen commented 2 years ago

Thanks

ken-bam commented 2 years ago

I will close this issue. It is possible to hide the complete UI overlay and we have added the options to hide only parts of it.