googleads / videojs-ima

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

How to determine if it is a linear / nonlinear type #842

Closed jakubfrydrych closed 4 years ago

jakubfrydrych commented 4 years ago

Hello, I want to ask if you can use a method to find out if it's a linear or nonlinear type of ad. Currently I use to determine the content type from which I derive whether it is an image or video data (like image/png or mp4 etc..)

And whether it is possible to find out somehow through the values provided by adsManager through the getCuePoints() method, which returns tag times, but I am not able to tell whether it will be linear or nonlinear. An example of use is needed to render markers on a timeline where it is not desired to render an overlay marker.

Thank you very much in advance for your reply.

arnaudcasame commented 4 years ago

Hi,

The IMA SDK only determines if the current ad is linear or not once it is loaded. You can retrieve such value by calling the isLinear() method on the current ad object. An example would be to call the line below inside the onAdEvent function of our advanced example sample.

event.getAd().isLinear()
jakubfrydrych commented 4 years ago

Thank you very much for your answer