googleads / videojs-ima

IMA SDK Plugin for Video.js
Apache License 2.0
450 stars 284 forks source link

videojs-ima Clickthrough in hybrid (Ionic) app webview #965

Closed sshipsey closed 3 years ago

sshipsey commented 3 years ago

Hi, I have been using videojs-ima to play preroll ads in an Ionic mobile app running on iOS. Loading and playing preroll from VAST is working well. Only problem is my VAST tag has a ClickThrough tag and I see a "Learn More" link in the ad, but tapping Learn More only pauses the preroll video. There's nothing from the console and the app doesn't open the link. Wondering if there is a known solution for allowing the clickthrough event to escape the iframe. Couldn't find any videojs-ima or IMA SDK events to listen to for catching and handling the clickthrough event. Appreciate any insight. Thanks.

image

Some code:

let hls: string; // my video src url, resolved earlier
let vastTag: string; // my VAST url, resolved earlier
this.player = videojs(this.videoEl, {
      nativeControlsForTouch: true,
      autoplay: true,
      resizeManager: false,
      debug: true,
      muted: false
    });
this.player.src({
    src: hls,
    type: HLS_MIME_TYPE
  });
this.player.ima({
      adTagUrl: vastTag,
      disableAdControls: true,
      disableCustomPlaybackForIOS10Plus: true,
      showControlsForJSAds: false,
      debug: true,
      contribAdsSettings: {
        debug: true
      }
    });
Kiro705 commented 3 years ago

Hello @sshipsey ,

The HTML5 IMA SDK does not support being implemented inside a webview within a native app. As such, neither the videojs plugin nor a basic implementation of the SDK will support Ionic.

There may be a possible work around (I have not investigated the possibility) to capture the click-through link to open, but this work around would not be officially supported by IMA.

Thank you, Jackson IMA SDK DevRel

sshipsey commented 3 years ago

Appreciate the reply @Kiro705. Figured as such, just wanted to cover bases before giving up. I'll close and if I come across a workaround I'll post it here.

Thanks