本文介绍了如何依次播放播放列表中的所有视频?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Xamarin.Forms VideoPlayer.如何实现依次播放YouTube播放列表中的所有视频?能够将视频的缩略图显示为轮播也很好,这样用户可以从视频切换到视频.我试过了:

I use Xamarin.Forms VideoPlayer. How can I implement playing all videos in a youtube playlist in turn? It would be also good to be able to display the videos' thumbnails as carousel to let the user switch from video to video.I tried this:

<video:VideoPlayer x:Name="videoPlayer"
                   Source="https://www.youtube.com/watch?v=Jwcgm5VYV-
                   U&amp;list=PLyjPaKJQuCEzqQKdA8FsQdsJ77XbjKkBH" />

但是出现错误:

错误:不支持的视频类型或无效的文件路径.

Error: Unsupported video type or invalid file path.

我在NuGet上找到了plugin.youtube,但它似乎不适用于.Net Standard.

I found plugin.youtube on NuGet, but it doesn't seem to work with .Net Standard.

什么是正确的方法?

谢谢.

推荐答案

VideoPlayer 不支持自动播放带有视频列表地址的视频. 更好的方法是,您需要从视频列表地址中获取所有视频源URL,例如http://littlevideo/TestVideo.mp4,然后将视频源URL传递到VideoPlayer源属性.

VideoPlayer does not support to play the video with video list address automatically. The better way is that you need to get all the video source url such as http://littlevideo/TestVideo.mp4 from video list address then pass the video source url to VideoPlayer source property.

这篇关于如何依次播放播放列表中的所有视频?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-05 17:15
查看更多