Skip to content

Lens: link THEOplayer's CMCD data to the Lens session (Lens SDK 0.7.0) - #136

Merged
GillesMoris-Dolby merged 4 commits into
feature/lens-connectorfrom
feature/lens-connector-linked-session
Nov 17, 2026
Merged

GillesMoris-Dolby merged 4 commits into
feature/lens-connectorfrom
feature/lens-connector-linked-session

Conversation

@GillesMoris-Dolby

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

Copy link
Copy Markdown
Contributor

Summary

Stacked on #133. Links THEOplayer's own CMCD data to the Lens session, and moves the Lens connector to Lens SDK 0.7.0.

  • LensConnector keeps player.cmcd.linkedSessionId (THEOplayer API behind @_spi(Core), imported with @_spi(Core) import THEOplayerSDK in LensConnector.swift and the tests) equal to its handle's Lens session ID, through the session delegate Lens 0.7.0 adds (addSessionDelegate): set right after join (also when joining a session another SDK already decided on the player), updated on every session change, cleared on destroy(). THEOplayer sends it as com.dolby.optiview-lsid (data spec key lsid, optiview-lens-data-spec#36).
  • Lens SDK 0.7.0..<0.8.0: LensSDK is now a prebuilt dynamic framework. The connector links it without embedding it; the app embeds it once (checked in the example app: one LensSDK.framework in Frameworks/). With an observed adapter, Lens decides the session when a source is set, so the session test now expects the sid at source set and the same one at play.
  • README, changelog and example app updated.

Blocked on THEOplayer

THEOplayer.cmcd / CMCD.linkedSessionId comes from theoplayer-next PR 8186 (feature/cmcd-lens-session-link), which is not released. Package.swift requires THEOplayerSDK 11.16.0 as the first version with it (assumed: the next minor after 11.15.1; adjust once the release is known). This raises the minimum for every connector in the package, as they share the dependency.

Until that version is published, CI here cannot resolve the package: build-and-test fails at dependency resolution. That is expected; keep this PR in draft until THEOplayer 11.16.0 is out, then re-run CI.

Tests done (locally)

Built THEOplayerSDK.framework from feature/cmcd-lens-session-link (f7f6b4d2a17, with the @_spi(Core) change) for the iOS simulator and pointed the package at it locally (not committed):

  • THEOplayerConnectorLensTests: 29/29 pass (iPhone 17, iOS 26.5), against Lens 0.7.0. New: the linked session ID follows the Lens session across a source change and is cleared on destroy, and is set when joining a session already in progress. Both fail when the connector stops syncing (checked by disabling it).
  • Without @_spi(Core) the connector no longer compiles ('cmcd' is inaccessible due to '@_spi' protection level), so the SPI is in effect.
  • Example app builds and embeds LensSDK.framework once.
  • Not run: tvOS (the local THEOplayer build is iOS simulator only), and CI (blocked as above).

GillesMoris-Dolby and others added 2 commits November 17, 2026 00:20
The connector keeps player.cmcd.linkedSessionId equal to its handle's Lens
session ID through the session delegate Lens 0.7.0 adds: set after join,
updated on every session change, cleared on destroy. Lens 0.7.0 ships LensSDK
as a prebuilt dynamic framework, which the connector links and the app embeds
once, and decides the session when a source is set. THEOplayer gains
cmcd.linkedSessionId in 11.16.0 (theoplayer-next PR 8186), hence the new
minimum.

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

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…ire it in the example

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

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

Copy link
Copy Markdown
Contributor Author

Status for follow-up

  • build-and-test fails at "Resolve SPM dependencies", as expected: no theoplayer-sdk-apple version matches 11.16.0..<12.0.0 yet. It can only go green once THEOplayer ships cmcd.linkedSessionId (theoplayer-next PR 8186). Then confirm the version (11.16.0 is assumed) and re-run CI.
  • Locally, against a THEOplayer simulator build of feature/cmcd-lens-session-link (ef3df2d1f2b) and Lens 0.7.0: THEOplayerConnectorLensTests 29/29 pass; the example app builds and embeds LensSDK.framework once.
  • Add Lens connector #133 (the base) is green on GitHub Actions (build-and-test, cocoapods-validate).

CircleCI on the THEOplayer dependency (theoplayer-next pipeline 19326, feature/cmcd-lens-session-link at ef3df2d1f2b):

Workflow Result
ios passed (15/15 jobs)
chromecast, setup-test passed
web web-smoke-test failed: 4 of 79 specs, among them theoads.spec.ts in Firefox, which looks unrelated to CMCD
android android-smoke-test failed in :app:connectedReleaseAndroidTest

I re-ran both failed workflows from their failed jobs (web 73c682ee-e833-490b-9975-bd021143bac2, android f8ed58b0-1be9-41f1-bc32-b072a29ab30e) to separate flakes from real failures; results below once they finish.

@GillesMoris-Dolby

Copy link
Copy Markdown
Contributor Author

CircleCI re-runs on the THEOplayer dependency (theoplayer-next feature/cmcd-lens-session-link, ef3df2d1f2b):

Job First run Re-run Develop (pipeline 19353)
android-smoke-test failed passed n/a
web-smoke-test failed (4 of 79 specs) failed (3 of 79 specs) passed

Android was a flake. On web, ui-tests/theoads/theoads.spec.ts fails in Firefox in both runs on the branch, and the latest develop run passes. The branch also changes the web CMCD reporting (cmcd.linkedSessionId), so this needs a look on PR 8186 before it merges: either the branch breaks THEOads on Firefox, or it is behind a fix on develop.

GillesMoris-Dolby and others added 2 commits November 17, 2026 09:34
…sionId

THEOplayer.cmcd and the CMCD protocol moved behind @_spi(Core) in theoplayer-next PR 8186.

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

Copy link
Copy Markdown
Contributor Author

Updated for THEOplayer.cmcd / CMCD moving behind @_spi(Core) (theoplayer-next f7f6b4d2a17): LensConnector.swift and the tests now use @_spi(Core) import THEOplayerSDK (d490ca0), and the README and doc comment describe the linked lsid without the internal API (72d561b). Against a simulator build of f7f6b4d2a17: 29/29 tests pass, and a plain import fails to compile on cmcd. CI still fails at dependency resolution until THEOplayer 11.16.0 ships.

@GillesMoris-Dolby
GillesMoris-Dolby merged commit 72d561b into feature/lens-connector Nov 17, 2026
1 of 2 checks passed
@GillesMoris-Dolby

Copy link
Copy Markdown
Contributor Author

Folded into #133: its branch feature/lens-connector now carries these commits (396850a..72d561b). Closing this one.

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