Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Choosing the Floating player mode in the dashboard, allows the player to stay present on the screen and keep playing even after its original position has been scrolled out of view by “floating” at a fixed position on the screen. The floating position can also be selected in the dashboard from a pre defined set of options.

Floating Scope

In general, the floating behavior and configuration is controlled from the dashboard but in order to provide flexibility to the application developers, they are the ones who define the borders that will limit the floating behavior by providing a Floating Scope.

The scope is a view controller, that should be provided by invoking:The floating scope is the view to present the floating AD placement.
Usually, it’s the view controller’s view.
The floating position, which is configured on the dashboard, refers to the floating scope borders.
In most cases, it can be autodetected and there’s no need to set it explicitly

Code Block
placement.setFloatingScope(scopeautodetect: viewControllertrue)
Warning

Important: Floating behavior will not be available without providing a scope!

Note

Make sure the floating scope doesn’t extend beyond the limits of the visible area. A scope that extends beyond the limits of the visible area will cause the player to float off the screen and be cut off or even not visible at all.

...

But it’s still possible to set floating scope on your own:

Setting Floating scope explicitly

Code Block
placement.setFloatingScope(scope: viewConroller.view)