Inherits from NSObject
Conforms to GCKDeviceManagerDelegate
GCKDeviceScannerListener
UIActionSheetDelegate
Declared in APSChromecastManager.h
APSChromecastManager.m

Overview

The APSChromecastManager is a singleton that manages Google Cast connections for the Veeplay media player. To setup, simply set your cast app id on the shared instance:

    [APSChromecastManager sharedInstance].chromecastAppId = @"YOURAPPID";

Notifications

  • APSMediaPlayerChromecastDeviceOnline - Posted when a Chromecast device comes online.
  • APSMediaPlayerChromecastDeviceOffline - Posted when a Chromecast device goes offline.
  • APSMediaPlayerChromecastConnectedNotification - Posted when the manager connected to a Chromecast compatible device.
  • APSMediaPlayerChromecastDisconnectedNotification - Posted when the manager disconnected from a Chromecast compatible device.

Properties

chromecastAppId

Sets the Chromecast application ID to be launched when playing via Chromecast.

@property (nonatomic) NSString *chromecastAppId

Discussion

Sets the Chromecast application ID to be launched when playing via Chromecast.

Declared In

APSChromecastManager.h

Class Methods

sharedInstance

Returns the shared APSChromecastManager instance, creating it if necessary.

+ (instancetype)sharedInstance

Return Value

The shared APSChromecastManager instance

Discussion

Returns the shared APSChromecastManager instance, creating it if necessary.

Declared In

APSChromecastManager.h

Instance Methods

chromecastAvailable

Indicates whether there is a Chromecast device available

- (BOOL)chromecastAvailable

Discussion

Indicates whether there is a Chromecast device available

Declared In

APSChromecastManager.h

chromecastDevices

Returns a list of detected GCKDevices

- (NSArray *)chromecastDevices

Discussion

Returns a list of detected GCKDevices

Declared In

APSChromecastManager.h

connectToChromecastDevice:

Connect to a specified device

- (void)connectToChromecastDevice:(GCKDevice *)device

Parameters

device

A GCKDevice to connect to

Discussion

Connect to a specified device

Declared In

APSChromecastManager.h

currentChromecastDevice

Get the current GCKDevice

- (GCKDevice *)currentChromecastDevice

Discussion

Get the current GCKDevice

Declared In

APSChromecastManager.h

currentChromecastDeviceManager

Get the current GCKDeviceManager

- (GCKDeviceManager *)currentChromecastDeviceManager

Discussion

Get the current GCKDeviceManager

Declared In

APSChromecastManager.h

currentChromecastMediaControlChannel

Get the current media control channel

- (GCKMediaControlChannel *)currentChromecastMediaControlChannel

Discussion

Get the current media control channel

Declared In

APSChromecastManager.h

showChromecastDevices

Show an UIActionSheet with detected devices

- (void)showChromecastDevices

Discussion

Show an UIActionSheet with detected devices

Declared In

APSChromecastManager.h