<img src="https://img.shields.io/badge/%20-ENTERPRISE-%23B10031" style="float:left"/><br /> <img src="https://img.shields.io/badge/iOS-V4-FD415E?logo=apple" style="float:left"/><br />

If you use the IAB Open Measurement Interface Definition (OMID) and run [Google IMA ads](🔗), all custom video controls that overlay the media element must be registered as friendly obstructions. Friendly obstructions are views -- such as video controls -- that are essential to the user’s experience but do not impact viewability.

The `JWAdvertisingConfig` class enables you to register fully transparent overlays or small buttons. Once registered, your custom video controls are excluded from the ad viewability measurements that the <a href="https://iabtechlab.com/standards/open-measurement-sdk/" target="_blank">Open Measurement SDK</a> calculates.

The following table lists the views that can and cannot be registered.

PermittedNot Permitted
• Transparent overlay used to capture user taps<br /><br />• Transient buttons such as the following:<br />      ◦ Pause<br />      ◦ Play<br />      ◦ Fullscreen<br />      ◦ Cast/AirPlay<br />      ◦ Collapse<br />      ◦ Progress/Seek<br />      ◦ Other playback-related actions• Watermarks<br />• Pop-ups<br />• Dialogs<br /> • Non-transient buttons<br /> • Other obscuring views<br /><br /><br /><br /><br /><br />

<br /> <hr />

## Register a custom control

Use the following steps and code sample to register a custom video control as a friendly ad obstruction:

  1. Create a `FriendlyObstruction` object, passing a reference to the view that you want to mark as a friendly obstruction.

  2. Use the created `FriendlyObstruction` object to create a `FriendlyObstructionContainer`.

  3. Set the friendly obstruction container on the `JWImaAdvertisingConfigBuilder` using the `friendlyObstructionsContainer(_ container: FriendlyObstructionsContainer)` function.

  4. Call `build()` on the `JWImaAdvertisingConfigBuilder`.



<br />