Metrics, monitoring and improved playlist support
This release mostly focuses on metrics and monitoring. It makes it possible to inspect and monitor playback performance, both locally and remotely.
It also improves features associated with playlists, adding looping playback as well as a simpler way to manage items in a playlist at the user interface level.
Metrics
- Provide several key metrics during playback (bitrates, stalls, data requests, frame drops, etc.). Current metrics can be queries from
PlayerProperties
at any time, or obtained periodically usingperiodicMetricsPublisher(forInterval:queue:limit:)
. - Receive important events during playback (metadata and asset loading, errors, stalls, etc.) by subscribing to the
metricEventsPublisher
publisher. - The
MetricsCollector
observable object lets you easily create metrics visualizations, e.g. using SwiftUI or Swift Charts.
Monitoring
- Add PillarboxMonitoring package, offering seamless integration with Pillarbox monitoring platform.
- Provide
MetricsTracker
to automatically collect and send metrics data to Pillarbox monitoring platform.
Tracking
- Make trackers easier to implement with reliable access to properties when a tracker is disabled.
- Add metrics protocol method to
PlayerItemTracker
. - Add optional and mandatory behaviors to tracker adapters, letting you control how
isTrackingEnabled
affects them. - Add support for optional session identifiers, letting you associate an identifier with a tracker, useful to relate data remotely collected by a tracker with an associated local session.
Playlist support
- The items of a
Player
can be simply displayed as aPlaylist
supporting usual actions (reorder, delete). - A
source
can be associated to items, making it possible to display any kind of relevant data in a playlist user interface. - Repeated playback of a single item or of an entire playlist can be enabled with the new
repeatMode
player property.
Miscellaneous improvements
- Add date support for streams embedding timestamps. A seek method accepting a date as parameter has been enabled and a
date()
method has been added to retrieve the current date. - Make smart navigation interval configurable.
- Improve server support in CoreBusiness by adding support for custom server URLs and query parameters.
- Add Audio Description information to Commanders Act analytics labels.
- Add date interval measurement operator to the Core package.
- Add stopwatch to the Core package.
- Remove Timelane.
Breaking changes
- Update
PlayerItemTracker
protocol method signatures. Implementations can also be made simpler using properties now provided when a tracker is disabled. PlayerConfiguration
navigation mode is now set through anavigationMode
property instead of a simple Boolean flag.- Commanders Act and comScore events captured do not require a leading dot anymore.
- The player current item is set using
currentItem
. The index-basedcurrentIndex
andsetCurrentIndex(_:)
APIs have been removed accordingly. - The current time was retrieved from a
time
property which, for consistency, has been replaced with atime()
function.
Fixes
- Make User Agent reliable in Commanders Act events.
Demo improvements
- Make tvOS Playback HUD, displaying various streaming key metrics, also available on iOS. The HUD can be enabled and customized under the demo Settings tab.
- Add metrics debugging view to the main custom player layout, accessible from its settings menu.
- Provide more entry options for custom URL and URN entry (token, DRM, server).
- Make the custom player slider accessible with VoiceOver.
- Add basic keyboard shortcut support.
- Add BBC and Mux test streams.
- Display metrics session identifier when a failure is encountered while playing SRG SSR content. This makes it possible to relate a playback session to data visualized remotely.
- Improve automatic keyboard dismissal.
What's changed
- Add Swift Package Index documentation links by @defagos in #889
- Update SwiftLint to version 0.55.1 by @defagos in #890
- Improve server support in Core Business by @defagos in #891
- Add playback HUD support by @defagos in #893
- Immediately dismiss the keyboard when scrolling by @defagos in #895
- Update Xcode to version 15.4 by @defagos in #896
- Make smart navigation interval configurable by @defagos in #902
- Provide audio description information in analytics labels by @defagos in #894
- Add basic keyboard shortcut support by @defagos in #898
- Add support for token-protected and DRM-encrypted URLs to the demo by @defagos in #907
- Add useful testing information for stream encoding and packaging teams by @defagos in #910
- Gather player metrics by @defagos in #912
- Simplify the gathering of player metrics by @waliid in #915
- Update issue templates by @defagos in #914
- Add metrics collector by @defagos in #916
- Add SRG SSR environment support to URN entry by @defagos in #919
- Use built-in player metadata image retrieval by @defagos in #921
- Measure startup times by @waliid in #920
- Make metric event API more ergonomic by @defagos in #922
- Improve behavior for streams providing no metrics by @defagos in #923
- Document PillarboxPlayer APIs as supported on the main thread only by @defagos in #932
- Localize MB unit by @defagos in #933
- Fix incorrectly rounded displayed data volume by @defagos in #934
- Provide metric events for fatal errors by @defagos in #937
- Capture stalls in QoS metrics by @defagos in #938
- Provide warnings in QoS metric events by @defagos in #939
- Display event log in metrics debugging view by @defagos in #942
- Add BBC and Mux test streams to the demo by @defagos in #949
- Revisit player item tracking by @waliid in #950
- Reuse comScore session when pausing at item end by @defagos in #952
- Create basic QoS tracker by @waliid in #953
- Send QoS tracker payload data to a specific endpoint by @waliid in #962
- Update 3rd party dependencies by @defagos in #965
- Wait until the User Agent is retrieved by Commanders Act by @defagos in #964
- Update metrics tracker to most recent specifications by @defagos in #967
- Display monitoring session identifier in metrics debugging view by @defagos in #968
- Fix incorrect y-axis data volume scale by @defagos in #969
- Extract settings menu by @defagos in #972
- Add mandatory tracker support by @defagos in #971
- Update metrics tracker to most recent specifications by @defagos in #974
- Fix incorrect negative metrics when toggling AirPlay by @defagos in #976
- Remove Timelane by @defagos in #978
- Update metrics tracker to most recent specifications by @defagos in #977
- Document monitoring and metrics support by @defagos in #979
- Update SwiftLint to version 0.56.1 by @defagos in #980
- Improve metric event name consistency by @defagos in #983
- Avoid returning metrics for reserved items by @defagos in #982
- Fix missing comScore labels when replaying content by @defagos in #985
- Improve playlist user interface integration by @defagos in #986
- Fix incorrect metadata timings after recovering from failure by @defagos in #990
- Update SwiftLint to version 0.56.2 by @defagos in #991
- Fix incorrect QoE timing after recovering from failure by @defagos in #992
- Support repeat modes by @waliid in #993
- Add date support by @defagos in #994
- Make the player custom slider accessible via VoiceOver by @defagos in #995
Full Changelog: 2.0.0...3.0.0