in amazon-ivs-optimizations-ios-demo/Controllers/PlayerViewController.swift [164:182]
func player(_ player: IVSPlayer, didChangeState state: IVSPlayer.State) {
switch state {
case .ready:
bufferIndicator.stopAnimating()
infoViewsStackView.setup()
player.play()
case .playing:
bufferIndicator.stopAnimating()
setTTV()
case .buffering:
bufferIndicator.startAnimating()
default:
bufferIndicator.stopAnimating()
}
}