我一直在到处寻找以下任务的帮助:
添加视频文件的简单方法是什么,只需单击按钮即可在 Android 设备上播放视频。每次运行代码时,当我按下按钮时,它都会显示黑屏,然后关闭。
这是我的代码:
procedure TForm3.Button1Click(Sender: TObject);
begin
mediaplayer1.FileName := 'c:\sapoavi2.avi';
if MediaPlayer1.Media <> nil then
begin
MediaPlayer1.Play;
end;
另外,我有一个媒体播放器控制框来显示视频。
任何帮助将不胜感激。
最佳答案
根据 documentation,您的方法是错误的
Video on Android Platform ... Android video files are typically the H.263 format. For more information, see http://developer.android.com/guide/appendix/media-formats.html
你应该先看看the mobile code snippets
关于android - 使用 delphi firemonkey 在 android 应用程序上添加视频,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41374359/