JWFriendlyObstructionsContainer
@objcMembers
public class JWFriendlyObstructionsContainer : NSObject
This class allows to register views considered as friendly obstructions.
Friendly obstructions are views such as video controls that are essential to the user’s experience but do not impact viewability. Once registered as such, these controls are excluded from ad viewability measurements. These controls must only be fully transparent overlays or small buttons. Any other non-control views must not be registered.
When ad viewability via the OMSDK is calculated, all views overlaying the media element are considered obstructions and reduce the viewability rate.
You may register:
- A transparent overlay used to capture user taps.
- Transient buttons such as:
- Pause
- Play
- Fullscreen
- Cast/AirPlay
- Collapse
- Progress/Seek
- Other playback relevant actions
You must NOT register:
- Watermarks
- Pop ups
- Dialogs
- Non-transient buttons
Other obscuring views
Note
Applicable to Google IMA & DAI ad clients only. For more information, see Open Measurement in the IMA SDK
Tag: FriendlyObstructionsContainer
-
The initializer for the container, which takes an array of friendly obstructions.
Declaration
Swift
public required init(obstructions: [JWFriendlyObstruction]? = nil)
Parameters
obstructions
An array of
JWFriendlyObstructions
to initialize the container with. -
Register friendly obstructions.
Declaration
Swift
public func register(obstructions: [JWFriendlyObstruction])
Parameters
obstructions
Array with friendly obstructions
-
Unregister previously registered friendly obstructions.
Declaration
Swift
public func unregister(obstructions: [JWFriendlyObstruction])
Parameters
obstructions
Array with friendly obstructions.
-
Unregister all previously registered friendly obstructions.
Declaration
Swift
public func unregisterAllObstructions()