The FastPix Bitmovin Player SDK provides seamless integration between Bitmovin Player and the FastPix analytics platform. This SDK automatically tracks video playback events, metrics, and analytics data from your Bitmovin Player instances, enabling real-time monitoring and insights on the FastPix dashboard.
- Automatic Event Tracking – Automatically captures all playback events (play, pause, seek, buffering, etc.)
- Bitmovin Player Integration – Built specifically for Bitmovin Player Android SDK
- Real-time Analytics – Provides instant access to video performance metrics on the FastPix dashboard
- Minimal Setup – Easy integration with just a few lines of code
- Custom Metadata – Support for custom video and player metadata
- Minimum Android SDK: 24 (Android 7.0)
- Target/Compile SDK: 35+
- Bitmovin Player SDK: 5.0+
- Kotlin: 2.0.21+
- Java: 11
Add the GitHub Packages repository to your project's settings.gradle.kts:
dependencyResolutionManagement {
repositories {
google()
mavenCentral()
maven {
url = uri("https://maven.pkg.github.com/FastPix/android-data-bitmovin")
credentials {
username =
project.findProperty("lpr.user")
password =
project.findProperty("lpr.key")
}
}
}
}Add the FastPix Bitmovin Player SDK and Bitmovin Player dependencies to your app's build.gradle.kts:
dependencies {
// FastPix Bitmovin Player SDK
implementation("io.fastpix.data:bitmovin:1.0.0")
}Create or update local.properties in your project root with your GitHub credentials:
lpr.user=YOUR_GITHUB_USERNAME
lpr.key=YOUR_GITHUB_PERSONAL_ACCESS_TOKENNote: Make sure to add
local.propertiesto your.gitignoreto keep credentials secure.
Add the Bitmovin PlayerView to your activity/fragment layout:
<com.bitmovin.player.PlayerView
android:id="@+id/bitmovin_player_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:initialize_player="false"
app:use_controller="false"
app:auto_show="false" />Here's a complete example of how to integrate FastPix SDK with Bitmovin Player:
import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import com.bitmovin.player.api.source.Source
import com.bitmovin.player.api.source.SourceConfig
import com.bitmovin.player.api.source.SourceType
import io.fastpix.data.domain.model.CustomDataDetails
import io.fastpix.data.domain.model.PlayerDataDetails
import io.fastpix.bitmovin_player_data.src.CustomerData
import io.fastpix.bitmovin_player_data.src.FastPixBitMovinPlayer
import io.fastpix.data.domain.model.VideoDataDetails
import java.util.UUID
class MainActivity : AppCompatActivity() {
private lateinit var binding: ActivityMainBinding
private var bitmovinData: FastPixBitMovinPlayer? = null
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
binding = ActivityMainBinding.inflate(layoutInflater)
setContentView(binding.root)
// Configure Bitmovin Player first
configureBitmovinPlayer()
// Then configure FastPix SDK
configureFastPix()
}
private fun configureBitmovinPlayer() {
val player = Player(context = this)
binding.bitmovinPlayerView.player = player
binding.bitmovinPlayerView.setUiVisible(false)
val source = Source(SourceConfig(
url = "your-video-url",
type = SourceType.Hls,
title = "video-title",),)
player.load(source)
player.play()
setupPlayerListeners()
}
private fun configureFastPix() {
// Create video metadata
val videoDataDetails = VideoDataDetails(
videoId = "video-id",
videoTitle = "Sample Video",
videoSeries = "Sample Series",
videoProducer = "Producer Name",
videoContentType = "Video Content Type",
videoVariant = "HD",
videoLanguage = "en",
videoDrmType = null // or "Widevine", "FairPlay", etc.
)
// Create customer data configuration
val customerData = CustomerData(
workSpaceId = "workspace-id", // Your FastPix workspace ID
beaconUrl = null, // Optional: Custom beacon URL
videoDetails = videoDataDetails,
playerData = PlayerDataDetails(
playerName = "Bitmovin",
playerVersion = "player-version" // Your BitmovinPlayer version
),
customDataDetails = CustomDataDetails(
customField1 = "custom-value-1",
customField2 = "custom-value-2"
// Add up to customField10 if needed
)
)
// Initialize FastPix SDK
bitmovinData = FastPixBitMovinPlayer(
this,
binding.bitmovinPlayerView,
binding.bitmovinPlayerView.player,
enableLogging = true,
customerData = customerData
)
}
override fun onResume() {
super.onResume()
binding.bitmovinPlayerView.onResume()
}
override fun onPause() {
super.onPause()
binding.bitmovinPlayerView.onPause()
}
override fun onDestroy() {
super.onDestroy()
// Important: Release BitmovinPlayer and FastPix SDK
binding.bitmovinPlayerView.unLoad()
bitmovinData?.release()
}
}The CustomerData class accepts the following parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
workSpaceId |
String | ✅ | Your FastPix workspace identifier |
beaconUrl |
String | ❌ | Custom beacon URL (default: metrix.ws) |
videoDetails |
VideoDataDetails | ❌ | Video metadata (see below) |
playerData |
PlayerDataDetails | ❌ | Player information (default: "bitmovin-player", "3.+") |
customDataDetails |
CustomDataDetails | ❌ | Custom metadata fields |
Configure video metadata for better analytics:
val videoDataDetails = VideoDataDetails(
videoId = "unique-video-id", // Optional
videoTitle = "Video Title", // Optional
videoSeries = "Series Name", // Optional
videoProducer = "Producer Name", // Optional
videoContentType = "Movie/TV Show", // Optional
videoVariant = "HD/SD/4K", // Optional
videoLanguage = "en", // Optional
videoDrmType = "Widevine" // Optional
)Add custom metadata fields (up to 10 fields):
val customDataDetails = CustomDataDetails(
customField1 = "value1",
customField2 = "value2",
// ... up to customField10
)Here's a more complete example with custom controls:
class VideoPlayerActivity : AppCompatActivity() {
private lateinit var binding: ActivityMainBinding
private var bitmovinData: FastPixBitMovinPlayer? = null
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
binding = ActivityMainBinding.inflate(layoutInflater)
setContentView(binding.root)
// Configure Bitmovin Player first
initializePlayer()
// Then configure FastPix SDK
configureFastPix()
}
private fun initializePlayer() {
val player = Player(context = this)
binding.bitmovinPlayerView.player = player
binding.bitmovinPlayerView.setUiVisible(false)
val source = Source(
SourceConfig(
url = "video-url",
type = SourceType.Hls,
title = "video-title",
),
)
player.load(source)
player.play()
setupPlayerListeners()
}
private fun setupFastPix() {
val videoDataDetails = VideoDataDetails(
videoId = "video-id",
videoTitle = "video-title",
videoSeries = "Sample Series",
videoProducer = "Sample Producer",
videoContentType = "Video Content",
videoVariant = "HD",
videoLanguage = "en"
)
val customerData = CustomerData(
workSpaceId = "workspace-id",
videoDetails = videoDataDetails,
playerData = PlayerDataDetails("bitmovin", "player-version"),
customDataDetails = CustomDataDetails(
customField1 = "custom-data-1"
)
)
bitmovinData = FastPixBitMovinPlayer(
this,
binding.bitmovinPlayerView,
binding.bitmovinPlayerView.player,
enableLogging = true,
customerData = customerData
)
}
override fun onResume() {
super.onResume()
binding.bitmovinPlayerView.onResume()
}
override fun onPause() {
super.onPause()
binding.bitmovinPlayerView.onPause()
}
override fun onDestroy() {
super.onDestroy()
binding.bitmovinPlayerView.onDestroy()
bitmovinData?.release()
bitmovinData = null
}
}It's crucial to properly manage the SDK lifecycle:
- Initialize the SDK after BitmovinPlayer is configured
- Call
onResume()andonPause()on BitmovinPlayerView in your activity lifecycle - Always call
release()inonDestroy()to clean up resources
override fun onDestroy() {
super.onDestroy()
binding.bitmovinPlayerView.unLoad()
bitmovinData?.release()
}Enable logging during development:
bitmovinData = FastPixBitMovinPlayer(
this,
binding.bitmovinPlayerView,
binding.bitmovinPlayerView.player,
enableLogging = true,
customerData = customerData
)Logs will appear in Logcat with the tag FastPixBitMovinPlayer.
- Ensure you've initialized the SDK after configuring BitmovinPlayer
- Check that
workSpaceIdis correct - Verify BitmovinPlayer events are firing (check BitmovinPlayer logs)
- Enable logging to see FastPix SDK activity
- Always call
release()inonDestroy() - Ensure
BitmovinPlayerView.onDestroy()is called before releasing FastPix SDK
- The SDK automatically tracks all events from BitmovinPlayer
- Events are tracked based on BitmovinPlayer's native event system
- Check that BitmovinPlayer is properly configured and receiving events
For questions, issues, or feature requests:
- Email: support@fastpix.io
- Documentation: FastPix Documentation
- GitHub Issues: Report an issue
Copyright © 2025 FastPix. All rights reserved.
This SDK is proprietary software. Unauthorized copying, modification, distribution, or use of this software is strictly prohibited.