Broadpeak SmartLib support
To test this feature and view the example code, please see the Apple (FPS) SDK 5 Example Code Quick Start guide.
The smartbeam example code shows how an application can playback streams in conjunction with Broadpeak SmartBeam set-top box. This example depends on the SmartLib library, which detects and controls SmartBeam set-top boxes connected to the same LAN as the Android device.
Building and running the Smart-Lib example code
To build Smart lib example code:
Install Cocoapods. The easiest way to do this is $ sudo gem install cocoapods; see the Cocoapods installation guide at https://cocoapods.org.
Change the username and password inside the podfile to the values associated with your smart lib account. Source https://username:[email protected]/ios/broadpeak/specs.git.
Run the pod install command from the working directory. This will fetch the smart lib dependency and make an .xcworkspace which you will use to build and install the example code.
Build and install the application from the .xcworkspace.
You must have your own Smart Lib account to fetch the dependency from Cocoapods.
You may need to update the streams inside the example code by changing the URLs in the ViewController.m. The variables to change are stream1 and stream2.
To run OTVAVPlayer
with a smartbeam gateway box, you must use an external library that creates a SmartLib client for the current streaming session and attaches it to the player. The following values are required to initiate the SmartLib client:
analyticsAddress: The URL for analytics
nanCDNHost: The address inside the device's home network where the nanoCDN is embedded, or discover if the discovery is enabled on the nanoCDN.
broadpeakDomainNames: The domain name list used to identify URL(s) using the Broadpeak product
A specific value "*"
is used to declare that all the given URLs are using the broadpeak product.
An empty value ""
is used to declare that no given URLs are using the Broadpeak value.
Discovery will take place if the Android device is in the same sub-network as the SmartBeam box.
Prerequisites
A SmartBeam box and the library mentioned in the example code.
Example code
The following example code is used to configure SmartLib.
Once the nanoCDN is registered, the SmartLib and the OTVAVPlayer
have been created, pass the stream URI to the client: