Releases: FastPix/flutter-core-data-sdk
Releases · FastPix/flutter-core-data-sdk
v2.0.0
[2.0.0] - 2026-05-22
A major release with significant architectural changes. This release contains breaking API changes — see the Breaking Changes section below for the migration steps.
Added
- SQLite-backed
EventStorefor disk-persisted event queueing so events survive process death and slow networks. SubmissionPipelinethat builds and dispatches events strictly in submission order, eliminating race conditions between fast follow-up events (e.g.pause→seeking→seeked).ScalingTrackerfor time-weighted video scaling analytics (up-scale / down-scale durations and percentages).- Request-level events:
requestCompleted,requestCanceled,requestFailedfor HTTP/segment-fetch instrumentation. - App lifecycle handling: automatic background flushing and
viewCompletedemission on app kill. - Independent view and player sequence counters so cross-counter ordering matches the wire-format spec.
- Exponential backoff for failed event deliveries.
- Synchronous playhead polling pattern — hosts cache the playhead and the SDK reads it synchronously, avoiding platform-channel deadlocks during codec init.
- Enhanced
MetricsLoggerwith ANSI color coding and debug trace points (dispatch:received,process:start, etc.). - Comprehensive example app for Android and iOS demonstrating BetterPlayer integration.
- New
VariantChangedEventfield-level fallback: whenChangeTrackis missing or contains placeholder'0'/empty values (e.g. from BetterPlayer's HLS-parser defaults), the SDK now falls back to thePlayerObserverforvideoSourceWidth,videoSourceHeight,mimeType,frameRate, andbitrate. - Expanded
PlayerObserverinterface with:playerHeight,playerWidth,videoSourceWidth,videoSourceHeight,playHeadTime,mimeType,sourceFps,sourceAdvertisedBitrate,sourceAdvertiseFrameRate,sourceDuration,isPause,isAutoPlay,preLoad,isBuffering,playerCodec,sourceHostName,isLive,sourceUrl,isFullScreen,getPlayerError,getVideoCodec,getSoftwareName,getSoftwareVersion. - Expanded
VideoDatawithvideoCDN,videoDrmType,videoSeries,videoProducer,videoContentType,videoVariant,videoLanguage,fpPlaybackId,foMediaId,fpLiveStreamId.
Changed
PlayerObserveris now anabstract interface class(formerly a mixin). Hosts mustimplementit and provide every getter.FastPixMetricsBuilderAPI: replaces the per-field setters onFastPixMetrics.builder(). The new builder takes aMetricsConfigurationobject and aPlayerObserverinstance.CustomDatais now a single object withcustomField1–customField10(formerly aList<CustomData>with avaluefield).MetricsConfiguration.customDatais nowCustomData?(singular) instead ofList<CustomData>?.- Repository and homepage URLs updated to the
fastpix.comdomain.
Breaking Changes
Migrating from 1.x to 2.0.0:
- Implement
PlayerObserveron your host player class. Every getter must return real data from your player. See README for the full interface and a BetterPlayer reference implementation. - Replace the old builder with the new one:
// Before (1.x) final metrics = FastPixMetrics.builder() .setWorkSpaceId('ws') .setBeaconUrl('https://beacon') .setViewerId('v1') .build(); // After (2.0.0) final metrics = FastPixMetricsBuilder() .setPlayerObserver(myPlayerObserver) .setMetricsConfiguration(MetricsConfiguration( workspaceId: 'ws', beaconUrl: 'https://beacon', viewerId: 'v1', )) .build();
- Update
CustomDatausage — pass a single object with named fields:// Before (1.x) final customData = [CustomData(value: 'movie'), CustomData(value: 'action')]; // After (2.0.0) final customData = CustomData( 'movie', // customField1 'action', // customField2 // ...customField3..10 );
- Cache the playhead in your host and return it synchronously from
PlayerObserver.playHeadTime(). The SDK no longer awaits the platform channel during event dispatch.
Fixed
_handleChangedTrackEventpreviously poisonedChangeTrackwith placeholder zeros/empty strings on the BetterPlayer init-timedefaultTrackdispatch, masking real values on subsequent events. Subsequent event builds now coalesce empty/'0'track values to the observer fallback.