{"id":1569,"url":"https://github.com/renzifeng/ZFPlayer","last_synced_at":"2025-08-02T04:31:43.584Z","repository":{"id":42878020,"uuid":"53017768","full_name":"renzifeng/ZFPlayer","owner":"renzifeng","description":"Support customization of any player SDK and control layer(支持定制任何播放器SDK和控制层)","archived":false,"fork":false,"pushed_at":"2024-05-24T02:29:56.000Z","size":160158,"stargazers_count":7067,"open_issues_count":242,"forks_count":1751,"subscribers_count":159,"default_branch":"master","last_synced_at":"2024-10-29T15:04:24.140Z","etag":null,"topics":["controlview","custom","player"],"latest_commit_sha":null,"homepage":"","language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/renzifeng.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-03-03T03:32:48.000Z","updated_at":"2024-10-23T01:25:37.000Z","dependencies_parsed_at":"2022-07-09T11:30:46.565Z","dependency_job_id":"210272c8-34b3-49c3-9509-b76091f46a81","html_url":"https://github.com/renzifeng/ZFPlayer","commit_stats":{"total_commits":672,"total_committers":18,"mean_commits":"37.333333333333336","dds":0.06845238095238093,"last_synced_commit":"1ede0b9fd80d52a1474201ee506285c9792acb46"},"previous_names":[],"tags_count":94,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/renzifeng%2FZFPlayer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/renzifeng%2FZFPlayer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/renzifeng%2FZFPlayer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/renzifeng%2FZFPlayer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/renzifeng","download_url":"https://codeload.github.com/renzifeng/ZFPlayer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228438967,"owners_count":17920017,"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","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":["controlview","custom","player"],"created_at":"2024-01-05T20:15:50.101Z","updated_at":"2024-12-06T08:31:12.810Z","avatar_url":"https://github.com/renzifeng.png","language":"Objective-C","funding_links":[],"categories":["Media","Objective-C  Stars 1000以内排名整理","Objective-C","HarmonyOS","OOM-Leaks-Crash","Players \u0026 Clients"],"sub_categories":["Video","Other free courses","Windows Manager","Player","Mobile Players"],"readme":"\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://upload-images.jianshu.io/upload_images/635942-092427e571756309.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240\" alt=\"ZFPlayer\" title=\"ZFPlayer\" width=\"557\"/\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n\u003ca href=\"https://img.shields.io/cocoapods/v/ZFPlayer.svg\"\u003e\u003cimg src=\"https://img.shields.io/cocoapods/v/ZFPlayer.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://img.shields.io/github/license/renzifeng/ZFPlayer.svg?style=flat\"\u003e\u003cimg src=\"https://img.shields.io/github/license/renzifeng/ZFPlayer.svg?style=flat\"\u003e\u003c/a\u003e\n\u003ca href=\"http://cocoadocs.org/docsets/ZFPlayer\"\u003e\u003cimg src=\"https://img.shields.io/cocoapods/p/ZFPlayer.svg?style=flat\"\u003e\u003c/a\u003e\n\u003ca href=\"http://weibo.com/zifeng1300\"\u003e\u003cimg src=\"https://img.shields.io/badge/weibo-@%E4%BB%BB%E5%AD%90%E4%B8%B0-yellow.svg?style=flat\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n[中文说明](https://www.jianshu.com/p/90e55deb4d51)\n\n[ZFPlayer 转屏适配](https://github.com/renzifeng/ZFPlayer/wiki/%E8%BD%AC%E5%B1%8F%E9%80%82%E9%85%8D)\n\n\nBefore this, you used ZFPlayer, are you worried about encapsulating avplayer instead of using or modifying the source code to support other players, the control layer is not easy to customize, and so on? In order to solve these problems, I have wrote this player template, for player SDK you can conform the `ZFPlayerMediaPlayback` protocol, for control view you can conform the `ZFPlayerMediaControl` protocol, can custom the player and control view.\n\n\n![ZFPlayer思维导图](https://upload-images.jianshu.io/upload_images/635942-e99d76498cb01afb.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)\n\n## 🔨 Requirements\n\n- iOS 7+\n- Xcode 8+\n\n## 📲 Installation\n\nZFPlayer is available through [CocoaPods](https://cocoapods.org). To install it,use player template simply add the following line to your Podfile:\n\n```objc\npod 'ZFPlayer', '~\u003e 4.0'\n```\n\nUse default controlView simply add the following line to your Podfile:\n\n```objc\npod 'ZFPlayer/ControlView', '~\u003e 4.0'\n```\nUse AVPlayer simply add the following line to your Podfile:\n\n```objc\npod 'ZFPlayer/AVPlayer', '~\u003e 4.0'\n```\n\nUse ijkplayer simply add the following line to your Podfile:\n\n```objc\npod 'ZFPlayer/ijkplayer', '~\u003e 4.0'\n```\n[IJKMediaFramework SDK](https://gitee.com/renzifeng/IJKMediaFramework) support cocoapods\n\n\n## 🐒 Usage\n\n####  ZFPlayerController\nMain classes,normal style initialization and list style initialization (tableView, collection,scrollView)\n\nNormal style initialization \n\n```objc\nZFPlayerController *player = [ZFPlayerController playerWithPlayerManager:playerManager containerView:containerView];\nZFPlayerController *player = [[ZFPlayerController alloc] initwithPlayerManager:playerManager containerView:containerView];\n```\n\nList style initialization\n\n```objc\nZFPlayerController *player = [ZFPlayerController playerWithScrollView:tableView playerManager:playerManager containerViewTag:containerViewTag];\nZFPlayerController *player = [ZFPlayerController alloc] initWithScrollView:tableView playerManager:playerManager containerViewTag:containerViewTag];\nZFPlayerController *player = [ZFPlayerController playerWithScrollView:scrollView playerManager:playerManager containerView:containerView];\nZFPlayerController *player = [ZFPlayerController alloc] initWithScrollView:tableView playerManager:playerManager containerView:containerView];\n```\n\n#### ZFPlayerMediaPlayback\nFor the playerMnager,you must conform `ZFPlayerMediaPlayback` protocol,custom playermanager can supports any player SDK，such as `AVPlayer`,`MPMoviePlayerController`,`ijkplayer`,`vlc`,`PLPlayerKit`,`KSYMediaPlayer`and so on，you can reference the `ZFAVPlayerManager`class.\n\n```objc\nClass\u003cZFPlayerMediaPlayback\u003e *playerManager = ...;\n```\n\n#### ZFPlayerMediaControl\nThis class is used to display the control layer, and you must conform the ZFPlayerMediaControl protocol, you can reference the `ZFPlayerControlView` class.\n\n```objc\nUIView\u003cZFPlayerMediaControl\u003e *controlView = ...;\nplayer.controlView = controlView;\n```\n\n## 📷 Screenshots\n\n![Picture effect](https://upload-images.jianshu.io/upload_images/635942-1b0e23b7f5eabd9e.jpg?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)\n\n## Reference\n- [ijkplayer](https://github.com/Bilibili/ijkplayer)\n- [SJVideoPlayer](https://github.com/changsanjiang/SJVideoPlayer)\n\n## 👨🏻‍💻 Author\n\n- Weibo: [@任子丰](https://weibo.com/zifeng1300)\n- Email: zifeng1300@gmail.com\n- QQ群: 123449304\n\n\n## 👮🏻 License\n\nZFPlayer is available under the MIT license. See the LICENSE file for more info.\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frenzifeng%2FZFPlayer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frenzifeng%2FZFPlayer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frenzifeng%2FZFPlayer/lists"}