Untitled

mail@pastecode.io avatar
unknown
plain_text
23 days ago
1.1 kB
1
Indexable
Never
// 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 {};
Leave a Comment