The Amazon Fire TV module extends Connect SDK to add Amazon Fire TV and Fire TV Stick devices using the Fling SDK. This repository is included as a submodule in the main project, and requires manual setup before the main project will compile.
This module acts a layer on top of Amazon’s Fling SDK, and requires the Fling SDK framework to function. It provides the following functionality:
-
Media playback
-
Media control
Using Connect SDK for discovery/control of Fire TV devices will result in your app complying with the Amazon Fling SDK terms of service.
For more information about Connect SDK, visit the main repository.
-
Download the Amazon Fling SDK from the Amazon website.
-
Unzip
ios-sdk/frameworks/AmazonFling.framework
andios-sdk/frameworks/third_party_framework/Bolts.framework
into themodules/firetv/Frameworks/
directory. -
In your project: link
AmazonFling.framework
,Bolts.framework
,libc++.dylib
, andAdSupport.framework
with your application target:-
either drag them from the
ConnectSDK
project into your project’sFrameworks
group and then add them to your target; -
or go to your project settings, select the application target, "Build Phases" tab, in "Link Binary With Libraries" section click "+", then "Add Other…", and select
AmazonFling.framework
andBolts.framework
files; then click "+" and add systemlibc++.dylib
andAdSupport.framework
files.
-
-
Add this repository as a submodule into the Connect SDK Lite project, e.g.:
git submodule add https://github.com/ConnectSDK/Connect-SDK-iOS-FireTV.git firetv
-
Add this directory to the Connect SDK Lite Xcode project (
ConnectSDK
target). -
Amend the target memberships:
-
Change the target membership of
*.m
files inFireTVTests/
directory fromConnectSDK
toConnectSDKTests
. -
Change the target membership of
*.m
files inFireTVIntegrationTests/
directory fromConnectSDK
toConnectSDKIntegrationTests
. -
Remove the
XCTestCase+TaskTests.h
file from theConnectSDK
target. -
In the
ConnectSDK
target’sHeaders
build phases, move allFireTV*
headers fromProject
toPublic
section.
-
-
Download the Amazon Fling SDK from the Amazon website.
-
Unzip
ios-sdk/frameworks/AmazonFling.framework
andios-sdk/frameworks/third_party_framework/Bolts.framework
into themodules/firetv/Frameworks/
directory. -
Add the
AmazonFling.framework
andBolts.framework
to the Xcode project (ConnectSDK
,ConnectSDKTests
, andConnectSDKIntegrationTests
targets). -
Link
libc++.dylib
andAdSupport.framework
withConnectSDKTests
,ConnectSDKIntegrationTests
, and your application targets. -
Add a reference to the
FireTVService
andFireTVDiscoveryProvider
classes in theConnectSDKDefaultPlatforms.h
file.
-
Play state subscription: currently,
FireTVService’s `-[MediaControl subscribePlayStateWithSuccess:failure:]
only supports one subscription, that is this method allows adding multiple handlers, but the returned object is the same, so calling-unsubscribe
will unsubscribe all the handlers. -
Stopping discovery: due to the specifics of the Amazon Fling SDK, stopping the discovery provider (via
-[DiscoveryManager stopDiscovery]
) will remove all found Fire TV devices! The Fling SDK’s discovery part is required forFireTVService
to work properly. -
FireTV devices and DIAL: Amazon Fling SDK doesn’t provide the IP address of a device, but a unique identifier instead. However, the DIAL device description doesn’t include that identifier, so Connect SDK is unable to merge those two services in the same
ConnectableDevice
at this point. When using bothFireTVService
andDIALService
, you will get two differentConnectableDevice
objects with one of the services, representing the same physical FireTV device. -
FireTV service supports
WebVTT
format only. Subtitles on Fire TV are hidden by default. To display them, the user should manually pick one in the media player (click the "Options" button on the remote). The Fling SDK doesn’t provide any way to make them appear remotely.
Copyright (c) 2015 LG Electronics.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.