{"id":1567,"url":"https://github.com/mhergon/AVPlayerViewController-Subtitles","last_synced_at":"2025-08-02T04:32:07.423Z","repository":{"id":3125142,"uuid":"48480714","full_name":"mhergon/AVPlayerViewController-Subtitles","owner":"mhergon","description":"Easy way to show SRT files on AVPlayerViewController","archived":false,"fork":false,"pushed_at":"2023-06-08T09:08:20.000Z","size":17794,"stargazers_count":276,"open_issues_count":0,"forks_count":66,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-07-10T18:31:38.929Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mhergon.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2015-12-23T09:07:28.000Z","updated_at":"2025-07-01T02:44:18.000Z","dependencies_parsed_at":"2023-07-06T11:47:01.286Z","dependency_job_id":null,"html_url":"https://github.com/mhergon/AVPlayerViewController-Subtitles","commit_stats":{"total_commits":52,"total_committers":10,"mean_commits":5.2,"dds":0.4423076923076923,"last_synced_commit":"373feafc6553c0b779a0cb3fd08902100918af98"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/mhergon/AVPlayerViewController-Subtitles","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mhergon%2FAVPlayerViewController-Subtitles","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mhergon%2FAVPlayerViewController-Subtitles/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mhergon%2FAVPlayerViewController-Subtitles/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mhergon%2FAVPlayerViewController-Subtitles/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mhergon","download_url":"https://codeload.github.com/mhergon/AVPlayerViewController-Subtitles/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mhergon%2FAVPlayerViewController-Subtitles/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268334615,"owners_count":24233793,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-02T02:00:12.353Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-01-05T20:15:50.055Z","updated_at":"2025-08-02T04:32:06.368Z","avatar_url":"https://github.com/mhergon.png","language":"Swift","funding_links":[],"categories":["Media","HarmonyOS"],"sub_categories":["Video","Other free courses","Windows Manager"],"readme":"\u003cp align=\"center\" \u003e\n\u003cimg src=\"https://raw.github.com/mhergon/AVPlayerViewController-Subtitles/master/assets/logo.png\" alt=\"Logo\" title=\"Logo\" width=250\u003e\n\u003c/p\u003e\n\n![issues](https://img.shields.io/github/issues/mhergon/AVPlayerViewController-Subtitles.svg)\n\u0026emsp;\n![stars](https://img.shields.io/github/stars/mhergon/AVPlayerViewController-Subtitles.svg)\n\u0026emsp;\n![license](https://img.shields.io/badge/license-Apache%202.0-brightgreen.svg)\n\n\nAVPlayerViewController-Subtitles is a library to display subtitles on iOS. It's built as a Swift extension and it's very easy to integrate.\n\n## How To Get Started\n\n### Installation with CocoaPods\n\n```ruby\nplatform :ios, '8.0'\npod 'AVPlayerViewController-Subtitles'\n```\n\n### Manually installation\n\n[Download](https://github.com/mhergon/MPMoviePlayerController-Subtitles/raw/master/MPMoviePlayerController-Subtitles.swift) (right-click) and add to your project.\n\n### Requirements\n\n| Version | Language  | Minimum iOS Target  |\n|:--------------------:|:---------------------------:|:---------------------------:|\n|          1.3.x         |            Swift 5.0            |            iOS 8            |\n|          1.2.x         |            Swift 3.0            |            iOS 8            |\n|          1.0.x         |            Swift 2.x           |            iOS 8            |\n\n\n### Usage with player\n\n```swift\nimport AVPlayerViewControllerSubtitles\n```\n\n```swift\n// Video file\nlet videoFile = Bundle.main.path(forResource: \"trailer_720p\", ofType: \"mov\")\n\n// Subtitle file\nlet subtitleFile = Bundle.main.path(forResource: \"trailer_720p\", ofType: \"srt\")\nlet subtitleURL = URL(fileURLWithPath: subtitleFile!)\n\n// Movie player\nlet moviePlayer = AVPlayerViewController()\nmoviePlayer.player = AVPlayer(url: URL(fileURLWithPath: videoFile!))\npresent(moviePlayer, animated: true, completion: nil)\n\n// Add subtitles\nmoviePlayer.addSubtitles().open(file: subtitleURL)\nmoviePlayer.addSubtitles().open(file: subtitleURL, encoding: String.Encoding.utf8)\n\n// Change text properties\nmoviePlayer.subtitleLabel?.textColor = UIColor.red\n\n// Play\nmoviePlayer.player?.play()\n```\n\n#### Screenshot\n\u003cp align=\"center\" \u003e\n\u003cimg src=\"https://raw.github.com/mhergon/AVPlayerViewController-Subtitles/master/assets/screenshot.png\" alt=\"Screenshoot\" title=\"Screenshoot\"\u003e\n\u003c/p\u003e\n\n### Usage without player\n\nFrom version 1.2 you can search text in the SubRip file or text without need play any file.\n\n```swift\nimport AVPlayerViewControllerSubtitles\n```\n\n```swift\n// Subtitle file\nlet subtitleFile = Bundle.main.path(forResource: \"trailer_720p\", ofType: \"srt\")\nlet subtitleURL = URL(fileURLWithPath: subtitleFile!)\n\n// Subtitle parser\nlet parser = Subtitles(file: subtitleURL, encoding: .utf8)\n\n// Do something with result\nlet subtitles = parser.searchSubtitles(at: 2.0) // Search subtitle at 2.0 seconds\n```\n\n## Contact\n\n- [Linkedin][2]\n- [Twitter][3] (@mhergon)\n\n[2]: https://es.linkedin.com/in/marchervera\n[3]: http://twitter.com/mhergon \"Marc Hervera\"\n\n## License\n\nLicensed under Apache License v2.0.\n\u003cbr\u003e\nCopyright 2017 Marc Hervera.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmhergon%2FAVPlayerViewController-Subtitles","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmhergon%2FAVPlayerViewController-Subtitles","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmhergon%2FAVPlayerViewController-Subtitles/lists"}