Repository navigation
Add Lens connector - #133
Open
GillesMoris-Dolby wants to merge 20 commits into
Open
GillesMoris-Dolby wants to merge 20 commits into
GillesMoris-Dolby wants to merge 20 commits into
Conversation
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>
This comment was marked as resolved.
This comment was marked as resolved.
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>
This comment was marked as resolved.
This comment was marked as resolved.
…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>
Lens 0.6.2 keys a session on the adapter's target. The adapter names the THEOplayer itself, so an SDK without a reference to the adapter shares the session by joining Lens with the raw player. Lens holds the player while a handle on it exists, so the connector no longer ends on the player's DESTROY, which cannot happen while it is joined: apps destroy the connector, then release it. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
… example Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
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>
…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>
THEOplayer renamed CMCD.linkedSessionId to lensSessionId, after the data spec fullName; the behaviour and the lsid key are unchanged. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
The connector now links that reporting to the Lens session, as the README says further up, so the two are meant to run together. Co-Authored-By: Gilles <Gilles.Moris@dolby.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
OptiView Lens is Dolby's cross-player observability SDK: it turns a player adapter's observations into CMCD sessions and reports. It runs next to the player's own CMCD reporting, and the connector links the two where the player supports it. 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.THEOplayerLensAdapterimplements Lens's observation-onlyLensPlayerAdapterover 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 registeredtheoplayernamespace.LensConfigurationis the Lens join options minus namespace and player, plus an optionalcontentIdprovider. It exposeshandle(consent, flush) andadapter. The adapter'stargetis the THEOplayer itself, so an app or SDK with only the player shares the session by joining Lens with the raw player in its own namespace. Lens holds the player while a handle on it exists, so apps calldestroy()and release the connector before releasing the player. Google DAI sources are named by asset key orcontentSourceID/videoID; the provider overrides it.optiview-lens-sdk-swift0.7.0..<0.8.0); no podspec, so the podspec release workflow skips it. Lens 0.7 shipsLensSDKas a prebuilt dynamic framework: the connector links it without embedding it, and the app embeds it once (checked in the example app).player.cmcd.lensSessionIdequal to its handle's Lens session ID through Lens's session delegate: set after join, updated on every session change, cleared ondestroy(), so THEOplayer's own CMCD data carries it aslsid(data spec#36).THEOplayer.cmcdis behind@_spi(Core), imported inLensConnector.swiftand the tests. Root README lists it as supported from11.1.0(assumes the next release is a minor).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_CHANGEis synchronous and Google DAI sets the same description twice (sources are compared by identity);duration == 0means unknown;Qualityhas 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.Blocked on THEOplayer:
THEOplayer.cmcdis not released yet.Package.swiftrequires THEOplayerSDK 11.16.0 (assumed to be the first release with it; adjust once known), which raises the minimum for every connector in the package. Until it is published,build-and-testfails at dependency resolution; re-run CI once it is out.Tests: XCTest target against a real player, wired into CI. Locally, against a THEOplayer simulator build of the PR 8186 branch (74f267dd8a3) and Lens 0.7.0: 29/29 pass, including the Lens session ID following the Lens session, being set when joining a session in progress, and being cleared on destroy.
Link to Devin session: https://dolby.devinenterprise.com/sessions/48440a3427b640eebe14e31ff7eb52a2
Open in Devin Desktop: https://dolby.devinenterprise.com/desktop/session/48440a3427b640eebe14e31ff7eb52a2?variant=devin
Requested by: @GillesMoris-Dolby