kakone / GoogleCast

Implementation of the Google Cast protocol (.NET Standard 2.0 library)
GNU General Public License v3.0
141 stars 22 forks source link

Cast local file #27

Open kisimita opened 4 years ago

kisimita commented 4 years ago

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?

kakone commented 4 years ago

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.

ducguedes commented 1 year ago

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