25
Copyright © 2014 CommonsWare, LLC “Cast” To Your Own Device

“Cast” To Your Own Device · Works with Google Cast devices, plus potentially others ... Android-capable wireless (e.g., Bluetooth) ... Implementing MediaRouteProvider

  • Upload
    others

  • View
    3

  • Download
    0

Embed Size (px)

Citation preview

Page 1: “Cast” To Your Own Device · Works with Google Cast devices, plus potentially others ... Android-capable wireless (e.g., Bluetooth) ... Implementing MediaRouteProvider

Copyright © 2014 CommonsWare, LLC

“Cast” To Your Own Device

Page 2: “Cast” To Your Own Device · Works with Google Cast devices, plus potentially others ... Android-capable wireless (e.g., Bluetooth) ... Implementing MediaRouteProvider

Copyright © 2014 CommonsWare, LLC

Interest in Casting

● Chromecast● Streaming TV device● Control Options

– Web browser– iOS device– Android device

● Cheap, buzz-worthy

● Net: interest in Android apps casting to Chromecast

Page 3: “Cast” To Your Own Device · Works with Google Cast devices, plus potentially others ... Android-capable wireless (e.g., Bluetooth) ... Implementing MediaRouteProvider

Copyright © 2014 CommonsWare, LLC

The Cast Vision

● Media Centrally Located● Like... YouTube!

● App Playback Options● Play it back itself, for cases where there is no

Chromecast around or user wants local viewing● Tell Chromecast to play it back (and pause, and

seek, and stop, and...)

● Term: Remote Playback

Page 4: “Cast” To Your Own Device · Works with Google Cast devices, plus potentially others ... Android-capable wireless (e.g., Bluetooth) ... Implementing MediaRouteProvider

Copyright © 2014 CommonsWare, LLC

Casting Client Strategies

● What Google Wants: Cast SDK● Works with Google Cast devices

– Chromecast today– Android TV, partner equipment tomorrow?

● Proprietary

● Alternative: RemotePlaybackClient● Works with Google Cast devices, plus potentially

others● Open source

Page 5: “Cast” To Your Own Device · Works with Google Cast devices, plus potentially others ... Android-capable wireless (e.g., Bluetooth) ... Implementing MediaRouteProvider

Copyright © 2014 CommonsWare, LLC

The RemotePlaybackClient Flow

App

RemotePlaybackClientSome amount of magic

Remote player

Page 6: “Cast” To Your Own Device · Works with Google Cast devices, plus potentially others ... Android-capable wireless (e.g., Bluetooth) ... Implementing MediaRouteProvider

Copyright © 2014 CommonsWare, LLC

The RemotePlaybackClient Flow

App

RemotePlaybackClientRemote player protocol

Remote player

MediaRouteProvider

Page 7: “Cast” To Your Own Device · Works with Google Cast devices, plus potentially others ... Android-capable wireless (e.g., Bluetooth) ... Implementing MediaRouteProvider

Copyright © 2014 CommonsWare, LLC

MediaRouteProvider

● Bridge Between Client and Player● Converts media actions like play and pause into

whatever it takes to tell the player to do those actions

● Plugin● Distribute MediaRouteProvider to client devices as

part of an app● Chromecast MediaRouteProvider distributed via

Google

Page 8: “Cast” To Your Own Device · Works with Google Cast devices, plus potentially others ... Android-capable wireless (e.g., Bluetooth) ... Implementing MediaRouteProvider

Copyright © 2014 CommonsWare, LLC

MediaRouteProvider Examples

● “Mock” implementation for automated testing● Browser Playback

● Web page opens WebSocket, shows QR code with IP information

● Device scans QR code to configure MediaRouteProvider

● Cast to the Web page, which plays back media

Page 9: “Cast” To Your Own Device · Works with Google Cast devices, plus potentially others ... Android-capable wireless (e.g., Bluetooth) ... Implementing MediaRouteProvider

Copyright © 2014 CommonsWare, LLC

MediaRouteProvider Examples

● Alternative Ecosystems● Write media player app for Fire TV, OUYA, etc.● Write MediaRouteProvider for use on client device

to talk to your app running on TV-connected device for remote control

● Alternative Hardware● Embedded media player, exposing protocol over

Android-capable wireless (e.g., Bluetooth)● MediaRouteProvider converts commands to

requests over this wireless protocol

Page 10: “Cast” To Your Own Device · Works with Google Cast devices, plus potentially others ... Android-capable wireless (e.g., Bluetooth) ... Implementing MediaRouteProvider

Copyright © 2014 CommonsWare, LLC

Who Uses Your Provider?

● Your Client App● Ensures that if your MediaRouteProvider is

installed, the client device has something to “cast” content to it

● Any Other RemotePlaybackClient-using App● Ideally, some decent subset of those for

developers aiming at Chromecast● Will help once more remote players have market

presence

Page 11: “Cast” To Your Own Device · Works with Google Cast devices, plus potentially others ... Android-capable wireless (e.g., Bluetooth) ... Implementing MediaRouteProvider

Copyright © 2014 CommonsWare, LLC

Implementing MediaRouteProvider

● Create a MediaRouteProvider● Register it for specific routes

● Via specially-crafted IntentFilters

● Supply a RouteController to handle actions● Details are up to you

● Create a MediaRouteProviderService to publish MediaRouteProvider, add to manifest

Page 12: “Cast” To Your Own Device · Works with Google Cast devices, plus potentially others ... Android-capable wireless (e.g., Bluetooth) ... Implementing MediaRouteProvider
Page 13: “Cast” To Your Own Device · Works with Google Cast devices, plus potentially others ... Android-capable wireless (e.g., Bluetooth) ... Implementing MediaRouteProvider
Page 14: “Cast” To Your Own Device · Works with Google Cast devices, plus potentially others ... Android-capable wireless (e.g., Bluetooth) ... Implementing MediaRouteProvider
Page 15: “Cast” To Your Own Device · Works with Google Cast devices, plus potentially others ... Android-capable wireless (e.g., Bluetooth) ... Implementing MediaRouteProvider
Page 16: “Cast” To Your Own Device · Works with Google Cast devices, plus potentially others ... Android-capable wireless (e.g., Bluetooth) ... Implementing MediaRouteProvider
Page 17: “Cast” To Your Own Device · Works with Google Cast devices, plus potentially others ... Android-capable wireless (e.g., Bluetooth) ... Implementing MediaRouteProvider
Page 18: “Cast” To Your Own Device · Works with Google Cast devices, plus potentially others ... Android-capable wireless (e.g., Bluetooth) ... Implementing MediaRouteProvider
Page 19: “Cast” To Your Own Device · Works with Google Cast devices, plus potentially others ... Android-capable wireless (e.g., Bluetooth) ... Implementing MediaRouteProvider
Page 20: “Cast” To Your Own Device · Works with Google Cast devices, plus potentially others ... Android-capable wireless (e.g., Bluetooth) ... Implementing MediaRouteProvider
Page 21: “Cast” To Your Own Device · Works with Google Cast devices, plus potentially others ... Android-capable wireless (e.g., Bluetooth) ... Implementing MediaRouteProvider
Page 22: “Cast” To Your Own Device · Works with Google Cast devices, plus potentially others ... Android-capable wireless (e.g., Bluetooth) ... Implementing MediaRouteProvider
Page 23: “Cast” To Your Own Device · Works with Google Cast devices, plus potentially others ... Android-capable wireless (e.g., Bluetooth) ... Implementing MediaRouteProvider
Page 24: “Cast” To Your Own Device · Works with Google Cast devices, plus potentially others ... Android-capable wireless (e.g., Bluetooth) ... Implementing MediaRouteProvider
Page 25: “Cast” To Your Own Device · Works with Google Cast devices, plus potentially others ... Android-capable wireless (e.g., Bluetooth) ... Implementing MediaRouteProvider

Copyright © 2014 CommonsWare, LLC

Other MediaRouteProvider Capabilities

● Volume control● Session management

● Playback queues, managed by different users