android - 如何在xamarin跨平台表单c#中一个接一个地播放多个视频
问题描述
如何在xamarin跨平台表单c#中一个接一个地播放多个视频我尝试过使用列表,数组,但问题是最后一个视频只播放,其余视频不播放。
MediaQueue mq = new MediaQueue();
MediaFile mf = new MediaFile();
if (PlayStopButtonText.Text == "Play")
{
/*string videoUrl1 = "https://archive.org/download/BigBuckBunny_328/BigBuckBunny_512kb.mp4";
string videoUrl = "https://sec.ch9.ms/ch9/e68c/690eebb1-797a-40ef-a841-c63dded4e68c/Cognitive-Services-Emotion_high.mp4";
CrossMediaManager.Current.Play(videoUrl,MediaFileType.Video,ResourceAvailability.Remote);
//CrossMediaManager.Current.PlayNext();*/
mf.Url = videoUrll;
mf.Type = MediaFileType.Video;
mq.Insert(0,mf);
mf.Url = videoUrl;
mf.Type = MediaFileType.Video;
mq.Insert(1, mf);
foreach(var item in mq)
{
CrossMediaManager.Current.Play(item.Url,MediaFileType.Video);
}
}
解决方案
推荐阅读
- selenium - com.browserstack.local.LocalException:尝试下载 BrowserStackLocal 二进制文件时出错
- android - 底部导航的第三个选项卡应包含抽屉菜单
- c# - DateTimePicker 在 WinForm 中设置 DropDownList 样式
- java - Firebase 事务返回 ArrayList 处理
- css - 使用@page 隐藏第一页的内容
- amazon-web-services - AWS Textract 如何测量页数?
- javascript - 在反应中上传图像不返回表单数据值
- dialogflow-es - Dialogflow 实体 - 区分大小写
- python - Python - 订购字典/嵌套字典的元组
- azure - Azure - 从 Outlook 下载附件而不使用 logicapp 并将其移动到 Blob 存储