in amazon-ivs-optimizations-ios-demo/Views/InfoPillsStackView.swift [43:78]
func setup() {
guard let playerInfo = subviews[0] as? InfoView else { return }
playerInfo.fill(
with: "Player",
value: "Amazon IVS \(delegate?.player?.version ?? "-")",
prefferedTitleWidth: 55
)
updateTTVLabel(to: nil)
switch delegate?.technique {
case .RebufferToLive:
let info = subviews[2] as! InfoView
info.fill(
with: "Rebuffer to Live",
value: "true",
prefferedTitleWidth: 130
)
case .CatchUpToLive:
updateSpeedLabel(to: nil)
case .PreCaching:
let info = subviews[2] as! InfoView
info.fill(
with: "Pre-cached",
value: "true",
prefferedTitleWidth: 100
)
case .none:
break
}
updateBufferSizeLabel(to: nil)
updateLatencyLabel(to: nil)
layoutIfNeeded()
}