Tuesday, June 21, 2016

Announcing new Google Cast APIs

Posted by Nathan Camarillo and David Allison, Google Cast Product Managers

Google Cast makes it easy for developers to extend their mobile experiences to bigger screens and speakers. Since the launch of Chromecast, the first Google Cast device, we’ve seen tremendous success. 17 million Chromecast devices have been sold, with 1.5 billion touches of the Cast button, changing the way people watch TV. In the US, active Chromecast users are consuming 66% more content per day than at launch in July 2013. We see a 45% increase in YouTube watch time upon a Chromecast activation.

The Google Cast ecosystem continues to grow, with a range of new entertainment devices with Google Cast built-in-- from Chromecast and Android TV devices to speakers and soundbars.

Today at Google I/O, we are announcing new developer tools specifically for mobile app and game developers to bring new experiences to the TV.

Google Cast Remote Display APIs (Beta)

We are making it easy for mobile developers to bring graphically intensive apps or games to Google Cast receivers with Google Cast Remote Display APIs for Android and iOS.

While Casting your Android screen is an existing option for users, the new Remote Display API allows mobile developers to build a tailored, integrated second screen experience, without requiring an identical mirroring of content between mobile devices and the Google Cast device.

Remote Display will be available both iOS and Android. Your app will contain the same Google Cast icon allowing users to select a device. On Android, you’ll connect to the device using the helper class CastRemoteDisplayLocalService, then create a subclass of CastPresentation where you can call setContentView() to display any content you want (including drawing directly on a SurfaceView!). The contents of your CastPresentation are then sent over to the connected Google Cast device for display. On iOS, you’ll use the core Google Cast SDK to discover receivers and connect to one, then GCKRemoteDisplayChannel to establish a new Remote Display session. Your app will then send video and audio frames via the session. Adaptors for OpenGL ES and Metal are provided to help integrating Remote Display with existing rendering code.

There’s no need to write a receiver app as the Remote Display APIs are supported natively by all Google Cast receivers. However, you’ll still need to register a Remote Display App ID using the Google Cast SDK Developer Console.

See Remote Display in action with Driver® Speedboat Paradise:

Autoplay and Queuing APIs

Autoplay and Queuing APIs allow developers to create content queues and begin buffering a second video while a first video is finishing playback. This enables the creation of a continuous playback experience and can significantly increase watch time, helping lift per-session watch times by 10-20% or more.

Playing single media items on Chromecast has been something RemoteMediaPlayer (or CastCompanionLibrary’s VideoCastController) has been doing well for some time. With this release, RemoteMediaPlayer is gaining a full media queue, allowing you to queue up multiple MediaQueueItems, skip between items, set a repeat mode, reorder the queue, and enable autoplay for a seamless media playback experience. The MediaStatus returned to you will be augmented with the current queue of items as well as new OnPreloadStatusUpdatedListener, allowing you to display what will be played next. This ensures that all connected devices can easily maintain a synchronized queue of upcoming media items, opening up new possibilities of creating collaborative Google Cast media experiences.

Game Manager APIs for Google Cast

Since last November, Cast has had the ability to turn your TV screen into a game board, racetrack, dance floor, or trivia quiz—inviting everyone in your living room to use their phone as a personal game controller. Now we’re introducing new Game Manager APIs that will simplify the process for developers to build multiplayer games. To make it easier to synchronize game state across a potentially large number of players, Google Play services 7.5 introduces the Cast Game Manager API. This API, available for Android via the GameManagerClient class, iOS, Chrome, and for receivers, allows you to send messages and state changes to all connected clients and the receiver. All of the send methods also have a method that includes a specific player ID, making it possible to have multiple players sharing a single sender device.

All of these APIs are available on Android today. iOS and Chrome SDK updates will be available in the coming days.

You can learn more about these Google Cast APIs on the Google Cast Developers Site. We’re excited to see what you come up with to bring more mobile-centric experiences to the living room.

Related Posts by Categories

0 comments:

Post a Comment