Open FrancescoCioria opened 3 years ago
Hey @FrancescoCioria does that still works for you?.
I am trying to create requests like you have mentioned "Spotify, Amazon Prime Video and Netflix" in another programming language named Dart.
If you can share what kNamespace (cast:com.google.cast.receiver
) did you used and how is your request looks like
{
app: "DefaultMediaReceiver",
type: "MEDIA",
media: {
url: "http://test.com/media.mp3",
contentType: "audio/mp3", // optional if type can be infered from url file
streamType: "BUFFERED", // optional unless you want to send LIVE instead
}
}
it will be awesome.
Hi @guyluz11 Honestly I stopped using this a bit more than a year ago but at that time it was still working
I was looking now at my own code and apparently I released a lib on NPM with the code I was using to control the medias running on the chromecast (I had totally forgot 😅): https://github.com/FrancescoCioria/chromecast-media-controls-api
I cannot really help you on the low-level chromecast api because I relied on another library called castv2-client
(https://www.npmjs.com/package/castv2-client) but I'm pretty sure I only used the default DefaultMediaReceiver
Hope this helps
Ok thanks for the reply. Will look
I noticed that currently we can control only the Youtube app. In my opinion there is no reason not to enable the media controls (play, pause, volume, seek ...) for any other apps playing medias.
I edited your code to fallback to
DefaultMediaReceiver
for unknown apps, and indeed I was able to play, pause, change volume etc for Spotify, Amazon Prime Video and Netflix.I simply edited this part
to: