Amazon Fling
Easily integrate the Amazon Fling SDK to discover and control your FireTV in your app. This SDK is not open source and is owned by Amazon. This repo is used to integrate the AmazonFling SDK to iOS projects using Cocoapods.
Import AmazonFling and start using the SDK:
#import <AmazonFling/DiscoveryController.h>
#import <AmazonFling/RemoteMediaPlayer.h>
#import <AmazonFling/MediaPlayerStatus.h>
@implementation AppDelegate
...
- (void)applicationDidBecomeActive:(UIApplication *)application {
id myViewController = [self findViewController];
[myViewController resume];
}
...
@implementation ViewController
...
- (void)viewDidLoad {
...
mController = [[DiscoveryController alloc] init];
[mController searchPlayerWithId : @"amzn.thin.pl" andListener : self];
}
- (void)resume {
[mController resume];
}
- (void)deviceDiscovered:(id<RemoteMediaPlayer>)device {
[mDevices addObject:device];
// Update UI
}
- (void)deviceLost:(id<RemoteMediaPlayer>)device {
[mDevices removeObject:device];
// Update UI
}
- (void)discoveryFailure {
}
You need to install git lfs
because the Amazon Fling binary is too large for a normal git repository. You can do this via Homebrew using brew install git-lfs
. For more information visit Git LFS.
Amazon Fling SDK Release Notes
AmazonFling is available under the MIT license. See the LICENSE file for more info.