# Interface ImaDaiIntegration

interface ImaDaiIntegration {
convertContentTimeToStreamTime(contentTime): number;
convertStreamTimeToContentTime(streamTime): number;
getCanSeekNow(): boolean;
getContentDuration(): number;
getIsImaDaiStream(): boolean;
getRelativeCurrentTime(): number;
getRelativeDuration(): number;
getTotalAdsDuration(): number;
load(options): void;
}

#####
Index

### Methods

convertContentTimeToStreamTime
convertStreamTimeToContentTime
getCanSeekNow
getContentDuration
getIsImaDaiStream
getRelativeCurrentTime
getRelativeDuration
getTotalAdsDuration
load

## Methods

### convertContentTimeToStreamTime

- convertContentTimeToStreamTime(contentTime): number

- Convert a given content time to stream time with ads.

  #### Parameters

  - contentTime: number

  #### Returns number

### convertStreamTimeToContentTime

- convertStreamTimeToContentTime(streamTime): number

- Convert a given stream time to content time without ads.

  #### Parameters

  - streamTime: number

  #### Returns number

### getCanSeekNow

- getCanSeekNow(): boolean

- Whether it is possible to perform a seek now.

  #### Returns boolean

### getContentDuration

- getContentDuration(): number

- Getter for the content duration (without ads).

  #### Returns number

### getIsImaDaiStream

- getIsImaDaiStream(): boolean

- Check if the IMA DAI stream is playing. Returns true if it is, false otherwise.

  #### Returns boolean

### getRelativeCurrentTime

- getRelativeCurrentTime(): number

- Get the current time for the current ad if in ad mode, or current content time (without ads) otherwise.

  #### Returns number

### getRelativeDuration

- getRelativeDuration(): number

- Get the current ad duration if in ad mode, or content duration without ads otherwise.

  #### Returns number

### getTotalAdsDuration

- getTotalAdsDuration(): number

- Get the total duration of all known ads (applicable for VOD only).

  #### Returns number

### load

- load(options): void

- Request a stream via the IMA DAI SDK or fallback to a provided fallback stream

  #### Parameters

  - options: ImaDaiIntegrationLoadOptions

  #### Returns void