Stream to chromecast

Well, my idea is to create a local TV player with the possibility of streaming to chromecast.

Is there any way to make it possible?

You can always use the search function to find a solution or at least information about what you’re looking for.

Regarding chromecast extension, there is a request topic about it, but not concluded…


Meanwhile, you can workaround it by using a side app for casting, such as this one.

2 Likes

I would like to know how to send the content to the app you mentioned to transmit it to chromecast

Look at the very bottom of the FAQ. It might be a bit hard to translate it to blocks, but it’s right there!

Okay. Here’s the idea:
Use a package manager to find out whether it’s installed, like this:
blocks (2)
Then if it’s not installed, use an activity starter to open the app, like this:
blocks (3)
If it is installed, I can’t really get how you would open it, though. Also, I’m not sure that you could live stream. For anybody who wants to figure out how to play content, here’s the Java code: pastebin link

Edit: An alternative is to use the Google Home app. You can cast your phone screen there. I’m not sure how you would open to the “Cast my screen” page, though.

2 Likes

So, you don’t know how to open localcast from the application?

I know how to open it, I just don’t know how to play a video in it.
I don’t know how to do this part:

public void openLocalcastPlayer(String url, String title) {
    Intent intent = new Intent(Intent.ACTION_VIEW);
    Uri videoUri = Uri.parse(url);
    intent.setDataAndType(videoUri, "video/mp4");

I know how do do this part:

    intent.setPackage("de.stefanpledl.localcast");
    intent.putExtra("title", title);

    startActivity(intent);
    this.finish();
}

Can you show me how it would be to open it?

To just open it, with nothing provided:
blocks (4)

2 Likes

I once had an app that used this app, but I never used it in my apps. It was just an idea that I gave you.

Try @kendell_r advice and see if it works.

I tried but what I want is to enter a link in the app and I don’t know how…

It might be worth learning the basics of Kodular before proceeding to make such a demanding app.

I know a lot about Kodular but I haven’t found anything about Chromecast…

That’s okay. I don’t either.
What do you mean by

I don’t know how to enter a link

(excuse my English, it’s not the best…)

A link to the video?
A link to the casting app?
A text link or a button link?
A link to a website?
I can help you with most of these.

Now I am trying another method out of Kodular. I will see if it works.

It’s basically something like that using Web Video Caster

And the extras you can add are here (Not all are compatible):

http://mx.j2inter.com/api

4 Likes

How would it be to request installation?

Usa an ActivityStarter to open the app’s Google Play webpage. Here’s a guide to using ActivityStarters: http://appinventor.mit.edu/explore/ai2/activity-starter.html