Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
27 changes: 27 additions & 0 deletions ads/player-integration/optiview-ads-sdk/roku.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,33 @@ end sub

The channel's Break Manifest selects SGAI or SSAI for the device. In SGAI, `playbackUrl` is the SDK's local proxy URL. In SSAI, it is the Google DAI stream URL.

## Using OptiView Player

If your channel plays content with the OptiView Player Roku SDK, register the `OptiViewAds:OptiViewAdsSDKIntegration` component with the player. The player's ads API then dispatches the SDK's ad break and ad events and keeps `player.ads.playing`, `currentAdBreak` and `currentAds` up to date, so code that already listens on `player.ads` needs no second event source. The SDK keeps emitting its own events as well.

Register the integration once per player, before loading the source:

```brightscript
m.integration = createObject("roSGNode", "OptiViewAds:OptiViewAdsSDKIntegration")
m.integration.adsSdk = m.ads
m.player.ads.callFunc("registerServerSideIntegration", m.integration.integrationKind, m.integration)
```

On the `ready` result of `startSession`, load `playbackUrl` into the player instead of the `Video` node, and reference the integration in the source's `ssai` description:

```brightscript
m.player.source = {
sources: [{
src: result.playbackUrl
type: "application/x-mpegurl"
ssai: { integration: m.integration.integrationKind }
}]
live: true
}
```

The player only starts the integration for sources with this `ssai` description, and the integration accepts the source only while the SDK session is active. Do not call the integration's functions yourself; the player invokes them. Destroying the player with `player.callFunc("destroy")` tears the integration down; destroy the `OptiViewAds` node afterwards. See the [Roku API reference](pathname:///ads/v2/api-reference/roku/#component-OptiViewAdsSDKIntegration) for details.

## Events and configuration

Subscribe to ad and diagnostic events with the same `addEventListener` pattern. Each listener owner must expose its callback as an interface function. Remove a listener with `removeEventListener`, using the same event type, owner, and function name.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
</a> <button class="navigation-controls--btn navigation-controls--btn_toc ui-kit_mobile-only" id="toc-toggle" type="button">Toggle table of contents
</button>
<div class="navigation-controls--break ui-kit_mobile-only"></div>
<div class="library-version" id="library-version">1.3.0
<div class="library-version" id="library-version">1.4.0
</div>
<div class="navigation-controls">
<ul class="filter-section filter-section_loading" id="filter-section" aria-label="Target filter">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
</a> <button class="navigation-controls--btn navigation-controls--btn_toc ui-kit_mobile-only" id="toc-toggle" type="button">Toggle table of contents
</button>
<div class="navigation-controls--break ui-kit_mobile-only"></div>
<div class="library-version" id="library-version">1.3.0
<div class="library-version" id="library-version">1.4.0
</div>
<div class="navigation-controls">
<ul class="filter-section filter-section_loading" id="filter-section" aria-label="Target filter">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
</a> <button class="navigation-controls--btn navigation-controls--btn_toc ui-kit_mobile-only" id="toc-toggle" type="button">Toggle table of contents
</button>
<div class="navigation-controls--break ui-kit_mobile-only"></div>
<div class="library-version" id="library-version">1.3.0
<div class="library-version" id="library-version">1.4.0
</div>
<div class="navigation-controls">
<ul class="filter-section filter-section_loading" id="filter-section" aria-label="Target filter">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
</a> <button class="navigation-controls--btn navigation-controls--btn_toc ui-kit_mobile-only" id="toc-toggle" type="button">Toggle table of contents
</button>
<div class="navigation-controls--break ui-kit_mobile-only"></div>
<div class="library-version" id="library-version">1.3.0
<div class="library-version" id="library-version">1.4.0
</div>
<div class="navigation-controls">
<ul class="filter-section filter-section_loading" id="filter-section" aria-label="Target filter">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
</a> <button class="navigation-controls--btn navigation-controls--btn_toc ui-kit_mobile-only" id="toc-toggle" type="button">Toggle table of contents
</button>
<div class="navigation-controls--break ui-kit_mobile-only"></div>
<div class="library-version" id="library-version">1.3.0
<div class="library-version" id="library-version">1.4.0
</div>
<div class="navigation-controls">
<ul class="filter-section filter-section_loading" id="filter-section" aria-label="Target filter">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
</a> <button class="navigation-controls--btn navigation-controls--btn_toc ui-kit_mobile-only" id="toc-toggle" type="button">Toggle table of contents
</button>
<div class="navigation-controls--break ui-kit_mobile-only"></div>
<div class="library-version" id="library-version">1.3.0
<div class="library-version" id="library-version">1.4.0
</div>
<div class="navigation-controls">
<ul class="filter-section filter-section_loading" id="filter-section" aria-label="Target filter">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
</a> <button class="navigation-controls--btn navigation-controls--btn_toc ui-kit_mobile-only" id="toc-toggle" type="button">Toggle table of contents
</button>
<div class="navigation-controls--break ui-kit_mobile-only"></div>
<div class="library-version" id="library-version">1.3.0
<div class="library-version" id="library-version">1.4.0
</div>
<div class="navigation-controls">
<ul class="filter-section filter-section_loading" id="filter-section" aria-label="Target filter">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
</a> <button class="navigation-controls--btn navigation-controls--btn_toc ui-kit_mobile-only" id="toc-toggle" type="button">Toggle table of contents
</button>
<div class="navigation-controls--break ui-kit_mobile-only"></div>
<div class="library-version" id="library-version">1.3.0
<div class="library-version" id="library-version">1.4.0
</div>
<div class="navigation-controls">
<ul class="filter-section filter-section_loading" id="filter-section" aria-label="Target filter">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
</a> <button class="navigation-controls--btn navigation-controls--btn_toc ui-kit_mobile-only" id="toc-toggle" type="button">Toggle table of contents
</button>
<div class="navigation-controls--break ui-kit_mobile-only"></div>
<div class="library-version" id="library-version">1.3.0
<div class="library-version" id="library-version">1.4.0
</div>
<div class="navigation-controls">
<ul class="filter-section filter-section_loading" id="filter-section" aria-label="Target filter">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
</a> <button class="navigation-controls--btn navigation-controls--btn_toc ui-kit_mobile-only" id="toc-toggle" type="button">Toggle table of contents
</button>
<div class="navigation-controls--break ui-kit_mobile-only"></div>
<div class="library-version" id="library-version">1.3.0
<div class="library-version" id="library-version">1.4.0
</div>
<div class="navigation-controls">
<ul class="filter-section filter-section_loading" id="filter-section" aria-label="Target filter">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
</a> <button class="navigation-controls--btn navigation-controls--btn_toc ui-kit_mobile-only" id="toc-toggle" type="button">Toggle table of contents
</button>
<div class="navigation-controls--break ui-kit_mobile-only"></div>
<div class="library-version" id="library-version">1.3.0
<div class="library-version" id="library-version">1.4.0
</div>
<div class="navigation-controls">
<ul class="filter-section filter-section_loading" id="filter-section" aria-label="Target filter">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
</a> <button class="navigation-controls--btn navigation-controls--btn_toc ui-kit_mobile-only" id="toc-toggle" type="button">Toggle table of contents
</button>
<div class="navigation-controls--break ui-kit_mobile-only"></div>
<div class="library-version" id="library-version">1.3.0
<div class="library-version" id="library-version">1.4.0
</div>
<div class="navigation-controls">
<ul class="filter-section filter-section_loading" id="filter-section" aria-label="Target filter">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
</a> <button class="navigation-controls--btn navigation-controls--btn_toc ui-kit_mobile-only" id="toc-toggle" type="button">Toggle table of contents
</button>
<div class="navigation-controls--break ui-kit_mobile-only"></div>
<div class="library-version" id="library-version">1.3.0
<div class="library-version" id="library-version">1.4.0
</div>
<div class="navigation-controls">
<ul class="filter-section filter-section_loading" id="filter-section" aria-label="Target filter">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
</a> <button class="navigation-controls--btn navigation-controls--btn_toc ui-kit_mobile-only" id="toc-toggle" type="button">Toggle table of contents
</button>
<div class="navigation-controls--break ui-kit_mobile-only"></div>
<div class="library-version" id="library-version">1.3.0
<div class="library-version" id="library-version">1.4.0
</div>
<div class="navigation-controls">
<ul class="filter-section filter-section_loading" id="filter-section" aria-label="Target filter">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
</a> <button class="navigation-controls--btn navigation-controls--btn_toc ui-kit_mobile-only" id="toc-toggle" type="button">Toggle table of contents
</button>
<div class="navigation-controls--break ui-kit_mobile-only"></div>
<div class="library-version" id="library-version">1.3.0
<div class="library-version" id="library-version">1.4.0
</div>
<div class="navigation-controls">
<ul class="filter-section filter-section_loading" id="filter-section" aria-label="Target filter">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
</a> <button class="navigation-controls--btn navigation-controls--btn_toc ui-kit_mobile-only" id="toc-toggle" type="button">Toggle table of contents
</button>
<div class="navigation-controls--break ui-kit_mobile-only"></div>
<div class="library-version" id="library-version">1.3.0
<div class="library-version" id="library-version">1.4.0
</div>
<div class="navigation-controls">
<ul class="filter-section filter-section_loading" id="filter-section" aria-label="Target filter">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
</a> <button class="navigation-controls--btn navigation-controls--btn_toc ui-kit_mobile-only" id="toc-toggle" type="button">Toggle table of contents
</button>
<div class="navigation-controls--break ui-kit_mobile-only"></div>
<div class="library-version" id="library-version">1.3.0
<div class="library-version" id="library-version">1.4.0
</div>
<div class="navigation-controls">
<ul class="filter-section filter-section_loading" id="filter-section" aria-label="Target filter">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
</a> <button class="navigation-controls--btn navigation-controls--btn_toc ui-kit_mobile-only" id="toc-toggle" type="button">Toggle table of contents
</button>
<div class="navigation-controls--break ui-kit_mobile-only"></div>
<div class="library-version" id="library-version">1.3.0
<div class="library-version" id="library-version">1.4.0
</div>
<div class="navigation-controls">
<ul class="filter-section filter-section_loading" id="filter-section" aria-label="Target filter">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
</a> <button class="navigation-controls--btn navigation-controls--btn_toc ui-kit_mobile-only" id="toc-toggle" type="button">Toggle table of contents
</button>
<div class="navigation-controls--break ui-kit_mobile-only"></div>
<div class="library-version" id="library-version">1.3.0
<div class="library-version" id="library-version">1.4.0
</div>
<div class="navigation-controls">
<ul class="filter-section filter-section_loading" id="filter-section" aria-label="Target filter">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
</a> <button class="navigation-controls--btn navigation-controls--btn_toc ui-kit_mobile-only" id="toc-toggle" type="button">Toggle table of contents
</button>
<div class="navigation-controls--break ui-kit_mobile-only"></div>
<div class="library-version" id="library-version">1.3.0
<div class="library-version" id="library-version">1.4.0
</div>
<div class="navigation-controls">
<ul class="filter-section filter-section_loading" id="filter-section" aria-label="Target filter">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
</a> <button class="navigation-controls--btn navigation-controls--btn_toc ui-kit_mobile-only" id="toc-toggle" type="button">Toggle table of contents
</button>
<div class="navigation-controls--break ui-kit_mobile-only"></div>
<div class="library-version" id="library-version">1.3.0
<div class="library-version" id="library-version">1.4.0
</div>
<div class="navigation-controls">
<ul class="filter-section filter-section_loading" id="filter-section" aria-label="Target filter">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
</a> <button class="navigation-controls--btn navigation-controls--btn_toc ui-kit_mobile-only" id="toc-toggle" type="button">Toggle table of contents
</button>
<div class="navigation-controls--break ui-kit_mobile-only"></div>
<div class="library-version" id="library-version">1.3.0
<div class="library-version" id="library-version">1.4.0
</div>
<div class="navigation-controls">
<ul class="filter-section filter-section_loading" id="filter-section" aria-label="Target filter">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
</a> <button class="navigation-controls--btn navigation-controls--btn_toc ui-kit_mobile-only" id="toc-toggle" type="button">Toggle table of contents
</button>
<div class="navigation-controls--break ui-kit_mobile-only"></div>
<div class="library-version" id="library-version">1.3.0
<div class="library-version" id="library-version">1.4.0
</div>
<div class="navigation-controls">
<ul class="filter-section filter-section_loading" id="filter-section" aria-label="Target filter">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
</a> <button class="navigation-controls--btn navigation-controls--btn_toc ui-kit_mobile-only" id="toc-toggle" type="button">Toggle table of contents
</button>
<div class="navigation-controls--break ui-kit_mobile-only"></div>
<div class="library-version" id="library-version">1.3.0
<div class="library-version" id="library-version">1.4.0
</div>
<div class="navigation-controls">
<ul class="filter-section filter-section_loading" id="filter-section" aria-label="Target filter">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
</a> <button class="navigation-controls--btn navigation-controls--btn_toc ui-kit_mobile-only" id="toc-toggle" type="button">Toggle table of contents
</button>
<div class="navigation-controls--break ui-kit_mobile-only"></div>
<div class="library-version" id="library-version">1.3.0
<div class="library-version" id="library-version">1.4.0
</div>
<div class="navigation-controls">
<ul class="filter-section filter-section_loading" id="filter-section" aria-label="Target filter">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
</a> <button class="navigation-controls--btn navigation-controls--btn_toc ui-kit_mobile-only" id="toc-toggle" type="button">Toggle table of contents
</button>
<div class="navigation-controls--break ui-kit_mobile-only"></div>
<div class="library-version" id="library-version">1.3.0
<div class="library-version" id="library-version">1.4.0
</div>
<div class="navigation-controls">
<ul class="filter-section filter-section_loading" id="filter-section" aria-label="Target filter">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
</a> <button class="navigation-controls--btn navigation-controls--btn_toc ui-kit_mobile-only" id="toc-toggle" type="button">Toggle table of contents
</button>
<div class="navigation-controls--break ui-kit_mobile-only"></div>
<div class="library-version" id="library-version">1.3.0
<div class="library-version" id="library-version">1.4.0
</div>
<div class="navigation-controls">
<ul class="filter-section filter-section_loading" id="filter-section" aria-label="Target filter">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
</a> <button class="navigation-controls--btn navigation-controls--btn_toc ui-kit_mobile-only" id="toc-toggle" type="button">Toggle table of contents
</button>
<div class="navigation-controls--break ui-kit_mobile-only"></div>
<div class="library-version" id="library-version">1.3.0
<div class="library-version" id="library-version">1.4.0
</div>
<div class="navigation-controls">
<ul class="filter-section filter-section_loading" id="filter-section" aria-label="Target filter">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
</a> <button class="navigation-controls--btn navigation-controls--btn_toc ui-kit_mobile-only" id="toc-toggle" type="button">Toggle table of contents
</button>
<div class="navigation-controls--break ui-kit_mobile-only"></div>
<div class="library-version" id="library-version">1.3.0
<div class="library-version" id="library-version">1.4.0
</div>
<div class="navigation-controls">
<ul class="filter-section filter-section_loading" id="filter-section" aria-label="Target filter">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
</a> <button class="navigation-controls--btn navigation-controls--btn_toc ui-kit_mobile-only" id="toc-toggle" type="button">Toggle table of contents
</button>
<div class="navigation-controls--break ui-kit_mobile-only"></div>
<div class="library-version" id="library-version">1.3.0
<div class="library-version" id="library-version">1.4.0
</div>
<div class="navigation-controls">
<ul class="filter-section filter-section_loading" id="filter-section" aria-label="Target filter">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
</a> <button class="navigation-controls--btn navigation-controls--btn_toc ui-kit_mobile-only" id="toc-toggle" type="button">Toggle table of contents
</button>
<div class="navigation-controls--break ui-kit_mobile-only"></div>
<div class="library-version" id="library-version">1.3.0
<div class="library-version" id="library-version">1.4.0
</div>
<div class="navigation-controls">
<ul class="filter-section filter-section_loading" id="filter-section" aria-label="Target filter">
Expand Down
Loading
Loading