Monitor Kaltura Player
The FastPix Data SDK with KalturaPlayer helps you track key video metrics like user interactions, playback quality, and performance to enhance the viewing experience. It lets you customize data tracking, monitor streaming quality, and securely send insights for better optimization and error resolution.
Key features:
- Capture user engagement through detailed viewer interaction data.
- Monitor playback quality with real-time performance analysis.
- Identify and fix video delivery bottlenecks on Android.
- Customize tracking to match specific monitoring needs.
- Handle errors with robust reporting and diagnostics.
- Gain deep insights into video performance with streaming diagnostics.
Prerequisites:
To track and analyze video performance, initialize the SDK with your Workspace key. Learn about Workspaces.
- Access the FastPix Dashboard: Log in and navigate to the Workspaces section.
- Locate Your Workspace Key: Copy the Workspace Key for client-side monitoring. Include this key in your Java/Kotlin code on every page where you want to track video performance.
- Ensure kalturaPlayer is already configured in your project.
Install and setup
-
Open your Android Studio project where you want to integrate the SDK.
-
Add the FastPix Data SDK dependency:
-
Navigate to your app-level
build.gradlefile (orbuild.gradle.ktsif using Kotlin DSL).
Navigate to your settings.gradle file
-
Sync your project with Gradle files Click
Sync Nowin the notification bar to download and integrate the FastPix Data SDK.
Import the SDK
Ensure kalturaPlayer is already configured in your project.
Integrate with FastPix
-
Ensure that the
workSpaceIdis provided, as it is a mandatory field for FastPix integration, uniquely identifying your workspace. Install and importFastPixKalturaPlayerinto your project, and create anfastPixKalturaPlayerinstance to bind it to. If you are using any other custom player then create an instance of that player. -
Next, create an instance of
FastPixKalturaPlayerfor tracking the analytics. After the video URL loads and playback begins, the SDK automatically begins tracking analytics.
- You can initialize KalturaBasicPlayer with a
kalturaPlayerin your Android application to enable seamless functionality. Use the following Kotlin or Java code in your Android application to configure kalturaPlayer with FastPix:
Including custom data and metadata
workSpaceIdis a mandatory parameter that tells the SDK on which workspace the data will collect.playerViewis another mandatory parameter.
See the User-Passable Metadata documentation to understand the metadata supported by FastPix.
You can use custom metadata fields such as customField1 to customField10 for implementing your business logic, allowing you to pass any required values. Named attributes like videoId and videoTitle can be passed directly without any additional configuration.
- To set up video analytics, create a FastPixKalturaPlayer object by providing the following parameters: your application’s
Context(usually the Activity), theKalturaPlayerinstance, and thecustomerData.
- Finally, when destroying the player, make sure to call the
fastPixKalturaPlayer?.release()function to properly release resources.
- After completing the integration, start playing a video in your player. A few minutes after stopping playback, you’ll see the results in your FastPix Video Data dashboard. Log in to the dashboard, navigate to the workspace associated with your workspace_key, and look for video views.
CustomerData Parameters
The CustomerData class accepts the following parameters:
What FastPix Tracks
After initialization, the SDK automatically collects:
Example to configure Kaltura with FastPix Data SDK.
Provide your stream URL in url field"your-stream-url.m3u8" and your FastPix workspace Key in the workspaceId field.
Debug Logging
Enable logs using:
Troubleshooting
SDK Not Tracking Events
- Ensure you’ve initialized the SDK after configuring Kaltura Player
- Check that
workSpaceIdis correct - Verify Kaltura Player events are firing (check Kaltura Player logs)
- Enable logging to see FastPix SDK activity
Memory Leaks
- Always call
release()inonDestroy() - Ensure
kalturaPlayer?.destroy()is called before releasing FastPix SDK
Missing Events
- The SDK automatically tracks all events from Kaltura Player
- Events are tracked based on Kaltura Player native event system
- Check that Kaltura player is properly configured and receiving events
Change log
v1.0.4
Changes
- SDK & Dependencies
- Bumped
SDK_VERSIONto1.0.4inFastPixKalturaLibraryInfo.kt. - Updated publication version to
1.0.4inbuild.gradle.kts. - Updated
corelibrary dependency to version1.3.1inlibs.versions.toml.
- Bumped
- Documentation
- Updated version reference to
1.0.4inREADME.md. - Added entry for
v1.0.4inCHANGELOG.MD.
- Updated version reference to
v1.0.3
- Upgrades Core SDK to 1.3.0
v1.0.2
Changed
- SDK & Dependencies
- Updated
androidx.core:core-ktx(core) from1.2.7to1.2.9. - Updated
README.mddependency example to1.0.2.
- Updated
- FastPixKalturaPlayer Event Handling
- Adjusted pulse lifecycle to schedule periodic pulse events on
viewBegin,play, andbufferingtransitions. - Improved seek handling so pulse events are cancelled only when playback remains paused after
seeked, and resumed when playback continues. - Removed unnecessary pulse scheduling from
variantChangeddispatch to avoid duplicate pulse triggers.
- Adjusted pulse lifecycle to schedule periodic pulse events on
- Stability
- Guarded
FastPixAnalytics.release(...)with a null-check onfastPixDataSDKto avoid releasing analytics when SDK is not initialized.
- Guarded
v1.0.1
Changed
- SDK & Dependencies
- Bumped
io.fastpix.dataversion to1.0.1. - Updated
corelibrary version to1.2.7. - Removed
MuxKalturaSDKand associated Maven repositories from the project.
- Bumped
- FastPixKalturaPlayer Enhancements
- Switched to
FastPixAnalyticssingleton for SDK initialization and management. - Implemented a background pulse event mechanism (10-second interval) to track active playback sessions.
- Improved event lifecycle management by ensuring pulse events are cancelled during buffering, seeking, pausing, or errors.
- Refined
release()logic to ensure proper state cleanup and final position reporting. - Updated
PlayerListenerinterface implementation to match updated types for frame rate and duration.
- Switched to
- Cleanup
- Removed unused
Utils.ktand redundant Mux initialization code fromMainActivity. - Cleaned up unused Kaltura library dependencies from the app module.
- Removed unused
v1.0.0
Integration with Kaltura Player
- Added Kaltura Player integration with automatic video performance tracking using the FastPix Data SDK.
- Enabled playback event tracking, including play, pause, buffering, seek, and completion events.
- Added support for custom metadata such as video_id, video_title, video_series, video_language, and more.
- Included player metadata tracking with player name and version details.
- Added customizable behavior with options for logging, custom beacon URL, and metadata configuration.
- Implemented lifecycle-safe handling with automatic cleanup and resource release.
- Added support for switching videos with seamless tracking of new playback sessions.
Support
📩 Email: support@fastpix.com 📚 Docs: fastpix.com/docs