Skip to main content

Theme

Theming

When you create the StreamVideoUI object, you can optionally provide your custom version of the Appearance class, which will allow you to customize things like fonts, colors, icons, and sounds used in the SDK.

Changing Colors

If you want to change the colors, you can set your own values in the Colors class:

let streamBlue = UIColor(red: 0, green: 108.0 / 255.0, blue: 255.0 / 255.0, alpha: 1)
var colors = Colors()
colors.tintColor = Color(streamBlue)
let appearance = Appearance(colors: colors)
let streamVideo = StreamVideoUI(streamVideo: streamVideo, appearance: appearance)

Changing Images

All of the images used in the SDK can be replaced with your custom ones. To customize the images, create a new instance of the Images class and update the images you want to change. For example, if you want to change the icon for hanging up, you just need to override the corresponding image property.

var images = Images()
images.hangup = Image("your_custom_hangup_icon")
let appearance = Appearance(images: images)
let streamVideoUI = StreamVideoUI(streamVideo: streamVideo, appearance: appearance)

Changing Fonts

You can provide your font to match the style of the rest of your app. In the SDK, the default system font is used, with dynamic type support. To keep this support with your custom fonts, please follow Apple's guidelines about scaling fonts automatically.

The fonts used in the SDK can be customized via the Fonts struct, which is part of the Appearance class. So, for example, if we don't want to use the bold footnote font, we can easily override it with our non-bold version.

var fonts = Fonts()
fonts.footnoteBold = Font.footnote
let appearance = Appearance(fonts: fonts)
let streamVideoUI = StreamVideoUI(streamVideo: streamVideo, appearance: appearance)

Changing Sounds

There are several sounds used throughout the video SDK, such as for incoming and outgoing calls. You can change these sounds with your custom ones, by changing the corresponding values in the Sounds class:

let sounds = Sounds()
sounds.incomingCallSound = "your_custom_sound"
let appearance = Appearance(sounds: sounds)
let streamVideoUI = StreamVideoUI(streamVideo: streamVideo, appearance: appearance)

Did you find this page helpful?