Xamarin Media Plugin Auto start or Timer

此生再无相见时 提交于 2021-02-11 15:30:03

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!