Live captions - iOS
On iOS, AVPlayer
has built-in support for live video with captions. Users can automatically turn on captions via System Preferences. The easiest way to stream a live video is through AVPlayerViewController
.
guard let url = URL(string: "https://appt.org/live-video") else {
return
}
let player = AVPlayer(url: url)
let playerViewController = AVPlayerViewController()
playerViewController.player = player
present(playerViewController, animated: true) {
player.play()
}