kakone/GoogleCast

Cast local file

kisimita opened this issue · 2 comments

Hi,
I used this library with Xamarin Form and it work. Thank you for that.
But It's only work with the online URL, when I try a local file in my Android device E.g.

var sender = new Sender();
// Connect to the Chromecast
await sender.ConnectAsync(receiver);
// Launch the default media receiver application
var mediaChannel = sender.GetChannel();
await sender.LaunchAsync(mediaChannel);

var mediaStatus = await mediaChannel.LoadAsync(new MediaInformation() { ContentId = "/storage/emulated/0/Download/BigBuckBunny.mp4" });

It does not work.
Can you please help?

It's not so easy to cast a local file. You must have a local web server (like EmbedIO) that exposes the file, and you will use the file URL in the LoadAsync method.

I did it.
1 - Install Wamp Server
2 - Copy (expose) your file into wamp64/www folder
3 - Configure your router to redirect the port to your pc IP and specific wamp port
4 - Use your external ip + port + file name as URL