# 4.1.2

## Added

- Added `side-loaded tracks` (subtitles, thumbnails) downloads for `offline` playback (3103)
- Added `HLSSettings.nativeThumbnailsSeekTolerance` to allow setting seek tolerances for native thumbnails (4693)
- Added new `Widevine` components for exposing audio decrypted samples (4600)
- Added `resizeMode` for all the players (4704) - `videoGravity` will be removed in the future releases

## Changed

- Native Apple `thumbnails` now use HLS I-frame tracks when available, instead of extracting thumbnails from video segments (4693)
- Fixed `Youbora` `analyticsOptions` and `videoOptions` updating (4682)
- Allowed separate certification and provisioning URLs for `Widevine` (4623)
- Improved `waitForMetadata` support in `Youbora` plugin (4707) 
- Updated `NpawPlugin` to `7.3.31` (4716)
- Updated `MuxPlugin` to `5.13.0` (4720)

# 4.1.1

## Added

- Decoupled `BroadpeakSession` from the analytics part (4699)

## Changed

- Fixed H.264 playback on the `.castlabs` player engine (4686)
- Fixed `BroadpeakPlugin` keep-alives when precache if off (4689)
- Fixed `BroadpeakSession` teardown when player is released (4691)

# 4.1.0

## Added

- Added configurable per-state timeouts: `StateTimeoutConfiguration` in `PlayerConfiguration` and `onStateTimeout` in `CLObservableAVPlayer` (4582)
- Added extended download `error` data to MPEG-DASH error reports (4675)
- Added constant integer value for each PRESTOerror (4641)

## Changed

- Renamed `Ad.podPosition` to `Ad.adPosition` (4401)
- Fixed crash in `ApplePlayerViewController`, which was caused by UI change made from a background thread (4667)
- Improved `ad` related classes descriptions (3572)
- Improved subtitles view behavior when `Picture in Picture` is active (4634)
- Fixed fatal crash in `CastlabsApple` when `currentMediaSelection` is accessed (4640)
- Updated Broadpeak's `SmartLib` to `05.04.04.808048b` (4665)
- Fixed sideloaded subtitles rendering when using HLSPlayer (4635)
- Improved `Swift Package Manager` support by introducing separate complete and core package distribution options (4670)
- Fixed `live-edge speedup` playback to restore rate `1.0` when catch-up threshold is reached, preventing stalls near the live edge (3978)
- Improved `live-edge chasing` reliability (3978)
- Removed typealias `PRESTOError`; use `PRESTOerror` (4656)
- Improved system `Media Services Reset` handling for MPEG-DASH content - see `Playback` docs (3705)
- Fixed looping content while `AirPlay` is active (4655)
- Updated the main build Apple SDK and the toolchain to `Xcode 26.2` (4669)

# 4.0.27

## Changed

- Fixed player state when `Broadpeak` plugin is enabled (4659)
- Fixed failing `Widevine` license prefetching for `audio-only` streams (4662)

# 4.0.26

## Added

- Added `waitForAdResponse` to `AdsSettings` to control `Google IMA` main content start delay (4621)
- Added `open(config:)` in PlayerAPI (3888)
- Added `onSeekableTimeRanges` callback in `PlayerAPI` (4584)

## Changed

- Improved default `YouboraDemo` options (4638)
- Fixed MPEG-DASH downloader state on session cancelled (4625)
- Deprecated `open(autoplay:)` and `load(config:)` in PlayerAPI (3888)
- Improved `track selection` accessors for the players (4614)
- Unified `onTrackModel` calls for the players (4614)
- Aligned `PlayerViewControllerAPI` with `PlayerAPI`. Note: `isLive` and `seekableTimeRanges` are now non-optional on `PlayerViewControllerAPI`. (4539)
- Load grid and webvtt `thumbnails` asynchronously (4620)
- Improved `Fairplay` `authToken` support for native playlists (4536)
- Added support to `BroadpeakClient` to handle multiple `open()` and `load()` in `PlayerWrapper` (4646)
- Improved support to `BroadpeakClient` to handle multiple streaming sessions (4648)
- Exposed pre-caching config to `BroadpeakSettings` (4648)
- Fixed MPEG-DASH player issue causing playback failure when `seeking` to the start position (4649)

# 4.0.25

## Added

- Added `contextIdentifier` to `Request` and `Response` modifiers (4559)
- Added new `PRESTOerror` - `.sdk_internal_session_error` for internal component inconsistency (4559)
- Added flag `useRedirectedManifestURLForDownloads` to `PRESTOplaySDK.shared` for MPEG-DASH downloader to use redirected manifest URL as base for segment downloads (4569)

## Changed

- Improved `CastlabsYoubora` plugin support for `player.load` reloading (4629)
- Fixed `crash` when accessing `download` properties during updates (4569)
- Updated `GoogleCast` version for iOS to `4.8.4` (4617)
- Fixed updates of `YouboraMetadata` requested before `play()` (4628)
- Updated Youbora `NpawPlugin` to `7.3.18` (4630)
- Fixed `LiveConfiguration` parsing from JSON (4632)

# 4.0.24

## Added

- Added `Widevine` `DRMToday` licensing errors as part of `PRESTOerror.data` (4603)
- Exposed custom `NpawPlugin` in `YouboraPlugin` - `YouboraSettings` (4556)
- Added `DiagnosticOptions` to `YouboraSettings` (4296)
- Added custom `logLevel` to `YouboraSettings` (4512)
- Added `stateTimeout` to `PRESTOplaySDK.shared` to observe `.playing` state effective playback rate (4607)

## Changed

- Improved `AirPlay` status detection in `CastAPI` (4601)
- Fixed typos on `PRESTOerror.data` keys (4603)
- Improved `YouboraPlugin` to report subtitle and audio selection (4512)
- Changed `AirPlay` content key request `error` severity to `recoverable` (4601)
- Fixed player `state` transition from `error` to `idle` when `stop()` is called (4588)
- Fixed player `state` transition in case of `error` to follow the state graph (4589)

# 4.0.23

## Added

- Added extra HTTP headers from `NetworkConfiguration` for MPEG-DASH player (4581)
- Mapped newer HLS playlist media selection characteristics to the Track Model (4532)
- Added new property `name` to the Track properties (4532)
- Added CMCD support - `PlayerConfiguration` exposes `CmcdConfiguration` (4571)
- Added extra logs to `startTime` value set on `HLSPlayer` (4590)

## Changed

- Fixed re-attach of `subtitles` layer on system request (4576)
- Improved native playlists `authToken` handling (4536)
- Fixed subtitles and audio track selection re-apply for `loop`ed `HLS` streams (4544)
- Improved playback on MPEG-DASH player when app transitions to `background/foreground` (4514)
- Improved startup time for MPEG-DASH player when `startTime` is set (4566)
- Aligned downloader and player `track models` (4578)
- Fixed `assetId` parsing for `DRMToday` `keyIds` with empty `variantId` string (4593)
- Fixed loading for offline content downloaded before `4.0.14` (4594)
- Fixed missing audio in the MPEG-DASH player when switching audio tracks on iOS 26 (4522)

# 4.0.22

## Added

- Added `DRMToday` authentication token support for `MPEG-DASH` content (4521)
- Added `reportWarnings` flag to `AnalyticsAPI` with implementation for `Youbora` only (4561)
- Added `filterOutgoingErrorReport` callback to `AnalyticsAPI` with implementation for `Youbora` only (4561)

## Changed

- Improved native Apple `thumbnails` scrubbing performance (4497)
- Removed non-fatal errors reporting to `Youbora` by default (4561)
- Fixed incorrect detection of player position behind the `DVR window` (4540)
- Refactored `seek()` implementation and improved time sanitization for `HLS` playback (4558)
- Improved custom `HTTP headers` passing for the players (4560)
- Updated `IMA` version for `iOS` to SDK `3.27.4` (4531)
- Improved `Auto Layout` support for `ads` view (4531)
- Removed HLS playlist `interception` in stream download for `iOS 18.5` and above - Apple investigation (4490)
- Fix audio interruption when returning to foreground (4573)
- Improved loading for protected offline content (4517)

# 4.0.21

## Added

- Added `sessionId` to identify the source of errors in `onError` callback (4509)
- Added `picture in picture` support for `MPEG-DASH` player on iOS (4290)

## Changed

- Improved loading of asset `variants` (4524)
- Fixed `subtitle style` not updating (4516)
- Improved `AirPlay` state detection to support `MPRemoteCommandCenter` actions (4523)
- Fixed `player release` issue caused by strong references in closures (4513)
- Retain playback state when app enters `foreground` (4518)
- Fixed missing subtitles when `AirPlay` screen mirroring is enabled (4031)

# 4.0.20

## Added

- Added support for audiovisual `background` playback policy (4506)
- Added support for Widevine DRM URL from DASH manifest (4494)
- Added `avPlayerInstance` on PlayerViewControllerAPI (4496)

## Changed

- Improved `HLS` playlist exploring for Fairplay KeyIDs `prefetching` (4447)
- Added playback `interruption` handlers to SDK system state observers (4295)
- Fixed state transition from `.ended` to `.seeking` (4487)
- Improved support for `Chromecast` Custom Receivers (4482)
- Fixed seek operation issues on `MPEG-DASH` player (4511)
- Fixed end of `seek window` computation for DASH live streams (4380)
- Improved live playback `start time` and sync (4467)
- Retain playback state when app enters `foreground` (4518)
- The request/response `modify(subject:completionHandler: (Subject?, Error?) -> Void)` method is deprecated and will be removed in the next minor release; use `modify(subject:completionHandler: (Subject?) -> Void)` instead (4499)
- Added `triggerFatalError` method to `Player API` (4499)

# 4.0.19

## Added

- Added optional `completionHandler` handler for `getThumbnail` method in `ThumbnailsAPI` (4474)
- Added DVR window boundary detection - reports `player_behind_live_window` error when playback position falls outside DVR window (4387)
- Added `isAnalyticsEnabled` flag to `PlayerAPI` to toggle analytics event collection (4452)

## Changed

- Exposed detailed `PRESTOerror` documentation (4443)
- Added `SPM` 3rd part dependencies (4353)
- Fixed `video` rendering issue when returning to the foreground (4472)
- Fixed `audio` flush after another AV app switch back to the SDK (4489)
- Improve playback startup time for offline DASH content (4470)

# 4.0.18

## Added

- Added dedicated `AirPlay` component (4449)
- Extended `track model` with variant properties for native `HLSPlayer` (4466)
- Added `PRESTOplaySDK.shared.setup` as (future) replacement for `register` method (4457)

## Changed

- Improved `state transition` handling - `stop()` while `.opening` (4464)
- Fixed `HLSPlayer` keeps downloading issue after `stop()` (4450)
- Improved hvc1 parsing and device compatibility checks for `HEVC` (4441)
- Fixed `preroll` ads not being displayed (4463)
- Improved `player state` documentation (4442)
- Fixed `race condition` in player property setters (4468)
- Fixed video rendering issue when returning to the `foreground` (4472)
- Fixed `audio` playback `cracking` for MPEG-DASH when the app is in the background (4469)
