{"id":16351792,"url":"https://github.com/jfversluis/plugin.maui.screenrecording","last_synced_at":"2025-04-09T07:07:23.516Z","repository":{"id":218110817,"uuid":"621505140","full_name":"jfversluis/Plugin.Maui.ScreenRecording","owner":"jfversluis","description":"Plugin.Maui.ScreenRecording provides the ability to record the screen from within your app","archived":false,"fork":false,"pushed_at":"2025-01-05T09:05:36.000Z","size":8615,"stargazers_count":80,"open_issues_count":6,"forks_count":12,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-04-02T06:07:00.274Z","etag":null,"topics":["android","csharp","dotnet","dotnet-maui","ios","mac-catalyst","macos","maui","screen-capture","screen-recorder","screen-recording"],"latest_commit_sha":null,"homepage":"","language":"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/jfversluis.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":"jfversluis"}},"created_at":"2023-03-30T19:55:58.000Z","updated_at":"2025-03-12T08:47:34.000Z","dependencies_parsed_at":"2025-02-16T07:10:57.581Z","dependency_job_id":"0e551c89-6120-4bd7-b56d-bc875ee1846c","html_url":"https://github.com/jfversluis/Plugin.Maui.ScreenRecording","commit_stats":null,"previous_names":["jfversluis/plugin.maui.screenrecording"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jfversluis%2FPlugin.Maui.ScreenRecording","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jfversluis%2FPlugin.Maui.ScreenRecording/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jfversluis%2FPlugin.Maui.ScreenRecording/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jfversluis%2FPlugin.Maui.ScreenRecording/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jfversluis","download_url":"https://codeload.github.com/jfversluis/Plugin.Maui.ScreenRecording/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247994121,"owners_count":21030050,"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":["android","csharp","dotnet","dotnet-maui","ios","mac-catalyst","macos","maui","screen-capture","screen-recorder","screen-recording"],"created_at":"2024-10-11T01:24:03.892Z","updated_at":"2025-04-09T07:07:23.492Z","avatar_url":"https://github.com/jfversluis.png","language":"C#","funding_links":["https://github.com/sponsors/jfversluis"],"categories":[],"sub_categories":[],"readme":"![](nuget.png)\n\n# Plugin.Maui.ScreenRecording\n\n`Plugin.Maui.ScreenRecording` provides the ability to record the screen from within your .NET MAUI app.\n\nI have also recorded a video on how to get started with this plugin. [Watch it here!](https://www.youtube.com/watch?v=M9lDKEYzwn0\u0026list=PLfbOp004UaYVgzmTBNVI0ql2qF0LhSEU1\u0026index=35)\n\n## Install Plugin\n\n[![NuGet](https://img.shields.io/nuget/v/Plugin.Maui.ScreenRecording.svg?label=NuGet)](https://www.nuget.org/packages/Plugin.Maui.ScreenRecording/)\n\nAvailable on [NuGet](http://www.nuget.org/packages/Plugin.Maui.ScreenRecording).\n\nInstall with the dotnet CLI: `dotnet add package Plugin.Maui.ScreenRecording`, or through the NuGet Package Manager in Visual Studio.\n\n## API Usage\n\nIn `MauiProgram.cs` add the reference to the screen recording plugin:\n```\n    using Plugin.Maui.ScreenRecording;\n```\n\nThen add a call to `.UseScreenRecording()` on your `MauiAppBuilder`. For example:\n\n```\nvar builder = MauiApp.CreateBuilder();\nbuilder\n    .UseMauiApp\u003cApp\u003e()\n    .UseScreenRecording() // This line was added\n    .ConfigureFonts(fonts =\u003e\n    {\n        fonts.AddFont(\"OpenSans-Regular.ttf\", \"OpenSansRegular\");\n        fonts.AddFont(\"OpenSans-Semibold.ttf\", \"OpenSansSemibold\");\n    });\n```\n\n### Android\n\nFor Android you will need to setup a few things in your `AndroidManifest.xml` file. See an example below.\\\nYou should already have a `AndroidManifest.xml` file in your project, make sure to compare it with the example below and add the missing things.\n\n```xml\n\u003capplication\u003e\n\t\u003cservice android:name=\"Plugin.Maui.ScreenRecording.ScreenRecordingImplementation.ScreenRecordingService\" android:exported=\"false\" android:foregroundServiceType=\"mediaProjection\" /\u003e\n\u003c/application\u003e\n\n\u003cuses-permission android:name=\"android.permission.READ_EXTERNAL_STORAGE\" /\u003e\n\u003cuses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\" /\u003e\n\u003cuses-permission android:name=\"android.permission.RECORD_AUDIO\" /\u003e\n\u003cuses-permission android:name=\"android.permission.FOREGROUND_SERVICE\" /\u003e\n\n\u003c!-- This one is only needed when targeting API 34 and up --\u003e\n\u003cuses-permission android:name=\"android.permission.FOREGROUND_SERVICE_MEDIA_PROJECTION\" /\u003e\n```\n\n### iOS / macOS\n\nIf you want to save recordings to the Photos app, you will need to declare the `NSPhotoLibraryAddUsageDescription` permission in your `info.plist` file.\n\nFor example:\n\n```xml\n\u003ckey\u003eNSPhotoLibraryAddUsageDescription\u003c/key\u003e\n\u003cstring\u003eWe'd like to add the screen recordings to your Photos app!\u003c/string\u003e\n```\n\nThe permission will automatically be requested by the library when needed.\n\n## Windows Instructions\n\nNot supported (yet).\n\n# Usage:\n\nOn the page you want the screen recorder, create a variable and retrieve the static instance of the `ScreenRecording` object.\n\n```csharp\n    readonly IScreenRecording screenRecording;\n    \n    this.screenRecording = ScreenRecording.Default;\n```\n\n\u003c!-- TODO add instructions for constructor injection --\u003e\n\nTo check if device is capable of making screen recordings:\n\n`screenRecording.IsSupported;`\n\nTo start recording:\n\n`screenRecording.StartRecording();`\n\nAdditionally you can provide `ScreenRecordingOptions` to influence the behavior:\n\n```csharp\nScreenRecordingOptions options = new()\n{\n\tEnableMicrophone = true,\n\tSaveToGallery = true,\n\tSavePath = Path.Combine(Path.GetTempPath(), \"myRecording.mp4\"),\n};\n\nscreenRecording.StartRecording(options);\n```\n\nTo stop recording:\n\n`ScreenRecordingFile screenResult = await screenRecording.StopRecording();`\n\n## Acknowledgements\n\nThis project could not have came to be without these projects and people, thank you! \u003c3\n\nA big thank you to [@rdurish](https://github.com/rdurish) who provided the initial implementation for Android. Amazing work!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjfversluis%2Fplugin.maui.screenrecording","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjfversluis%2Fplugin.maui.screenrecording","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjfversluis%2Fplugin.maui.screenrecording/lists"}