Comments (7)
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));
from sharpcaster.
Ok i will try it on the weekend.
When will be the update? If it will this month its good.
Btw is there a way to disconnect to the chromecast or must i wait for the timout?
from sharpcaster.
There will be a new version this month.
There's currently no way to disconnect from the Chromecast. I might also have support for that in next version.
from sharpcaster.
then I will wait for your great work ;)... Maybe with your help i can soon send mp4 files from my handy to the chromcast :D.
I will test it tomorrow with that code and will give you a feedback ;)
from sharpcaster.
Did it work for you?
I just released 0.1.7-pre which contains the change to allow you specify the content type while calling LoadMedia. Note that I heavily refactored the stuff and it is not a final version so there will be more major changes before I hit the final 0.1.7
from sharpcaster.
Ye i have sawn that new pre release.... I have written you a mail cause I have the problem to get the chromecast connect icon... I have spend today some hours to find a way but it still wont work. After that I can check again the .mp4 file.
Btw great work and thanks for your sdk!
from sharpcaster.
Hmmmm... I have no emails from you.
Just send again to [email protected] or add me on skype tapanila.teemu
from sharpcaster.
Related Issues (20)
- White screen after casting webpage. HOT 1
- Launching Netflix Via SDK - REQUEST HOT 1
- Cast from local NAS HOT 1
- Does not provide video controlling feature HOT 1
- Trouble connecting to chromecast from desktop HOT 5
- How to cast an Local Image? HOT 2
- Restarting previous app? HOT 3
- Re connection Issues HOT 1
- Custom receiver issue
- Plex help HOT 2
- MediaStatusChanged, ChromecastStatusChanged events not firing? HOT 1
- Connect-Launch-Load Example does not work when no App loaded or different AppId loaded. HOT 4
- Create a Fake/Virtual ChromeCast device HOT 1
- Can sharpcaster be used in mirror an android screen to chromecast? HOT 6
- sharpcaster on android HOT 12
- Xamarin Ios HOT 2
- Remove console.Writeline() from ChromeCastClient.cs HOT 4
- Cant find sample application HOT 4
- Disconnected Event Handler not called on reception of CloseMessage HOT 4
- Are casting web page urls no longer supported? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sharpcaster.