Google Cast API Update Brings 4K And More

Google always publishes Google Cast release notes for devs every time there’s a new release. Last month there was 3 updates which is unheard of but a lot went on last month. So this month has been quiet until now. Today Google has finally updated Cast to support 4K for all devs and not just partners coinciding with the release of the CC Ultra. This will require Google Play Services 10.0 which is rolling out and brings along the cast controls to all devices on network that’s received mixed feedback since its release. Theoretically this also opens up 4K to Android TV’s which were previously limited to 1080p via casting. If you want to checkout the release notes verbatim read below.

November 21, 2016

Android Sender

Requires Google Repository revision 39. (For Google Play services APK version 10.0.)

  • 4K video format: New method getVideoInfo() in MediaStatus gets the current instance of VideoInfo, a new class. 4K format is indicated by constants HDR_TYPE_*.
  • States of Cast session: New method CastContext.getCastState() exposes CastState which holds the current session state, such as whether devices are available and a session has been established.
  • New @drawable button attributes: Use these attributes to customize button styles in mini controller and expanded controller.
  • Fix image aspect ratio: ImagePicker now has an onPickImage handler that takes an ImageHints class with the expected aspect ratio that you can use to customize the MediaMetadata images that you provide to the SDK.
  • Route selector: New method CastContext.getMergedSelector() exposes MediaRouteSelector, which describes the routing of media channels and streams, from the current sender device to external screens, speakers, and other destination devices. Sender apps can discover and use these routes. Most developers don’t need to use this method since the v3 (framework) SDK does this and will work fine for most use cases.
  • Ad breaks: Two new classes have been added: AdBreakClipInfo contains static information about an ad break clip, such as the clip’s ID, content URL, mime type, total duration, and click-through URL. AdBreakStatus holds status information such as the playback position of the current ad break and clip.
  • Remote Control Notifications: When a user is casting, other devices on the same network will get a sticky notification to also control the playback. The user of the primary sender device can turn off these remote notifications globally in the Settings app at Google > Google Cast > Show remote control notifications.
  • CastContext methods: All methods in CastContext that your app calls must be called from the main thread, otherwise an Exception will be thrown.

Source: Google Developers

Anthony Garera

Anthony is usually tinkering with everything and anything because there's always one more thing to do, reviewing games and apps and complaining about things normal people don't think about.

More Posts - Website

Follow Me:
TwitterLinkedInGoogle PlusReddit