diff --git a/theoplayer/changelog.md b/theoplayer/changelog.md index 9a56ddb980ec..29bd097b982a 100644 --- a/theoplayer/changelog.md +++ b/theoplayer/changelog.md @@ -5,6 +5,48 @@ sidebar_custom_props: { 'icon': '📰' } toc_max_heading_level: 2 --- +## 🚀 10.8.0 (2026/01/15) + +### Web + +#### ✨ Features + +- Added support for MPEG-DASH content steering. +- Added support for `player.metrics.bufferedSegments` when playing an HLS stream. + +#### ⚡ Improvements + +- OptiView Streaming sources now support more `TypedSource` properties, such as `TypedSource.abr` and `TypedSource.crossOrigin`. + +#### 🐛 Issues + +- Fixed an issue where some HLS live streams could stall indefinitely when playing over an `#EXT-X-DISCONTINUITY` on Samsung Tizen devices. +- Fixed an issue where the `player.currentTime` could be incorrect after playing a CSAI ad with OptiView Ads. +- Fixed an issue where `player.metrics.currentBandwidthEstimate` was not set when playing an HESP stream. +- Fixed an issue where the player would sometimes jump back to the first ad of an OptiView Ads break instead of continuing with the second ad of that break. +- Fixed an issue for OptiView Ads where a VAST ad break in Safari native fullscreen could stutter. + +### iOS + +#### ✨ Features + +- Added the `Network` API to `CachingTask` to help enable media playlist interception. + +#### 🐛 Issues + +- Fixed an issue where seeking to the live point could cause unnecessary buffering on OptiView Streaming (THEOlive) sources. + +#### 👎 Deprecations + +- Deprecated `DeveloperSettings` & `ManifestInterceptor` in favor of `NetworkAPI`. You can access the network API from `player.network` or `cachingTask.network`. For a comprehensive guide, please refer to https://optiview.dolby.com/docs/theoplayer/how-to-guides/network/ios-hls-media-playlist-interceptor/. + +### Roku + +#### 🐛 Issues + +- Fixed an issue where OptiView Live streams would not properly fall back to a backup feed in case of a streaming error. +- Fixed an issue where OptiView Live streams could experience endless buffering without recovering. + ## 🚀 10.7.0 (2025/12/16) ### General diff --git a/theoplayer/how-to-guides/08-network/03-ios-hls-media-playlist-interceptor.md b/theoplayer/how-to-guides/08-network/03-ios-hls-media-playlist-interceptor.md new file mode 100644 index 000000000000..42f3c9de44cc --- /dev/null +++ b/theoplayer/how-to-guides/08-network/03-ios-hls-media-playlist-interceptor.md @@ -0,0 +1,65 @@ +# iOS HLS Media Playlist Interceptor + +THEOplayer iOS SDK makes a number of network requests and receives responses while playing video. These requests and responses can be intercepted to make a new or modified request, or respond with a new response to the HLS playlist requests. + +This guide explains how you set up THEOplayer iOS SDK to add and remove request/response interceptors. + +We will use a simple UIKit UIViewController for this guide. + +## Set up THEOplayer + +```swift +class ViewController: UIViewController { + private var player: THEOplayer? + + override func viewDidLoad() { + super.viewDidLoad() + let player = THEOplayer() + self.player = player + player.frame = view.bounds + player.addAsSubview(of: self.view) + player.network.addMediaPlaylistInterceptor(self) + } +} +``` + +## Intercepting the requests and/or responses + +Use the `type` parameter on each method below to filter for HLS playlist types ie. master, video, subtitles, etc... +The rest of the usage is explained in comments in the code snippet below. + +```swift +extension ViewController: MediaPlaylistInterceptor { + // For modifications that you would make to the request, ie. add custom headers, query parameters, etc... + func shouldInterceptPlaylistRequest(type: THEOplayerSDK.HlsPlaylistType) -> Bool { true } + + // For modifications that you would make to the response, ie. edit the m3u8 file content, vtt file content etc... + func shouldInterceptPlaylistResponse(type: THEOplayerSDK.HlsPlaylistType) -> Bool { true } + + // Will be called if shouldInterceptPlaylistRequest returns true + func didInterceptPlaylistRequest(type: THEOplayerSDK.HlsPlaylistType, request: URLRequest) async throws -> URLRequest { + var modifiedRequest = request + // modify + // ... + //... + return modifiedRequest + } + + // Will be called if shouldInterceptPlaylistResponse returns true + func didInterceptPlaylistResponse(type: THEOplayerSDK.HlsPlaylistType, url: URL, response: URLResponse, data: Data) async throws -> Data { + var modifiedResponseData = "" + // customize the data string that you would like to return, should be a valid HLS playlist file + // ... + // ... + let customDataResponse = modifiedResponseData.data(using: .utf8) + return customDataResponse ?? data // `customDataResponse` is empty so playback will fail in this demo; return `data` to play + } + + // Handle failure. + func failedToPerformURLRequest(request: URLRequest, response: URLResponse) {} +} +``` + +## DRM request interception + +The `MediaPlaylistInterceptor` API does not intercept DRM requests. To interecept fairplay DRM requests, take a look at the following solution: https://github.com/THEOplayer/samples-drm-integration/blob/master/ios/README.md diff --git a/theoplayer/static/theoplayer/v10/api-reference/ios/Adaptive Bit Rate API.html b/theoplayer/static/theoplayer/v10/api-reference/ios/Adaptive Bit Rate API.html index 684b4d467ee9..c571edf402e1 100644 --- a/theoplayer/static/theoplayer/v10/api-reference/ios/Adaptive Bit Rate API.html +++ b/theoplayer/static/theoplayer/v10/api-reference/ios/Adaptive Bit Rate API.html @@ -1111,7 +1111,7 @@