问题
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&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