我有这段代码从medialibrary获取视频,但我无法播放。
var
Service: IFMXVideoManagerService;
begin
if TPlatformServices.Current.SupportsPlatformService(IFMXVideoManagerService,
IInterface(Service)) then
begin
Service.GetVideoFromLibrary;
end;
帮助我获取文件的名称或建议在Delphi FMX IOS中播放媒体库视频的方法
更新
我发现了这个样本,但即使你从medialibrary中选择视频也只能获得图像。或者我错了?
var
ImageService: IFMXTakenImageService;
Params: TParamsPhotoQuery;
begin
if TPlatformServices.Current.SupportsPlatformService(IFMXTakenImageService,
IInterface(ImageService)) then
begin
Params.RequiredResolution := TSize.Create(640, 640);
Params.OnDidFinishTaking := DoDidFinish;
ImageService.TakeImageFromLibrary(ScanfromImage, Params);
end;
end;
procedure TMainForm.DoDidFinish(Image: TBitmap);
begin
end;
有什么建议吗?