Share Recorded Video
Learn how to share recorded video
Once a recording is finished and available, you can share the file to other services.
Currently share recording is not supported for Gif recording. Coming soon.
using VoxelBusters.ScreenRecorderKit;
IScreenRecorder recorder;
//... Create instance for IScreenRecorder via ScreenRecorderBuilder
void RegisterListeners()
{
recorder.SetOnRecordingAvailable((result) =>
{
string path = result.Data as string;
Debug.Log($"File path: {path}");
SaveRecording();
});
}
void SaveRecording()
{
recorder.SaveRecording(null, (result, error) =>
{
if(error == null)
{
Debug.Log("Saved recording successfully :" + result.Path);
ShareRecording();
}
else
{
Debug.Log($"Failed saving recording [{error}]");
}
});
}
void ShareRecording()
{
recorder.ShareRecording(callback: (success, error) =>
{
if (success)
{
Debug.Log("Shared recording");
}
else
{
Debug.Log($"Failed to share recording [{error}]");
}
});
}
Last updated
Was this helpful?