A Swift library for displaying SRT subtitles on iOS AVPlayerViewController with easy integration.
AVPlayerViewController-Subtitles is a Swift library that adds subtitle display capabilities to iOS's AVPlayerViewController. It solves the problem of integrating SRT subtitle files into video playback, making it easier for developers to create accessible and multilingual video experiences in their apps.
iOS developers building video playback features in Swift who need to support subtitles for accessibility or localization purposes.
Developers choose this library because it provides a straightforward, lightweight solution specifically for AVPlayerViewController, avoiding the complexity of building subtitle parsing and rendering from scratch.
Easy way to show SRT files on AVPlayerViewController
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
The library provides a simple API that allows adding subtitles with just a few lines of code, as shown in the usage example with moviePlayer.addSubtitles().open(file: subtitleURL).
It accurately parses standard SRT subtitle files with proper timing, making it reliable for displaying multilingual video content in iOS apps.
Developers can easily customize subtitle appearance by setting properties like text color and font on the subtitleLabel, as demonstrated with moviePlayer.subtitleLabel?.textColor = UIColor.red.
Includes a subtitle parser that can search text in SRT files without a video player, useful for applications that need to process subtitles independently, as shown in the Subtitles(file: encoding:) example.
This library only works with AVPlayerViewController, making it unsuitable for projects using other video player frameworks or custom UIs, which restricts flexibility.
It exclusively handles SRT subtitle files and lacks support for other common formats like WebVTT, limiting compatibility with broader subtitle standards.
The README is brief and lacks in-depth tutorials, error handling examples, or advanced usage scenarios, which could hinder troubleshooting and adoption.