Skip to content

Add Lens connector - #133

Open
GillesMoris-Dolby wants to merge 12 commits into
mainfrom
feature/lens-connector
Open

GillesMoris-Dolby wants to merge 12 commits into
mainfrom
feature/lens-connector

Conversation

@GillesMoris-Dolby

@GillesMoris-Dolby GillesMoris-Dolby commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Summary

OptiView Lens is Dolby's cross-player observability SDK: it turns a player adapter's observations into CMCD sessions and reports, and replaces the in-player CMCD reporting. This PR adds its THEOplayer iOS/tvOS connector, THEOplayerConnectorLens (Code/Lens). Web (web-connectors#112) and Android (android-connector#114) ship the same connector with the same public API.

  • THEOplayerLensAdapter implements Lens's observation-only LensPlayerAdapter over THEOplayer's public API: source and fallback, play/pause/waiting/seek/ended, fatal errors, tracks and qualities, readiness, live and low latency, rate/volume, presentation mode, and a snapshot (playhead, PDT, buffered, seekable, bandwidth estimate, dropped frames, view size). Lens derives the sessions, states and CMCD keys itself.
  • try LensConnector(player: player, configuration: LensConfiguration()) joins Lens with that adapter in the registered theoplayer namespace. LensConfiguration is the Lens join options minus namespace and player, plus an optional contentId provider. It exposes handle (consent, flush) and adapter (for an app or SDK that joins Lens in its own namespace and shares the session), holds the player weakly and disposes on DESTROY. Google DAI sources are named by asset key or contentSourceID/videoID; the provider overrides it.
  • SPM only, like the Lens SDK itself (optiview-lens-sdk-swift 0.6.0..<0.7.0); no podspec, so the podspec release workflow skips it. Root README lists it as supported from 11.1.0 (assumes the next release is a minor).
  • Example app (Code/Lens-Examples): shows every report, a staging switch, a destination setting, and the one-minute scenario shared with the web and Android demos; can run unattended with -runScenario YES.

THEOplayer behaviour the adapter works around: SOURCE_CHANGE is synchronous and Google DAI sets the same description twice (sources are compared by identity); duration == 0 means unknown; Quality has no identifier, so a rendition's id is its bandwidth.

Known gaps, documented in the README: no loading quality (so no br/bc), no codecs or frame rate (not public on Apple), no player-view visibility, fatal errors only, ads not reported as ads.

Tests: XCTest target against a real player, wired into CI. CI green (cocoapods-validate skips, no podspec).

Link to Devin session: https://dolby.devinenterprise.com/sessions/27abb4e55d6144e09a91f424e6b09630
Open in Devin Desktop: https://dolby.devinenterprise.com/desktop/session/27abb4e55d6144e09a91f424e6b09630?variant=devin
Requested by: @GillesMoris-Dolby

GillesMoris-Dolby and others added 4 commits November 6, 2026 11:08
Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@GillesMoris-Dolby

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

GillesMoris-Dolby and others added 2 commits November 6, 2026 14:09
LensConnector joins Lens in the registered theoplayer namespace with the
adapter, takes the other join options plus an optional content ID provider,
exposes the handle and the adapter, and disposes with the player. Low latency
now follows a latency configuration or a HESP or Millicast source only: a
THEOlive channel can be regular HLS. A test covers a play request on a new
source while playing, which the Apple SDK reports as PLAY.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@GillesMoris-Dolby

This comment was marked as resolved.

devin-ai-integration Bot and others added 6 commits November 6, 2026 13:27
…efault

Co-Authored-By: Gilles <Gilles.Moris@dolby.com>
Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
The example enables the Lens development backend and sends its reports to the
staging ingest only while the switch is on. The scenario replays the same
playback as the Lens demos of the other platforms, reported with the content
ID lens-connector-scenario, and can run unattended from launch arguments.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…nario

Adds the 2 s settles after unmute, rate 1 and inline, and waits 2 s instead of
3 s after the end, as agreed for all platforms. Fullscreen stands for the
picture-in-picture or fullscreen step.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
The scenario now goes into the player's in-app picture-in-picture, as the web
demo uses the in-page one, and reports the content ID
lens-connector-demo-scenario like the other platforms. The README spells out
the timing choices every platform makes. The demo gets a PiP button.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Destination... takes a URL and a format, CMCD or JSON, remembers them, and joins
Lens again with that destination. The app counts what it sent there, with the
last HTTP status, and allows plain http endpoints. This replaces the constant
in Config.swift.

Forwarded posts to staging went out with an empty body: setting the body
stream to nil after the body cleared the body. They now carry the reports.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration devin-ai-integration Bot changed the title Lens: add a connector that reports THEOplayer to the OptiView Lens SDK Add Lens connector Nov 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant