# ima

class

## Constructor

### ima

new
ima()

Global functions that control the IMA SDK.

## Classes

### [AdBreakInfo](https://developers.google.com/ad-manager/dynamic-ad-insertion/sdk/roku/reference/ima.AdBreakInfo)

Contains info about an ad break. Passed to event callbacks by the SDK.

### [AdEvent](https://developers.google.com/ad-manager/dynamic-ad-insertion/sdk/roku/reference/ima.AdEvent)

Events fired by the ads manager.

### [AdInfo](https://developers.google.com/ad-manager/dynamic-ad-insertion/sdk/roku/reference/ima.AdInfo)

Contains info about an ad. Passed to event callbacks by the SDK.

### [Companion](https://developers.google.com/ad-manager/dynamic-ad-insertion/sdk/roku/reference/ima.Companion)

Contains information about companions of an ad.

### [CuePoint](https://developers.google.com/ad-manager/dynamic-ad-insertion/sdk/roku/reference/ima.CuePoint)

Contains info about a cue point.

### [Error](https://developers.google.com/ad-manager/dynamic-ad-insertion/sdk/roku/reference/ima.Error)

Object passed to the error handler if there is an error.

### [ErrorEvent](https://developers.google.com/ad-manager/dynamic-ad-insertion/sdk/roku/reference/ima.ErrorEvent)

All errors that the SDK might send back.

### [LogEvent](https://developers.google.com/ad-manager/dynamic-ad-insertion/sdk/roku/reference/ima.LogEvent)

Object passed to the log event handler if there is a non-fatal error.

### [Player](https://developers.google.com/ad-manager/dynamic-ad-insertion/sdk/roku/reference/ima.Player)

### [StreamFormat](https://developers.google.com/ad-manager/dynamic-ad-insertion/sdk/roku/reference/ima.StreamFormat)

Defines the format of the stream.

### [StreamInfo](https://developers.google.com/ad-manager/dynamic-ad-insertion/sdk/roku/reference/ima.StreamInfo)

Information passed from the sdk to the player about the stream.

### [StreamManager](https://developers.google.com/ad-manager/dynamic-ad-insertion/sdk/roku/reference/ima.StreamManager)

Object for managing stream playback.

### [StreamRequest](https://developers.google.com/ad-manager/dynamic-ad-insertion/sdk/roku/reference/ima.StreamRequest)

Used for specifying properties of the stream request.

### [StreamType](https://developers.google.com/ad-manager/dynamic-ad-insertion/sdk/roku/reference/ima.StreamType)

Defines the type of stream that the player is asked to play.
Prerolls and VOD should play from the beginning of the stream.

### [WrapperInfo](https://developers.google.com/ad-manager/dynamic-ad-insertion/sdk/roku/reference/ima.WrapperInfo)

Contains information about a wrapper.

## Methods

### disableLogging

static

disableLogging()

Disables the SDK logging. Logging will be on by default.

### getStreamManager

static

getStreamManager() returns object

Returns a stream manager if it available.
If the stream manager is not yet availbe, Invalid is returned.
If there was an error creating the stream manager, an error object is
returned.

Returns

:   `object` The stream manager or error object.

### initSdk

static

initSdk(settings)

Initializes the SDK.

| #### Parameter ||
|---|---|
| settings | object Optional IMA settings object. |

### requestStream

static

requestStream(streamRequest) returns object

Starts an asynchronous stream request.
Control returns immediately to the player after calling this method.
If there is an existing stream manager, it will be destroyed.
If there is a stream playing, it will be replaced by the new stream when the
request completes.

| #### Parameter ||
|---|---|
| streamRequest | object |

Returns

:   `object` an error or invalid if no error