JWCinematicViewController Overview (tvOS)

A prepackaged user experience for tvOS.




The JWCinematicViewController is a customizable view controller that allows you to display user controls for a prepackaged video experience without having to implement your own interface.

This view controller creates a full screen experience for a user and is not intended for use within a window smaller than the entirety of the screen.



Requirement

  • JWPlayerTVKit 1.0.0+


Features

General

The following table lists the customizable native features of the JWCinematicViewController.

TopicFeatures
BrandingLogo/Watermarks: Add a unique logo to your app

Skinning: Customize and define the player skin
MonetizationGoogle DAI , Google IMA: Monetize content with Google DAI and IMA ads (native customization not supported)

VAST: Monetize content with JWP VAST ads (native customization supported)
User ExperienceFullscreen: Initiate fullscreen mode by tapping a button, rotating the device, triggering an event, or calling a method

Playback rates: Define the available playback rates for your content
User InterfacePoster Image: The poster image you specify for a player item will display at the beginning of a video unless autostart is set to true in the player config. This idle screen will wait until the user taps the play button. This poster image is also displayed during audio-only content.

Picture in Picture: Display or hide a Picture in Picture button

Playlist button: Playlist button that allows users to navigate through media and choose the next media to be played
VideoΒ RecommendationsIf your content has Recommendations, this can be accessed through the playlist screen. The Recommendations menu will also appear at the end of a playlist or during the autoplay screen, if set up in your configuration.


Additional Features

Basic Player Interface

The interface comes with a standard look and feel reminiscent of common AppleTV displays, behaviors and controls. This interface is expected to be displayed as a full screen experience.

The interface will stay on during audio-only content, but by default the interface will only appear when the user taps it. It will fade after five seconds, but this can be customized by setting the interfaceFadeTime property. The interface can also be set to always show or always hide using the interfaceBehavior property.

The Apple remote behaves as it does in other common apps, including being able to use it to seek through a video either by scrubbing when paused, see more information about the media you are watching, and skipping forward or backward 10 seconds by using the left or right buttons. Double-tapping the left or right buttons will increase or decrease the playback rate of the content.


Accessing the Player

You have full access to the JWPlayer object through the player property. If you wish to call methods on the player directly, such as play(), pause(), setting other properties or querying the state of the player, use this property.

You also have full access to the JWPlayerView through the playerView property. You can set its properties by using this.


Listening for Events

When using the player and playerView properties you will notice they differ from the JWPlayerView and JWPlayer base types in that they do not allow you to set the delegate properties. JWCinematicViewController conforms to every delegate, and is already the assigned delegate for its player.

In order to listen for events, you need to subclass JWCinematicViewController. This allows you to override any delegate methods. Please refer to the delegates listed in JWPlayerView and JWPlayer for more information on the delegates and their methods.

❗️

When you override a delegate method in your JWCinematicViewController subclass, always call the super method before your implementation, as in the snippets presented here in our documentation.

In addition, the JWCinematicViewController itself has a delegate property which takes a JWPlayerViewControllerDelegate. Conforming to this delegate allows you to listen for view controller-specific events, such as the following:

  • Fullscreen state
  • Related and Recommended item state and choices
  • Player size changes
  • Screen taps