Save recording to the Videos folder
This commit is contained in:
parent
8df0a6e7dd
commit
e9c07eac9c
|
@ -142,7 +142,11 @@ namespace WebViewStream
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if WINDOWS_UWP && !UNITY_EDITOR
|
||||||
|
private async void OnStartedVideoCaptureMode(VideoCapture.VideoCaptureResult result)
|
||||||
|
#else
|
||||||
private void OnStartedVideoCaptureMode(VideoCapture.VideoCaptureResult result)
|
private void OnStartedVideoCaptureMode(VideoCapture.VideoCaptureResult result)
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
if (result.success)
|
if (result.success)
|
||||||
{
|
{
|
||||||
|
@ -150,7 +154,12 @@ namespace WebViewStream
|
||||||
"WebView_{0}.mp4",
|
"WebView_{0}.mp4",
|
||||||
DateTime.UtcNow.ToString("yyyy-MM-ddTHHmmssZ")
|
DateTime.UtcNow.ToString("yyyy-MM-ddTHHmmssZ")
|
||||||
);
|
);
|
||||||
|
#if WINDOWS_UWP && !UNITY_EDITOR
|
||||||
|
StorageLibrary videosLibrary = await StorageLibrary.GetLibraryAsync(KnownLibraryId.Videos);
|
||||||
|
string filepath = Path.Combine(videosLibrary.SaveFolder.Path, filename);
|
||||||
|
#else
|
||||||
string filepath = Path.Combine(Application.persistentDataPath, filename);
|
string filepath = Path.Combine(Application.persistentDataPath, filename);
|
||||||
|
#endif
|
||||||
Debug.Log("Saving video to: " + filepath);
|
Debug.Log("Saving video to: " + filepath);
|
||||||
|
|
||||||
videoCapture.StartRecordingAsync(filepath, OnStartedRecordingVideo);
|
videoCapture.StartRecordingAsync(filepath, OnStartedRecordingVideo);
|
||||||
|
|
|
@ -676,6 +676,7 @@ PlayerSettings:
|
||||||
syncCapabilities: 1
|
syncCapabilities: 1
|
||||||
platformCapabilities:
|
platformCapabilities:
|
||||||
WindowsStoreApps:
|
WindowsStoreApps:
|
||||||
|
VideosLibrary: True
|
||||||
GazeInput: True
|
GazeInput: True
|
||||||
SpatialPerception: True
|
SpatialPerception: True
|
||||||
InternetClient: True
|
InternetClient: True
|
||||||
|
|
Loading…
Reference in New Issue