Classes

The following classes are available globally.

  • An interface to expose information on an ad companion.

    See more

    Declaration

    Swift

    @objc
    public class JWAdCompanion : NSObject
  • A companion ad slot.

    This will be used to serve ad accompanying info into your application. The SDK will use the view to render the content.

    • Tag: JWCompanionAdSlot
    See more

    Declaration

    Swift

    @available(tvOS, unavailable)
    @objcMembers
    public class JWCompanionAdSlot : NSObject
  • A description of an ad event.

    See more

    Declaration

    Swift

    @objc
    public class JWAdEvent : NSObject
  • Ad impression information for an ad.

    See more

    Declaration

    Swift

    @objcMembers
    public class JWAdImpression : NSObject
  • A description of an ad impression from the JW Player Ad Client.

    See more

    Declaration

    Swift

    @objcMembers
    public class JWPlayerAdImpression : JWAdImpression
  • An offset into the content where an ad plays.

    See more

    Declaration

    Swift

    @objc
    public class JWAdOffset : NSObject
  • This class represents an obstruction that is marked as friendly for viewability measurement purposes.

    See more

    Declaration

    Swift

    @objcMembers
    public class JWFriendlyObstruction : 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

    See more

    Declaration

    Swift

    @objcMembers
    public class JWFriendlyObstructionsContainer : NSObject
  • Controller that enables casting using a JWPlayer instance.

    See more

    Declaration

    Swift

    @objcMembers
    public class JWCastController : NSObject
  • Encapsulates a casting device.

    See more

    Declaration

    Swift

    @objcMembers
    public class JWCastingDevice : NSObject
  • Defines time information.

    See more

    Declaration

    Swift

    @objcMembers
    public class JWTimeData : NSObject
  • Defines time range information.

    See more

    Declaration

    Swift

    @objcMembers
    public class JWTimeRange : NSObject
  • This object represents a position in the media where a cue begins or ends.

    Cue times can be represented in one of two ways. First, the time can be represented a number of seconds into the media.

    Second, it can be expressed as a percentage. The percentage is calculated based on the duration of the content.

    See more

    Declaration

    Swift

    @objcMembers
    public class JWCueTime : NSObject
  • Defines a point of interest in the content.

    See more

    Declaration

    Swift

    @objcMembers
    public final class JWCue : NSObject, JWJSONCodable, JWInitializableFromJSON
  • A custom error class.

    See more

    Declaration

    Swift

    @objcMembers
    public class JWError : NSError
  • A location or point in time where one or more ads may be scheduled for delivery.

    See more

    Declaration

    Swift

    @objcMembers
    public final class JWAdBreak : NSObject, JWJSONEncodable
  • The builder for JWAdBreak.

    See more

    Declaration

    Swift

    @objcMembers
    public final class JWAdBreakBuilder : NSObject, JWBuilder, JWJSONDecodable
  • Defines playback rules for the scheduled ads.

    Declaration

    Swift

    @objc
    public class JWAdRules : NSObject
  • The builder for JWAdRules.

    See more

    Declaration

    Swift

    @objcMembers
    public class JWAdRulesBuilder : NSObject, JWBuilder
  • This class allows setting specific ad behavior for the JWPlayer ad client.

    Declaration

    Swift

    @objc
    public class JWAdSettings : NSObject
  • The builder for JWAdSettings, object used to set behavior for JWPlayer ads.

    See more

    Declaration

    Swift

    @objcMembers
    public class JWAdSettingsBuilder : NSObject, JWBuilder
  • Used to build a JWAdvertisingConfig object to play ads using the JWPlayer client.

    See more

    Declaration

    Swift

    @objcMembers
    public class JWAdsAdvertisingConfigBuilder : NSObject, JWBuilder
  • Encompasses all configuration options for ad plugins.

    See more

    Declaration

    Swift

    @objc
    public class JWAdvertisingConfig : NSObject
  • Used to configure Google DAI streams based on the provided information.

    See more

    Declaration

    Swift

    @objc
    public class JWGoogleDAIStream : NSObject
  • The builder for JWGoogleDAIStream, object used to play ads using the DAI client.

    See more

    Declaration

    Swift

    @objcMembers
    public class JWGoogleDAIStreamBuilder : NSObject, JWBuilder
  • Used to build a JWAdvertisingConfig object to play ads using the IMA client.

    Note

    For IMA ads, make sure to add this to the player configuration, even if you provide ad schedules at the JWPlayerItem level. In that case, this object may be empty, but it is still required in order to declare your intention to use the IMA SDK, which cannot be inferred from the items’ ad schedule(s) alone.
    See more

    Declaration

    Swift

    @objcMembers
    public class JWImaAdvertisingConfigBuilder : NSObject, JWBuilder
  • Used to build a JWAdvertisingConfig object to play ads using the DAI client.

    See more

    Declaration

    Swift

    @objcMembers
    public class JWImaDaiAdvertisingConfigBuilder : NSObject, JWBuilder
  • The JWImaSettings class encompasses the Google IMA SDK settings.

    Declaration

    Swift

    @objc
    public class JWImaSettings : NSObject
  • The builder for JWImaSettings, object used to configure the Google IMA SDK.

    See more

    Declaration

    Swift

    @objcMembers
    public class JWImaSettingsBuilder : NSObject, JWBuilder
  • This serves as the base class for configurations affecting advertisement analytics.

    Declaration

    Swift

    @objc
    public class JWAdTrackerConfig : NSObject
  • This object contains configuration information for using Open Measurement.

    Declaration

    Swift

    @objc
    public class JWOMIDConfig : JWAdTrackerConfig
  • A builder for creating a JWOMIDConfig.

    See more

    Declaration

    Swift

    @objcMembers
    public class JWOMIDConfigBuilder : NSObject, JWBuilder
  • An object describing the position, size, and behavior of a caption on the screen. In order to instantiate an instance of this class, use JWCaptionPositionBuilder.

    See more

    Declaration

    Swift

    @objcMembers
    public final class JWCaptionPosition : NSObject
    extension JWCaptionPosition: DeepCopying
    extension JWCaptionPosition: JWJSONCodable
  • The builder for creating a JWCaptionPosition and verifying its properties.

    See more

    Declaration

    Swift

    @objcMembers
    public class JWCaptionPositionBuilder : NSObject, JWBuilder
  • Configuration object used to customize the captions.

    Note

    Styles specified using this structure will only be applied if the user’s accessibility settings allow it, and only for SRT and WebVTT captions.

    Warning

    EIA-608 captions always default to the user’s accessibility settings.
    See more

    Declaration

    Swift

    @objcMembers
    public final class JWCaptionStyle : NSObject
    extension JWCaptionStyle: JWJSONCodable
    extension JWCaptionStyle: DeepCopying
  • The builder for JWCaptionStyle.

    See more

    Declaration

    Swift

    @objcMembers
    public class JWCaptionStyleBuilder : NSObject, JWBuilder
  • Provides information about a caption track.

    See more

    Declaration

    Swift

    @objcMembers
    public class JWCaptionTrack : JWMediaTrack
  • The builder for creating a JWMediaTrack used for captions.

    See more

    Declaration

    Swift

    @objcMembers
    public class JWCaptionTrackBuilder : NSObject, JWBuilder
  • Provides information about a chapter track.

    See more

    Declaration

    Swift

    @objcMembers
    public class JWChapterTrack : JWMediaTrack
  • The builder for creating a JWMediaTrack used for chapters.

    See more

    Declaration

    Swift

    @objcMembers
    public class JWChapterTrackBuilder : NSObject, JWBuilder
  • A settings object containing information regarding external playback.

    See more

    Declaration

    Swift

    public class JWExternalPlaybackSettings : NSObject
  • A builder for creating instances of JWExternalPlaybackSettings.

    See more

    Declaration

    Swift

    public class JWExternalPlaybackSettingsBuilder : NSObject, JWBuilder
  • This JSON parser helps to convert a json object into a JWPlayerConfiguration using the different configuration builders provided by JWPlayerKit.

    See more

    Declaration

    Swift

    @objcMembers
    final public class JWJSONParser : NSObject
  • Defines a logo which is overlayed on the player.

    Declaration

    Swift

    @objc
    public class JWLogo : NSObject
  • The builder for JWLogo.

    See more

    Declaration

    Swift

    @objcMembers
    public class JWLogoBuilder : NSObject, JWBuilder
  • Represents a specific option for the presentation of media.

    See more

    Declaration

    Swift

    @objcMembers
    public class JWMediaSelectionOption : NSObject
  • Provides information about captions or thumbnails. Supports TTML (DFXP), SRT, and WebVTT formats.

    See more

    Declaration

    Swift

    @objcMembers
    public class JWMediaTrack : NSObject
  • Defines the style for the control bar on a player.

    See more

    Declaration

    Swift

    @objc
    public class JWMenuStyle : NSObject
    extension JWMenuStyle: DeepCopying
  • The builder for JWMenuStyle.

    See more

    Declaration

    Swift

    @objcMembers
    public final class JWMenuStyleBuilder : NSObject, JWPrototypingBuilder
  • Configuration object used to create a JWPlayer instance.

    See more

    Declaration

    Swift

    @objc
    public final class JWPlayerConfiguration : NSObject
  • Used to build a JWPlayerConfiguration object to configure instance(s) of JWPlayer.

    See more

    Declaration

    Swift

    @objcMembers
    public final class JWPlayerConfigurationBuilder : NSObject, JWBuilder, JWJSONDecodable
  • Defines a player item which contains the information about the media content.

    See more

    Declaration

    Swift

    @objcMembers
    public final class JWPlayerItem : NSObject, JWJSONEncodable, JWInitializableFromJSON
  • The builder for JWPlayerItem, ensuring it is built correctly.

    See more

    Declaration

    Swift

    @objcMembers
    public final class JWPlayerItemBuilder : NSObject, JWBuilder, JWJSONDecodable
  • Defines a player item which contains the information about the media content.

    See more

    Declaration

    Swift

    @objc
    public class JWPlayerSkin : NSObject
    extension JWPlayerSkin: DeepCopying
  • The builder for JWPlayerSkin.

    See more

    Declaration

    Swift

    @objcMembers
    public class JWPlayerSkinBuilder : NSObject, JWPrototypingBuilder
  • A configuration object for handling related content loading and display.

    Declaration

    Swift

    @objc
    public class JWRelatedContentConfiguration : NSObject
  • The builder for JWRelatedContentConfiguration.

    See more

    Declaration

    Swift

    @objcMembers
    public class JWRelatedContentConfigurationBuilder : NSObject, JWBuilder
  • The builder for creating a JWMediaTrack used for thumbnails.

    See more

    Declaration

    Swift

    @objcMembers
    public class JWThumbnailTrackBuilder : NSObject, JWBuilder
  • Defines the style for the control bar on a player.

    See more

    Declaration

    Swift

    @objc
    public class JWTimeSliderStyle : NSObject
    extension JWTimeSliderStyle: DeepCopying
  • The builder for JWTimeSliderStyle.

    See more

    Declaration

    Swift

    @objcMembers
    public final class JWTimeSliderStyleBuilder : NSObject, JWPrototypingBuilder
  • Defines a video source which represents a visual quality level of the video.

    See more

    Declaration

    Swift

    @objcMembers
    public class JWVideoSource : NSObject
  • The builder for JWVideSource.

    See more

    Declaration

    Swift

    @objcMembers
    public class JWVideoSourceBuilder : NSObject, JWBuilder
  • A description of a video quality level.

    See more

    Declaration

    Swift

    @objcMembers
    public class JWVisualQualityLevel : NSObject
  • JWVisualQuality represents the quality of a video stream.

    See more

    Declaration

    Swift

    @objcMembers
    public class JWVisualQuality : NSObject
  • This loader is used to interface with FairPlay and decode streams for download.

    See more

    Declaration

    Swift

    @objcMembers
    public class JWDRMContentLoader : NSObject
  • JWLockScreenManager allows setting the active JWPlayer that will be shown on the NowPlaying Controls.

    Important

    In your App´s Signing & Capabilities you should add Background Modes:
    • Audio.
    • AirPlay.
    • and Picture in Picture. ### Notes: In order for the lock screen controls to be visible:
    • Background audio must be enabled.
    • The audio session must be set to AVAudioSessionCategoryPlayback.

    By default when using more than one player, the last player played will have priority on NowPlaying Controls.

    See more

    Declaration

    Swift

    @objcMembers
    public class JWLockScreenManager : NSObject
  • Access log metadata. Fires when a new access log entry has been added for the JWPlayerItem.

    See more

    Declaration

    Swift

    @objcMembers
    public class JWAccessLogMetadata : NSObject
  • Date range metadata. Fired when playback enters the section of an HLS stream tagged with #EXT-X-DATERANGE.

    See more

    Declaration

    Swift

    @objcMembers
    public class JWDateRangeMetadata : NSObject
  • Metadata that can be passed externally to supplement the encoded metadata of the underlying media asset.

    See more

    Declaration

    Swift

    @objcMembers
    public class JWExternalMetadata : NSObject
  • ID3 metadata. Fires when playback buffers a section of an HLS stream containing ID3 tags.

    See more

    Declaration

    Swift

    @objcMembers
    public class JWID3Metadata : NSObject
  • Media metadata. Fires when the initial metadata of content has loaded.

    See more

    Declaration

    Swift

    @objcMembers
    public class JWMediaMetadata : NSObject
  • Delegates that surface different types of metadata from the player.

    See more

    Declaration

    Swift

    @objcMembers
    public class JWMetadataDelegates : NSObject
  • Program-date-time metadata. Fires when playback enters the section of an HLS stream tagged with #EXT-X-PROGRAM-DATE-TIME.

    See more

    Declaration

    Swift

    @objcMembers
    public class JWProgramDateTimeMetadata : NSObject
  • JWPlayerKitLicense is a static interface into our SDK for accomplishing basic tasks outside of a JWPlayer instance.

    See more

    Declaration

    Swift

    @objcMembers
    public class JWPlayerKitLicense : NSObject
  • A structure describing settings for the ad interface.

    Declaration

    Swift

    @objc
    public class JWAdInterfaceStyle : NSObject
  • The builder for the JWAdInterfaceStyle.

    Note

    Currently, this styling only applies to JW Player’s VAST ad client.
    See more

    Declaration

    Swift

    @objcMembers
    public class JWAdInterfaceStyleBuilder : NSObject, JWBuilder
  • Used to define the next up card’s style.

    Declaration

    Swift

    @objc
    public class JWNextUpStyle : NSObject
  • Used to build a new JWNextUpStyle to configure the next up card.

    Note

    An Offset is required.
    See more

    Declaration

    Swift

    @objcMembers
    public class JWNextUpStyleBuilder : NSObject, JWBuilder
  • This is the default UIViewController which is used when the player takes over the entire screen.

    See more

    Declaration

    Swift

    @objcMembers
    @MainActor
    open class JWFullScreenViewController : UIViewController, UIPopoverPresentationControllerDelegate, UIViewControllerTransitioningDelegate
  • This ViewController creates a JWPlayerView, and creates a default interface for the content.

    If you are using JWPlayerViewController, do not assign another class as a delegate for JWPlayerView or JWPlayer and its related delegate properties, nor for JWPlayer.adTimeObserver and JWPlayer.mediaTimeObserver. This controller conforms to these delegates already. You can gain access to events by subclassing this, and overriding the methods you are interested in.

    Note

    If you are writing in Objective-C and want to subclass this ViewController, refer to JWPlayerObjViewController and subclass that instead.
    See more

    Declaration

    Swift

    @objcMembers
    @MainActor
    open class JWPlayerViewController: UIViewController,
                                       RelatedEventDelegate,
                                       AVPictureInPictureControllerDelegate,
                                       InternalEventHandlerDelegate,
                                       JWPlayerViewDelegate,
                                       JWPlayerDelegate,
                                       JWPlayerStateDelegate,
                                       JWAVDelegate,
                                       JWAdDelegate,
                                       JWAirPlayDelegate,
                                       JWAccessLogMetadataDelegate,
                                       JWDateRangeMetadataDelegate,
                                       JWID3MetadataDelegate,
                                       JWExternalMetadataDelegate,
                                       JWProgramDateTimeMetadataDelegate,
                                       JWMediaMetadataDelegate,
                                       JWCastDelegate,
                                       JWTimeEventListener,
                                       JWChaptersDelegate,
                                       JWRelatedEventDelegate,
                                       MenuPresenter,
                                       UIPopoverPresentationControllerDelegate
  • A view for displaying a player. It automatically handles enlarging the player to the size of this container view, and displaying the player.

    See more

    Declaration

    Swift

    @objcMembers
    @MainActor
    public class JWPlayerView : UIView, JWPlayerViewProtocol, ViewabilityHandlerDelegate