Page 1 of 1

Xamarin Formo & vimeo video

Posted: 11 Nov 2019 18:26
by mkgitalia
I follow your instractions and works perfect with "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4", but when I try to use vimeo video (for example "https://vimeo.com/370732261") nothing happens.
I tried also
var libVLC = new LibVLC();
var media = new Media(libVLC, "https://www.youtube.com/watch?v=foyufD52aog", FromType.FromLocation);
await media.Parse(MediaParseOptions.ParseNetwork);
var MediaPlayer = new MediaPlayer(media.SubItems.First());
MediaPlayer.Play();
with same black screen.
Can you help me?

Re: Xamarin Formo & vimeo video

Posted: 12 Nov 2019 04:48
by RĂ©mi Denis-Courmont
Open the video file, not some HTML.

Re: Xamarin Formo & vimeo video

Posted: 12 Nov 2019 10:44
by mkgitalia
I do not know what you mean

Re: Xamarin Formo & vimeo video

Posted: 14 Nov 2019 03:33
by mfkl
He means that https://vimeo.com/370732261 points to a webpage, not the video itself, so it cannot work.

Re: Xamarin Formo & vimeo video

Posted: 14 Nov 2019 09:08
by mkgitalia
How I can do to play a Vimeo video ? What is the correct URL ?

Re: Xamarin Formo & vimeo video

Posted: 18 Nov 2019 04:02
by mfkl
For Vimeo videos, it seems you need to parse an additional layer of subitems. Try this:

Code: Select all

static async Task Main(string[] args) { Core.Initialize(); using(var libVLC = new LibVLC()) { var media = new Media(libVLC, "https://vimeo.com/370732261", FromType.FromLocation); await media.Parse(MediaParseOptions.ParseNetwork); var subItem = media.SubItems.First(); await subItem.Parse(MediaParseOptions.ParseNetwork); var actualVideo = subItem.SubItems.First(); using (var mp = new MediaPlayer(actualVideo)) { media.Dispose(); subItem.Dispose(); actualVideo.Dispose(); mp.Play(); Console.ReadKey(); } } }