Users can select a video to see the details or play the video locally on the mobile device. The app fetches a list of videos from a remote web server and provides a list for the user to browse. If you notice it doesn't, try killing and restarting http-server. Note, as you're working through this codelab, http-server should be picking up changes you make.
You may install node.js, the http-server and ngrok node module. If you don't have any server available to you, don't fret. The user can select a video from a list and can then play the video locally on the device or Cast it to a Google Cast device. app-done-The complete code for the finished sample video app.įirst, let's see what the completed sample app looks like.app-start-The starting code that you'll build upon in this codelab.The cast-videos-cast codelab repository contains two sample projects: You can download all the sample code to your computer. How will you use this tutorial? Read it through only Read it and complete the exercises How would you rate your experience with building web apps? Novice Intermediate Proficient How would you rate your experience with watching TV? Novice Intermediate Proficient If you are in a location where the WiFi network isn't reliable, then the Chromecast device can be wired by using an ethernet adapter.
See the Android codelab about converting an Android video app to be Cast-enabled. The Google Cast SDK is also supported on Android Jelly Bean (SDK level 16) or later. If you do not have one, feel free to skip the Add Cast Connect Support step, towards the end of this tutorial. A Chromecast with Google TV is required to test Cast Connect integration but is optional for the rest of the Codelab.A Google Cast device such as a Chromecast or Android TV configured with internet access.
How to connect to a Cast device and launch a media receiver.How to add the Cast button for selecting a Google Cast device.