Untitled

 avatar
unknown
plain_text
a year ago
1.1 kB
3
Indexable
// google.ima.d.ts

declare namespace google.ima {
  class AdDisplayContainer {
    constructor(adContainer: HTMLElement, videoElement: HTMLVideoElement);
    initialize(): void;
  }

  class AdsLoader {
    constructor(adDisplayContainer: AdDisplayContainer);
    requestAds(adsRequest: AdsRequest): void;
    addEventListener(type: string, handler: Function, capture?: boolean): void;
    destroy(): void;
  }

  class AdsManager {
    init(width: number, height: number, viewMode: ViewMode): void;
    start(): void;
    destroy(): void;
  }

  class AdsRequest {
    adTagUrl: string;
  }

  class AdsManagerLoadedEvent {
    getAdsManager(videoElement: HTMLVideoElement): AdsManager;
  }

  class AdErrorEvent {
    getError(): AdError;
  }

  class AdError {
    getMessage(): string;
  }

  enum ViewMode {
    NORMAL,
    FULLSCREEN,
  }

  // ... Add more classes and types as needed for your implementation
}

// Extend the Window interface
declare global {
  interface Window {
    google: typeof google;
  }
}

export {};
Editor is loading...
Leave a Comment