Datazoom is a high-availability real-time data collection solution. This document summarizes how to integrate the Brightcove iOS video player with the Datazoom platform.
- Login to Datazoom here: https://app.datazoom.io
- Add a Collector as indicated here: How to add a Collector
- Copy the
config key
that was created at the end of the process
Click the icon indicated below to copy the Configuration Key
You will see this message:
4. Replace the <configuration id from Datazoom>
in Datazoom's DZBrightcoveCollector.framework
file with the Key you copied above.
5. Replace the <url given by Datazoom>
with <
https://platform.datazoom.io/beacon/v1/
>
6. Replace the <brightcove player object>
with your playerInstance
identifier
Initial setup
The DZBrightcoveCollector.framework file should be downloaded from Here.
Drag and drop the downloaded framework file into your Xcode project. Drag the file to the files inspector on the left side of Xcode. Make sure you check the box "Copy items" in the popup menu that displays while drag and drop the file.
Make sure that the framework added in the above step is present at the Embedded Binaries section under the General. If not present, add the framework by clicking the "+" button available at the same section
Steps for Swift Language based Applications:
After including the framework file, open the ViewController/View file, where the Brightcove player is included.
Import the framework using the following command:
import DZBrightcoveCollector
Initialize the framework by passing along the 'Configuration ID', and player instance:
DZBrightcoveCollector.dzSharedManager.initBrightcovePlayerWith(configID: <configuration id from Datazoom>, url: <provide connection url>, playerInstance: <brightcove player object>)
Run the app and observe the events captured in a Connector, data corresponding to MOBILE/iPhone in Platform, refers to the events tracked from iPhone.
Steps for ObjectiveC Language based Applications:
After including the framework file, Create a bridging header file, to allow interoperability of languages.
open the ViewController/View file, where the Brightcove player is included.
Import the following:
#import <AVKit/AVKit.h> #import <AVFoundation/AVFoundation.h> #import <DZBrightcovePlayer/DZBrightcovePlayer.h>
Initialize the swift class in the .h file.
DZBrightcovePlayer *dzObject;
In the .m file, allocate using:
dzObject = [[DZBrightcovePlayer alloc]init]; [dzObject initBrightcovePlayerWithConfigId: <configuration id from Datazoom>, url: <provide connection url>, playerInstance: <brightcove player object>];
Run the app and observe the events captured in a Connector, data corresponding to MOBILE/iPhone in Platform, refers to the events tracked from iPhone.
Demo Application
A demo application that shows the usage of this framework is available Here. This can be used to test the Datazoom framework
Comments
0 comments
Article is closed for comments.