Xamarin 媒体插件自动启动或计时器 [英] Xamarin Media Plugin Auto start or Timer
问题描述
在我的 iOS Xamarin 表单项目中,我使用来自 的 Xam.Plugin.Media
https://github.com/jamesmontemagno/MediaPlugin如下
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.
任何提示表示赞赏.
推荐答案
如果没有 Xamarin Media Plugin 的用户交互,您将无法启动视频或拍照.
You can't start a video or take a photo without user interaction with Xamarin Media Plugin.
在以下链接中,您可以找到提供的所有 StoreVideoOptions
At the following link you can find all StoreVideoOptions where offered
这篇关于Xamarin 媒体插件自动启动或计时器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!