Originally Posted by ermacwins
@Asphyx you seem to know quite abbit about chromecast. Can you point me in the direction of what is need to play local files from a code point of view? We were thinking of making a video player with cast support built in. From what we tried from viral (app in my sig), it plays online streams (non youtube) but doesnt show cast icon for local files.
Coding isn't really my forte, I can code (most of my work is on OS/Firmware) and do debug code but most of my work with it is from the engineering side of the equation. @bubbleguuum
might be better suited to answer your request. But most all of what you need is in the CCast SDK. The rest is all part of the Android SDK (things like Media Router which you probably already use (or should be) to find your available CCast devices)
Not familiar with your App or how your doing your CCast icon. (so forgive any wrong assumptions here) Cast Icon should be displayed anytime there is a CCast detected on the network regardless of the content, but I'm guessing your just using the YouTube Cast Icon that is built into the YouTube web based player app which is why when other content is displayed your not getting a cast Icon.
A solution will soon be available as JW Player (a VERY popular way to embed HTML5 Video into Web pages) has announced they will add CCast support to their Web Player. Since that can also play You Tube it might solve all of your problems except the navigation part of browsing which files to cast.
But until it is actually available your really going to have to use the CCast SDK and create your own Cast Icon, detect available units and send the proper linkage to the CCast. How that needs to be done will vary based on the Player/receiver app you have created to run on the CCast side.