{"id":16322273,"url":"https://github.com/p-x9/screencapture","last_synced_at":"2025-06-10T21:04:26.057Z","repository":{"id":167607387,"uuid":"642743044","full_name":"p-x9/ScreenCapture","owner":"p-x9","description":"📱Library for recording window and windowScene.","archived":false,"fork":false,"pushed_at":"2023-08-18T16:07:38.000Z","size":72,"stargazers_count":15,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-18T15:12:41.546Z","etag":null,"topics":["ios","screen-capture","swift","swiftpackage"],"latest_commit_sha":null,"homepage":"","language":"Swift","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/p-x9.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":"2023-05-19T08:46:23.000Z","updated_at":"2024-11-18T12:48:07.000Z","dependencies_parsed_at":null,"dependency_job_id":"ace27fe7-4447-49fb-845f-746b73940c1a","html_url":"https://github.com/p-x9/ScreenCapture","commit_stats":null,"previous_names":["p-x9/screencapture"],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p-x9%2FScreenCapture","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p-x9%2FScreenCapture/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p-x9%2FScreenCapture/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p-x9%2FScreenCapture/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/p-x9","download_url":"https://codeload.github.com/p-x9/ScreenCapture/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245023159,"owners_count":20548667,"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":["ios","screen-capture","swift","swiftpackage"],"created_at":"2024-10-10T22:50:28.082Z","updated_at":"2025-03-22T21:32:27.357Z","avatar_url":"https://github.com/p-x9.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ScreenCapture\n\nLibrary for recording window and windowScene.\n\u003c/br\u003e\nIt is possible to use this function even when screen recording is being performed by an iOS function or while screen sharing is in progress.\n\n\u003c!-- # Badges --\u003e\n\n[![Github issues](https://img.shields.io/github/issues/p-x9/ScreenCapture)](https://github.com/p-x9/ScreenCapture/issues)\n[![Github forks](https://img.shields.io/github/forks/p-x9/ScreenCapture)](https://github.com/p-x9/ScreenCapture/network/members)\n[![Github stars](https://img.shields.io/github/stars/p-x9/ScreenCapture)](https://github.com/p-x9/ScreenCapture/stargazers)\n[![Github top language](https://img.shields.io/github/languages/top/p-x9/ScreenCapture)](https://github.com/p-x9/ScreenCapture/)\n\n## Document\n### Instance\n```swift\nimport ScreenCapture\n\n// config for recording\nlet config = Configuration(\n    codec: .h264,\n    fileType: .mp4,\n    fps: 60,\n    scale: 2\n)\n\n// record all windows in a scene\nlet screenCapture = ScreenCapture(for: windowScene,\n                                  with: config)\n\n// record a particular window\nlet screenCapture = ScreenCapture(for: window,\n                                  with: config)\n```\n\n### Video\n#### Start Recording\n```swift\nlet tmpURL = FileManager.default.temporaryDirectory\nlet url = tmpURL.appending(components: UUID().uuidString + \".mp4\")\n\ntry screenCapture.start(outputURL: url)\n```\n\n#### End Recording\n```swift\ntry screenCapture.end()\n```\n\n### Image\n```swift\nlet tmpURL = FileManager.default.temporaryDirectory\nlet url = tmpURL.appending(components: UUID().uuidString + \".jpg\")\n\ntry screenCapture.capture(outputURL: url)\n```\n\n\n## License\n\nScreenCapture is released under the MIT License. See [LICENSE](./LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fp-x9%2Fscreencapture","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fp-x9%2Fscreencapture","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fp-x9%2Fscreencapture/lists"}