Congratulations to the About Objects team at DIRECTV for their well-received implementation of the NFL Sunday Ticket Chromecast app. The app is currently featured by Google, and was highlighted in Google’s September 2015 new Chromecast release as a premier example of a powerful, second screen Chromecast experience.
Given my strong affiliation with Apple's platforms, people are sometimes surprised to learn that I've been responsible for leading our Google Chromecast strategic partnership the past few years. Did I go over to the dark side? Maybe. Have I ridden a rainbow colored bicycle? Possibly.
Actually though, we've been working with a number of companies in the digital media space, helping them capitalize on the cord-cutting trend. At its core, Chromecast allows users to stream content on everything from mobile devices to large-screen TVs. It’s sort of somewhere in between Apple’s AirPlay and a full-blown Apple TV app (we develop those too!). The big difference is that with Chromecast your app controls the whole experience and becomes your remote control, allowing for a much more immersive, second screen experience.
Chromecast implementations can present a number of potential land mines. Problems often crop up in dealing with DRM, adaptive bit rates, CORS headers, environment setup, error handling, networking issues, UI synchronization, and automatic reconnect, as well as determining when and when not to use custom channels.
What’s most interesting to our developers is the challenge of architecting an elegant Chromecast solution in the context of an existing mobile app. Integrating Chromecast (especially with iOS apps) tends to be an afterthought, and none of the apps we've dealt with were designed with that sort of integration in mind. It tends to be such an outlier that it can stress the application architecture in dramatic ways, often uncovering significant weaknesses.
Getting It Right The First Time
Obviously, it's important to spend some time upfront designing a solution that's the best fit for your current app architecture. Most of the Chromecast implementations I've seen tend to follow a basic pattern of intercepting calls to the video player and redirecting them to the Chromecast receiver.
The key is to avoid taking the easy path and tightly coupling your Chromecast implementation with existing code. The alternative would require adding otherwise unnecessary conditional logic to the codebase, making it more fragile. And the likelihood of introducing regression bugs would increase dramatically.
Thinking through these issues affords an excellent opportunity to dust off your Gang of Four design patterns. I’ll be posting soon some examples on how you can take advantage of patterns such as Decorator, Proxy, and Receptionist to simplify your implementation. Coming up with a strategic approach that allows you to encapsulate most, or all, of the Chromecast-specific API calls can greatly reduce overall development time, and improve the long-term maintainability of your integration.
One way or another, it’s important to get your app's Chromecast integration right. Remember, many Chromecast consumers use the device as their primary way to watch TV, and they've gotten used to Chromecast working consistently across all their favorite apps (Netflix, YouTube, HBO Now, etc.).
To that end, Google provides detailed user interface guidelines to help ensure a consistent experience across all Chromecast-enabled applications. The lack of a polished user experience can infuriate those cord-cutting millennials out there --- and they can be pretty harsh in social media and in app store reviews when critiquing apps that don't meet expectations.