Enable full-screen mode

Learn how to add smooth inline-to-full-screen transitions in the FastPix iOS Player.

The FastPix iOS Player provides a built-in full-screen manager for smooth transitions between inline and full-screen playback.

Set up full-screen

Initialize the full-screen manager with the parent view controller and the player’s container view:

1playerViewController.setupFullscreen(
2 parent: self,
3 container: playerView
4)

Toggle full-screen

Switch between inline and full-screen modes:

1playerViewController.toggleFullscreen()

Observe full-screen state changes

Listen for full-screen state transitions using a notification:

1NotificationCenter.default.addObserver(
2 self,
3 selector: #selector(fullscreenStateChanged),
4 name: Notification.Name("FastPixFullscreenStateChangedNotification"),
5 object: nil
6)