GoogleCast icon indicating copy to clipboard operation
GoogleCast copied to clipboard

Cast local file

Open kisimita opened this issue 6 years ago • 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<IMediaChannel>(); 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?

kisimita avatar Jul 24 '19 16:07 kisimita

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.

kakone avatar Aug 08 '19 08:08 kakone

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

ducguedes avatar May 08 '23 19:05 ducguedes