# Airplay disconnecting after each pre-roll

**URL:** <https://community.bitmovin.com/t/airplay-disconnecting-after-each-pre-roll/2773>\
**Category:** Support\
**Created:** [April 4, 2024, 1:12am UTC](https://community.bitmovin.com/t/airplay-disconnecting-after-each-pre-roll/2773 "2024-04-04T01:12:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jialin.yang](https://avatars.discourse-cdn.com/v4/letter/j/898d66/32.png) [@jialin.yang](https://community.bitmovin.com/u/jialin.yang)\
**Post date:** [April 4, 2024, 1:12am UTC](https://community.bitmovin.com/t/airplay-disconnecting-after-each-pre-roll/2773/1 "2024-04-04T01:12:18Z")

</div>

Hi, I am implementing the preroll advertisements. I got pre-roll ads set in bitmovin player config  
{key: BITMOVIN\_ENV,  
analytics: {  
videoId: playback\_id,  
customData1: xxx  
},  
ui: false,  
playback: {  
autoplay: true,  
},  
advertising: {  
adBreaks,  
},  
cast: {  
enable: true,  
},  
remotecontrol: {  
type: ‘googlecast’,  
receiverVersion: ‘v3’,  
receiverApplicationId: APPID  
}}

I got 3 pre-roll ads. I used my iPhone to test the airplay with my mac laptop, the video plays on my laptop and disconnected after each pre roll and connect back before the next pre-roll begins. I could not find anything related to this issue in our docs. Do you know if there is any settings that could solve this issue? Thanks in advance.

---

<div class="post-metadata">

**Author:** ![lucky.goyal](https://sea1.discourse-cdn.com/flex015/user_avatar/community.bitmovin.com/lucky.goyal/32/506_2.png) [@lucky.goyal](https://community.bitmovin.com/u/lucky.goyal)\
**Post date:** [April 8, 2024, 10:31am UTC](https://community.bitmovin.com/t/airplay-disconnecting-after-each-pre-roll/2773/2 "2024-04-08T10:31:25Z")

</div>

Hi @jialin.yang , thanks for sharing this behaviour. Google IMA SDK which is used for Ad playback does not support Airplay feature. Please see Google IMA documentation about Airplay support.

> **[সমর্থন এবং সামঞ্জস্য  |  IMA SDK for iOS  |  Google for...](https://developers.google.com/interactive-media-ads/docs/sdks/ios/client-side/compatibility?hl=bn)**

Can you please try to switch to Bitmovin Ad module instead and check if that works better? You can follow this post regarding how to use Bitmovin Ad Module instead of IMA for client side Ad playback with Bitmovin player

> [@How to switch to use Bitmovin Advertising Module(BAM) in web player SDK?](https://community.bitmovin.com/t/how-to-switch-to-use-bitmovin-advertising-module-bam-in-web-player-sdk/1701):
>
> Hello Community, did you know that Bitmovin Web player SDK supports 2 client side advertising modules. IMA SDK : Bitmovin player integrates Google [IMA web client side SDK](https://developers.google.com/interactive-media-ads/docs/sdks/html5/client-side) for playback of client side Ads. This is enabled by default and is the recommended module when using Google DFP/Ads server. Bitmovin Ads Module (BAM) : This is in-house player module implementing IAB VAST/VMAP specification. This is recommended be used when there is no specific need to use IMA SDK. This provides some addi…
