NatCorder
Search…
Social Sharing
Sharing is Caring
In most apps, especially on mobile platforms, you typically want to provide the user with the ability to share their recordings. For this, we provide our open-source NatShare API for mobile cross-platform social sharing:
GitHub - natmlx/NatShare: Cross-platform social sharing for Unity Engine.
GitHub
NatShare on GitHub.

Sharing Recordings

NatShare allows for sharing media at a specific URL. As a result, we can use the recording path from NatCorder to present a share sheet to the user.
1
// Finish recording
2
var path = await recorder.FinishWriting();
3
// And present the share sheet
4
var payload = new SharePayload();
5
payload.AddMedia(path);
6
payload.Commit();
Copied!
NatShare allows for sharing multiple media items at once. This can enhance the user experience.
1
// Finish recording
2
var path = await recorder.FinishWriting();
3
// Share!
4
new SharePayload().AddText("I won!!!").AddMedia(path).Commit();
Copied!

Saving to the Camera Roll

NatShare also allows for saving media items to the camera roll.
1
// Finish recording
2
var path = await recorder.FinishWriting();
3
// Save the recording to the camera roll
4
// We can save it to a specific album in the camera roll
5
var payload = new SavePayload("My Awesome App"); // album name here
6
payload.AddMedia(path);
7
payload.Commit();
Copied!