Integration with SmartTV
You can use the Video Ads SDK in SmartTV applications by implementing the standard integration with the AdLoader module. You can find the integration instructions here.
Supported platforms:
-
Webos
-
Tizen
-
VIDAA
-
WebView within AndroidTV
Additional requirements for integrating the Video Ads SDK into SmartTV applications
-
When calling the
AdLoader.create
method, in the configuration parameters, passtargetRef
including the string for your service's web URL (for example,targetRef: "https://hd.kinopoisk.ru"
). -
To hide all the Video Ads SDK interface controls and leave only the video, when calling the
AdStore.createAdPlaybackController
method, pass the{visibility: false}
object incontrolsSettings
within playback parameters. -
In the
controlsVisibility
field incontrolsSettings
, add one of the following values to enable controls adapted for SmartTV:-
abuse: true
: A “kebab” with advertiser information (legal data,erid
, and other related info). -
skip: true
: Button to skip the ad video. -
adLabel: true
: “Ad” label at the bottom of the ad video (enables the display oferid
). -
ageLabel: true
: Age restriction label.
-
Focus system
When using the “kebab” control with the advertiser information and the skip button control, transfer the focus control to the Video Ads SDK interface. There are two ways to do that:
-
Before calling the
AdStore.createAdPlaybackController
method, set thedata-focused="true"
data attribute on theslot
element.slot.setAttribute("data-focused", "true"); adStore.createAdPlaybackController(video, slot, playbackParameters);
-
At any point during playback, by calling
focus
/blur
events on theslot
element (recommended option).adStore.createAdPlaybackController(video, slot, playbackParameters); adPlaybackController.subscribe("AdStarted", () => slot.dispatchEvent(new Event("focus")), ); adPlaybackController.subscribe("AdStopped", () => slot.dispatchEvent(new Event("blur")), );
When focus control is transferred to the Video Ads SDK, the interface automatically intercepts remote control button presses on the device. This interception stops after ad playback is complete.