How can I play all videos in a play list in turn?

社会主义新天地 提交于 2019-12-11 04:47:49

问题


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" />

But got an error:

Error: Unsupported video type or invalid file path.

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

What would be the right approach?

Thank you.


回答1:


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.



来源:https://stackoverflow.com/questions/53414173/how-can-i-play-all-videos-in-a-play-list-in-turn

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!