Playback Issue with advertisements


In our iOS app playback is not working with Advertisements, we are getting onReady event, but there is black window with pre roll advertisement.

We followed the basic ad sample and implemented as per that.

Without AdvertisingConfig playback working fine.

We are creating AdConfig as below

guard let tagUrl = URL(string: tag) else { return nil }

let adSource = AdSource(tag: tagUrl, ofType: .ima)

let preRoll = AdItem(adSources: [adSource], atPosition: “pre”)

let adConfig = AdvertisingConfig(schedule: [preRoll])

playerConfig.advertisingConfig = adConfig

@praveen.balpande84 Thank you for your query. I tested the sample app using 1 & 2 below and Playback is OK. I suggest testing YOUR CODE with the Bitmovin Github

1 sample ad url AND
2. sample code

        // Define needed resources
        guard let streamUrl = URL(string: "") else {
        // Create player configuration
        let config = PlayerConfig()

        let uiConfig = BitmovinUserInterfaceConfig()
        uiConfig.hideFirstFrame = true
        config.styleConfig.userInterfaceConfig = uiConfig

        // Create Advertising configuration
        let adSource1 = AdSource(tag: urlWithCorrelator(adTag: adTagVastSkippable), ofType: .ima)
        let adSource2 = AdSource(tag: urlWithCorrelator(adTag: adTagVast1), ofType: .ima)
        let adSource3 = AdSource(tag: urlWithCorrelator(adTag: adTagVast2), ofType: .ima)
        let preRoll = AdItem(adSources: [adSource1], atPosition: "pre")
        let midRoll = AdItem(adSources: [adSource2], atPosition: "20%")
        let postRoll = AdItem(adSources: [adSource3], atPosition: "post")
        let adConfig = AdvertisingConfig(schedule: [preRoll, midRoll, postRoll])
        config.advertisingConfig = adConfig

Please let us know your test result using 1 & 2 in your app.