tapanila / sharpcaster Goto Github PK
View Code? Open in Web Editor NEWChromecast C# SDK for .net standard 2.0
License: MIT License
Chromecast C# SDK for .net standard 2.0
License: MIT License
This is because of SSL error on socket (Chromecast uses self signed certificates)
.
Add timeline to sample where user can see how far into the media clip they are and use it to seek to different part of the media clip.
SDK needs to support mute and unmute
This is more of a question!
I was looking at #50 and just out of curiosity, not directly pointed at @Wind-rider, what do Plex command have to do with Chomecast?
Wouldn't this pollute the project? I myself am a fan of having projects do one thing, and do it good... Having al kinds of features usually makes it hard to maintain, and e.g. a plex change would make other people upgrade the library without the need. Would the Plex stuff work when it was removed from the project into a different one?
Nothing against the functionality... keep up the good work!
To understand how this library is used sample application is needed
Sometimes the chromecast sends closed to tell the client to disconnect.
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
I'm currently looking for an idea/suggestion for an app that would be leveraging the SharpCaster library
hi, how can i implement a custom controller to stream a wpf application window?
Hello,
I have a problem using this application, and I am almost sure that I'm missing something really trivial.
I use the nuget command to add SharpCaster, all is great, it installs and adds SharpCaster and Newtonsoft Json, all good.
Now I want to reference it at the top of my application, like: Using Sharpcaster.... But I am not able to find it... It would be a huge relief if you could help.
They are just causing too much trouble and do not really work when using the nuget package.
So just move them to sample project
It would be nice if you would create feature branches and merge them to the dev branch, so that it is clear what is being worked on and so that each branch has a focus.
I'm having difficulty following the logic in ReceiverChannel.
ConnectToApplication(Client.ChromecastApplicationId);
called upon every ChromecastStatusResponse?SDK should enable killing of the application. Chromecast calls this stop
Hi, can sharpcaster supporting caption or subtitles? I cant find MediaTracks option just CustomData,
Im a C# .net develop and xamarin too, im looking to cast witth captions or subtitles, i see that you using json to send to chromecast messages, should be good send the subtitle url there too, i have been using Google Services Cast but i dont like it, I like your develop to using in xamarin, but i need captions too. thanks for your work, can you tell me where or a suggestion to add subtitles to the sharpcaster?
Hey!
I'm trying to extend the MediaPlayer in a Windows 10 UWP App with SharpCaster to a Chromecast.
I have built a custom receiver app, that communicates via a channel with my app. On Android, this works perfectly but I can't find how to open app channels with SharpCaster, Creating a channel with the ChromecastChannel(client, "NS")
does not work for me... My code:
chromecastClient.ApplicationStarted += (sender, application) =>
{
var ch = new ChromecastChannel("*myappchannel*");
ch.MessageReceived += (o, args) =>
{
Debugger.Break(); //Never triggered
};
var msg = new CastMessage { PayloadUtf8 = "{\"type\": \"MOVIE\", \"url\": \"myurl\"}" };
await ch.Write(msg);
};
Now there are two solutions (one general one and one for CI).
It would be better to have only one only one .sln file.
I think this can be done in the following way:
I have no AppVeyor account so I couldn't test it, but I think that should work.
Current data model does not really support setting any metadata when loading media
Hey,
first big thx for this SDK it works nice. I hope it´s just my bad, cause i can´t connect to the chromecast.
I have a listbox with all Chromecast and this works well:
` private async void getChromecasts()
{
DeviceLocator deviceLocator = new DeviceLocator();
var cancellationTokenSource = new CancellationTokenSource();
cancellationTokenSource.CancelAfter(5000);
chromecasts = await deviceLocator.LocateDevicesAsync(cancellationTokenSource.Token);
if(chromecasts.Count > 0)
{
foreach (Chromecast chromcast in chromecasts)
{
chromecastListBox.Items.Add(new ListBoxItem { Content = chromcast.FriendlyName, Tag = chromcast.DeviceUri });
}
}
else
{
chromecastListBox.Items.Add(new ListBoxItem() { IsEnabled = false, Name = "noDevice", Content = "Keine Geräte gefunden" });
}
chromecastListBox.Items.Remove(search);
}`
After that i can push the button to connect to the chromecast:
private void ConnectChromecast(object sender, RoutedEventArgs e) { ListBoxItem selectedChromecast = (ListBoxItem)chromecastListBox.SelectedItem; Testo.Text = selectedChromecast.Tag.ToString(); client.ConnectChromecast(chromecasts.Last().DeviceUri); }
I´ve also tried to set the DeviceUri manuell, but no way. Pls help me ;)
Mfg
Lukas
BTW i add the full code in the attachment
code.txt
It would be nice to release your dev branch as pre-release nuget versions so that people can try new features quicker
For some reason I get a nullReferenceException when running the Simple app and sending a message (by changing the volume or clicking play/pause).
Reproduction:
Symptoms:
Two issues:
Google is working on one but that one seems to only support the proto3 version. Protobuf-net is also a nuget package but it seems there is some issue with the chosen target framework.
I installed the latest SharpCaster nuget package on a Windows 10 IOT background task project.
On ChromecastService.Current.StartLocatingDevices I get the following error:
Could not load file or assembly 'Rssdp.Portable, Version=2.0.0.1, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
The Rssdp.Portable.dll which is distributed in Rssdp-sharpcaster is version 1.0.0.12
Write "Get Started" tutorial
I receive this error when calling
_controller = await ChromecastService.ChromeCastClient.LaunchSharpCaster();
How do I fix this?
Hi,
Is it possible to control many chromecasts from the same application ?
It seams that your lib is built "single chromecast", but I would like to drive two or three from the same application...
I have a question, how can I put the title movie in the metadata object, but i dont have the mediatype numbers
GENERIC
Generic template suitable for most media types. Used by chrome.cast.media.GenericMediaMetadata.
MOVIE
A full length movie. Used by chrome.cast.media.MovieMediaMetadata.
TV_SHOW
An episode of a TV series. Used by chrome.cast.media.TvShowMediaMetadata.
MUSIC_TRACK
A music track. Used by chrome.cast.media.MusicTrackMediaMetadata.
PHOTO
Photo. Used by chrome.cast.media.PhotoMediaMetadata.
the MovieMetadata object need a int, do you know the numbers in int?
If application is already open instead of creating a new session of the application join it.
I plan to start hosting a build agent with access to chromecast. That way we can always run automated test suite to make sure all the features keep working.
Features that should be tested:
User needs to be able to mute, unmute and set volume levels on UI.
There is an issue to choose right network when there is multiple virtual network cards.
My uwp app crash when i try connect to chromecast.
I select device and try to connect then ( Uri and friendlyName is correct).
Error message : (CoreCLR: CoreCLR_UWP_Domain) : Chargé 'Anonymously Hosted DynamicMethods Assembly'.
thanks
PS, sorry for my english :(
https://blogs.msdn.microsoft.com/dotnet/2016/09/26/introducing-net-standard/
The library and all dependencies seem to be .net 2.0 compatible according to ApiPort.
So once 2.0 is out I will switch to target that one
There has been few requests to cast a webpage.
This would probably need to build custom receiver which you can control to open web page
How to get current video on chromecast, title and poster of the video, cast is started by other app!?
at Sockets.Plugin.NativeExceptionExtensions.<>c__DisplayClass0_0.b__1(Task1 t) at System.Threading.Tasks.ContinuationResultTaskFromResultTask
2.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at SharpCaster.Services.ChromecastSocketService.d__1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at SharpCaster.ChromeCastClient.d__55.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<>c.b__6_0(Object state)
at System.Threading.WinRTSynchronizationContext.Invoker.InvokeCore()
In my project use the Nuget version and new master, when I connect the chromecast v1, always get the exception.
Create templated control of Cast Button that implements Chromecast Design Checklist
https://developers.google.com/cast/docs/design_checklist#cast-button
There maybe other but instance property like this is not thread safe. Because of this possible race condition you might create multiple instances if it's called from multiple threads.
public static ChromecastService Current => _instance ?? (_instance = new ChromecastService());
use this instead
private static Lazy<ChromecastService> _current = new Lazy<ChromecastService>(() => new ChromecastService());
public static ChromecastService Current { get { return _current .Value; } }
Create templated control of Cast Dialog that implements Chromecast Design Checklist
https://developers.google.com/cast/docs/design_checklist#cast-menu
Currently it builds Portable, .net45 and Universal into same folder and same name. This causes multiple problems and should be fixed.
Make it easier to consume this library by creating a nuget package definition and use appvoyer to publish it.
The current library targets Google's Default Media Receiver (message format and available operations).
However it would be nice if additional apps with their own protocol could be supported.
My idea would be something like this:
@Tapanila what do you think?
Also have a look at home-assistant-libs/pychromecast#101 (here I implemented a controller for DS Audio)
MusicTrackMediaMetadata does not display (album)artist
VB.NET:
metadata = New MusicTrackMediaMetadata() With { .albumArtist = artist, .artist = artist, .songName = song, .title = song }
Both "artist" and "song" have a value, the song is getting displayed on my screen correctly but the artist isn't.
Hi,
I stumbled upon your great project while researching options on supporting chromecast in windows apps.
A suggestion for future work would be to use already existing portable abstractions of UDP and TCP sockets (e.g. https://github.com/rdavisau/sockets-for-pcl which i've bee successfully working with)
I'm looking forward to future features.
Greetings
http://www.auctor.tv/Archivos/0/Media1/0/1.vtt this url dont work with the captions or subtitles, if you put it in the subtitles, dont work, i think that its a chromecast problem, im not sure what is happening, im not sure if is by using "https" protocol, because a http protocol to put subtitiles dont work.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.