The THEOplayer instance (a ChromelessPlayer or anything satisfying THEOplayerLike).
The element the player was created in; the SDK locates the <video> inside it.
Current playback time in seconds.
Current playback time in seconds.
Content duration in seconds; may be Infinity for live streams.
THEOplayer genuinely does report Infinity for a live source, so the duration test is
correct HERE — unlike on hls.js, where it silently is not. Stated explicitly rather than
left to the core's fallback so the difference between the two engines is recorded where
someone comparing them will look.
Latest live playback position the player can seek to without moving back to maintain
its minimum live offset, in seconds. Return null when unknown or not live; the SDK
then leaves the seek target unclamped. Use the player engine's seek limit rather than
guessing an offset: HLS.js exposes liveSyncPosition, THEOplayer exposes
latencyManager.currentLatency / minimumOffset, and Shaka exposes
seekRange() / safeSeekEndOffset.
Settable so the SDK can sync mute state between content and ad players.
Settable so the SDK can sync mute state between content and ad players.
Whether the player is paused.
Playback rate, 1 being normal speed.
Reads THEOplayer rather than remembering what was written: its latency manager adjusts this property itself to hold live latency, and the SDK needs to see that so it can stand down rather than fight it.
Playback rate (1 = normal). Used to correct drift while content continues behind an
ad with continueContentDuringBreak. Report the engine's current rate, not just the last
assigned value, so the SDK can detect changes made by the player's live-latency controller.
If omitted, drift is reported but not corrected.
Program Date Time from the THEOplayer presentation timeline. Returns the wall-clock time of the current position for live HLS/DASH streams that carry an EXT-X-PROGRAM-DATE-TIME tag.
The end of THEOplayer's own seekable range — NOT the <video> element's.
The element reports Number.MAX_SAFE_INTEGER for a live stream, which is a statement that
it does not know rather than a position. player.seekable carries the real window.
THEOplayer owns its element and exposes what it is playing as a source description, so
read the first source's src rather than anything on the media element.
The underlying HTMLVideoElement created by THEOplayer.
THEOplayer renders its <video> inside the container div passed to the constructor.
Volume in [0, 1]; settable so the SDK can sync it between content and ad players.
Volume in [0, 1]; settable so the SDK can sync it between content and ad players.
Clean up resources when the SDK is destroyed.
Load a media source without playing; resolves when it is ready to play. Used to preload ads.
Unsubscribe from player events.
Subscribe to player events.
Pause playback (called when an ad break starts).
Start or resume playback.
THEOplayer's play() is synchronous; wraps in a resolved Promise to
satisfy the PlayerAdapter interface.
Let go of the <video> so the SDK can play an ad through it (shared-element insertion).
Clearing source is THEOplayer's way of stopping: the player keeps its instance, its
configuration and its container, and takes the element back on the next load(). With it
still driving, two engines share one element and the ad does not survive the contention —
measured on macOS Safari, where the break produced two adtimeupdate ticks in ten
seconds of ad.
Seek to a time in seconds. Needed for snapback during locked breaks without touching the video element.
Set the requested video quality, or restore the selection in force before the first set. Returns whether an override was applied or an outstanding override was restored.
Assigning one Quality to targetQuality pins that rendition without clearing the buffer.
Qualities THEOplayer marks unavailable or disabled are skipped because the engine would
ignore them. A null request assigns the exact prior targetQuality, including undefined.
The PlayerAdapter for THEOplayer, from the
@dolby-optiview/ads-sdk-adapter-theoplayerpackage (peer dependency:theoplayer9 or later).Unlike HLS.js and Shaka, THEOplayer manages its own
<video>element internally. Pass the<div>container that was used to create the ChromelessPlayer; the SDK will locate the internal<video>via a DOM query when needed (e.g. for GAM).Example