OKSDK.Ads.prepareMidroll

Method signature

Method is used to request an ad from ads provider.

    OKSDK.Ads.prepareMidroll()

Callback message

As a result ad will either be found or not.

If ad is found following message will be passed to a callback function:

{
    "call": {
        "method": "prepare",
        "arguments": [
            "midroll"
        ]
    },
    "result": {
        "status": "ok",
        "code": "ready"
    }
}

If ad was not found message will contain following data:

{
    "call": {
        "method": "init"
    },
    "result": {
        "status": "error",
        "code": "Описание ошибки"
    }
}

Пример вызова

    OKSDK.Ads.prepareMidroll()