question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

With Android & Chromecast its possible to play .mp4 files. But if i try to load a mp4 file nothing happens.

client.Connected += async delegate { await client.LaunchApplication("B3419EF5"); }; client.ApplicationStarted += async delegate { await client.LoadMedia("http://www.w3schools.com/html/mov_bbb.mp4"); }; client.ConnectChromecast(new Uri(selectedChromecast.Tag.ToString()));

I still just see “SharpCaster demo receiver” 😕

I hope you can help me.

Dear Lukas

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
Tapanilacommented, Aug 11, 2016

The current implementation is expecting the mime type of the stream to be different then MP4. I will add a parameter to LoadMedia where you can specify on next version. It might take a while.

If you want to get started right now then instead of client.LoadMedia… You can add following

var startedApplication = client.ChromecastStatus?.Applications?.FirstOrDefault(x => x.AppId == applicationId);
var currentApplicationTransportId = startedApplication.TransportId;
var currentApplicationSessionId = startedApplication.SessionId;

var mediaChannel = client.Channels.First(i => i.Namespace == "urn:x-cast:com.google.cast.media");
var mediaObject = new MediaData("http://www.w3schools.com/html/mov_bbb.mp4", "video/mp4", null, "BUFFERED", 0D, null);
var req = new LoadRequest(currentApplicationSessionId, mediaObject, true, 0.0, null);

var reqJson = req.ToJson();
await mediaChannel.Write(MessageFactory.Load(currentApplicationTransportId, reqJson));
0reactions
Tapanilacommented, Aug 14, 2016

Hmmmm… I have no emails from you.

Just send again to teemu@tapanila.net or add me on skype tapanila.teemu

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Play MP4s on Windows 10/8/7
Find your MP4 using Windows File Explorer. · Right click or tap and hold on it. · Select Open With. · Select Windows...
Read more >
MP4 Player online
MP4 Player online: How to play a MP4 file online. 1. To play an MP4 in our mp4 player, drag and drop or...
Read more >
What is an MP4 File (and How to Open or Convert One)
An MP4 file is an MPEG-4 Video file which stores video, audio, and subtitles. Windows Media Player, QuickTime, and other MP4 players can ......
Read more >
What Is an MP4 File (and How Do I Open One)?
A file with the .mp4 file extension is an MPEG-4 video file format. MP4s are one of the more common video file formats...
Read more >
Open MP4 Files
File Viewer Lite is a free .MP4 file opener that allows you to play the multimedia contained in the file. In addition to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found