简体   繁体   中英

Xamarin Media Plugin Auto start or Timer

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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM