问题
In my iOS Xamarin forms project I'm using Xam.Plugin.Media
from https://github.com/jamesmontemagno/MediaPlugin as follows
async void Handle_Clicked(object sender, System.EventArgs e)
{
await CrossMedia.Current.Initialize();
var file = await CrossMedia.Current.TakeVideoAsync(new Plugin.Media.Abstractions.StoreVideoOptions
{
DefaultCamera = CameraDevice.Front,
SaveToAlbum = true,
});
}
Is it possible to automatically start video recording or set a timer for the recording to start?
Ultimately, I'm trying to build a lightweight remotely controllable camera app. So the device whose camera is controlled needs to be able to automatically trigger/start the camera.
Any hint appreciated.
回答1:
You can't start a video or take a photo without user interaction with Xamarin Media Plugin.
At the following link you can find all StoreVideoOptions where offered
https://github.com/jamesmontemagno/MediaPlugin/blob/master/src/Media.Plugin/Shared/MediaStoreOptions.cs
来源:https://stackoverflow.com/questions/55825244/xamarin-media-plugin-auto-start-or-timer