Datazoom is a high-availability real-time data collection solution. This document summarizes how to integrate the Bitmovin iOS/tvOS 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
config keythat was created at the end of the process
Click the icon indicated below to copy the Configuration Key
iOS / tvOS version 14.0+ (BitmovinPlayer requirement, ver. 3.40.0 )
XCode 14.1+ ( Swift 5.7.1+ )
The preferred way of installing DZCollector is via the Swift Package Manager.
Datazoom framework for Akamai AmpPlayer has one dependency - Bitmovin Player SDK.
The latest version of DZCollector was built against Bitmovin Player SDK version 3.40.0
Depending on the installation type for Datazoom package choose the type of installation for Bitmovin Player SDK.
Using Swift Package Manager
Open/Create a project in XCode
Add Swift Package Dependency - navigate to File → Add Packages
Paste the repository URL: https://gitlab.com/datazoom/apple/libraries-release/apple_bitmovin
For Rules, select Branch (with branch set to main) and click Add Package.
On the confirmation dialog click Add Package, again.
Check if the library is added to the project
Open the terminal and check if CocoaPods is installed in your machine.
If the above command returns no version number, then you'll need to install CocoaPods.
After installation, navigate to the Xcode project directory and create a Podfile configuration file if not present.
Run the command:
Add the DZCollector pod in the Podfile
Pull and update the latest Cocoapods pod specs
Be sure to close any current Xcode sessions and use `your_project_name.xcworkspace` for this project from now on.
Using XCFramework (manually)
Download DZ_Collector.xcframework.zip file from here, and unpack.
Drag and drop the downloaded frameworks 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.
In the selected XCode target, go to the General tab and scroll down to Frameworks, Libraries and Embedded Content (Embedded Binaries in older XCode versions). Make sure that the framework added in the above step is present. If not present, add the framework by clicking the "+" button available in the same section. Also, make sure that Embed option is set to Embed & Sign.
Usage for Swift Language-based Applications
Import and initialization of framework
Importing the framework using the following command:
Initialize the framework by passing along ConfigurationId (provided by Datazoom)
Sending custom events and setting custom metadata
Once the framework is successfully initialized you should be able to send custom events and set custom metadata.
If we want to connect custom metadata or event to a specific player context we can use the following method:
Separately we can also set, read, and clear app session related custom metadata by using the following methods:
We can also set, read, and clear player instance related custom metadata by using the following methods:
Initialization of player
There are several methods to initialize a player, depending on customer needs.
Create and Initialize Bitmovin Player with url:
Create and Initialize Bitmovin Player with url and send player custom metadata:
Initialize with already created Bitmovin Player:
Initialize with already created Bitmovin Player and send player custom metadata:
De-initialization of player
De-initialization of framework
Usage of Google IMA Ads
Download Client-Side SDK from:
Add the framework
Import the frameworkbitmovin
Add advertising configuration to player configuration (Bitmovin sample - BasicAds)