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

  1. When calling the AdLoader.create method, in the configuration parameters, pass targetRef including the string for your service's web URL (for example, targetRef: "https://hd.kinopoisk.ru").

  2. 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 in controlsSettings within playback parameters.

  3. In the controlsVisibility field in controlsSettings, 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 of erid).

    • 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:

  1. Before calling the AdStore.createAdPlaybackController method, set the data-focused="true" data attribute on the slot element.

    slot.setAttribute("data-focused", "true");
    adStore.createAdPlaybackController(video, slot, playbackParameters);
    
  2. At any point during playback, by calling focus/blur events on the slot 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.