Classes
The following classes are available globally.
-
An interface to expose information on an ad companion.
See moreDeclaration
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
Declaration
Swift
@available(tvOS, unavailable) @objcMembers public class JWCompanionAdSlot : NSObject
-
A description of an ad event.
See moreDeclaration
Swift
@objc public class JWAdEvent : NSObject
-
Ad impression information for an ad.
See moreDeclaration
Swift
@objcMembers public class JWAdImpression : NSObject
-
A description of an ad impression from the JW Player Ad Client.
See moreDeclaration
Swift
@objcMembers public class JWPlayerAdImpression : JWAdImpression
-
An offset into the content where an ad plays.
See moreDeclaration
Swift
@objc public class JWAdOffset : NSObject
-
This class represents an obstruction that is marked as friendly for viewability measurement purposes.
See moreDeclaration
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
Declaration
Swift
@objcMembers public class JWFriendlyObstructionsContainer : NSObject
-
Encapsulates a casting device.
See moreDeclaration
Swift
@objcMembers public class JWCastingDevice : NSObject
-
Defines time information.
See moreDeclaration
Swift
@objcMembers public class JWTimeData : NSObject
-
Defines time range information.
See moreDeclaration
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 moreDeclaration
Swift
@objcMembers public class JWCueTime : NSObject
-
Defines a point of interest in the content.
See moreDeclaration
Swift
@objcMembers public final class JWCue : NSObject, JWJSONCodable, JWInitializableFromJSON
-
A custom error class.
See moreDeclaration
Swift
@objcMembers public class JWError : NSError
-
A location or point in time where one or more ads may be scheduled for delivery.
See moreDeclaration
Swift
@objcMembers public final class JWAdBreak : NSObject, JWJSONEncodable
-
The builder for JWAdBreak.
See moreDeclaration
Swift
@objcMembers public final class JWAdBreakBuilder : NSObject, JWBuilder, JWJSONDecodable
-
Defines playback rules for the scheduled ads.
Declaration
Swift
@objc public class JWAdRules : NSObject
-
This class allows setting specific ad behavior for the JWPlayer ad client.
Declaration
Swift
@objc public class JWAdSettings : NSObject
-
The builder for
See moreJWAdSettings
, object used to set behavior for JWPlayer ads.Declaration
Swift
@objcMembers public class JWAdSettingsBuilder : NSObject, JWBuilder
-
Used to build a
See moreJWAdvertisingConfig
object to play ads using the JWPlayer client.Declaration
Swift
@objcMembers public class JWAdsAdvertisingConfigBuilder : NSObject, JWBuilder
-
Encompasses all configuration options for ad plugins.
See moreDeclaration
Swift
@objc public class JWAdvertisingConfig : NSObject
-
Used to configure Google DAI streams based on the provided information.
See moreDeclaration
Swift
@objc public class JWGoogleDAIStream : NSObject
-
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 theJWPlayerItem
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.Declaration
Swift
@objcMembers public class JWImaAdvertisingConfigBuilder : NSObject, JWBuilder
-
Used to build a
See moreJWAdvertisingConfig
object to play ads using the DAI client.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
See moreJWImaSettings
, object used to configure the Google IMA SDK.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
-
An object describing the position, size, and behavior of a caption on the screen. In order to instantiate an instance of this class, use
See moreJWCaptionPositionBuilder
.Declaration
Swift
@objcMembers public final class JWCaptionPosition : NSObject
extension JWCaptionPosition: DeepCopying
extension JWCaptionPosition: JWJSONCodable
-
The builder for creating a
See moreJWCaptionPosition
and verifying its properties.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.Declaration
Swift
@objcMembers public final class JWCaptionStyle : NSObject
extension JWCaptionStyle: JWJSONCodable
extension JWCaptionStyle: DeepCopying
-
Provides information about a caption track.
See moreDeclaration
Swift
@objcMembers public class JWCaptionTrack : JWMediaTrack
-
Provides information about a chapter track.
See moreDeclaration
Swift
@objcMembers public class JWChapterTrack : JWMediaTrack
-
A settings object containing information regarding external playback.
See moreDeclaration
Swift
public class JWExternalPlaybackSettings : NSObject
-
A builder for creating instances of
See moreJWExternalPlaybackSettings
.Declaration
Swift
public class JWExternalPlaybackSettingsBuilder : NSObject, JWBuilder
-
This JSON parser helps to convert a json object into a
See moreJWPlayerConfiguration
using the different configuration builders provided byJWPlayerKit
.Declaration
Swift
@objcMembers final public class JWJSONParser : NSObject
-
Defines a logo which is overlayed on the player.
Declaration
Swift
@objc public class JWLogo : NSObject
-
Represents a specific option for the presentation of media.
See moreDeclaration
Swift
@objcMembers public class JWMediaSelectionOption : NSObject
-
Provides information about captions or thumbnails. Supports TTML (DFXP), SRT, and WebVTT formats.
See moreDeclaration
Swift
@objcMembers public class JWMediaTrack : NSObject
-
Defines the style for the control bar on a player.
See moreDeclaration
-
The builder for JWMenuStyle.
See moreDeclaration
Swift
@objcMembers public final class JWMenuStyleBuilder : NSObject, JWPrototypingBuilder
-
Used to build a
See moreJWPlayerConfiguration
object to configure instance(s) ofJWPlayer
.Declaration
Swift
@objcMembers public final class JWPlayerConfigurationBuilder : NSObject, JWBuilder, JWJSONDecodable
-
Defines a player item which contains the information about the media content.
See moreDeclaration
Swift
@objcMembers public final class JWPlayerItem : NSObject, JWJSONEncodable, JWInitializableFromJSON
-
The builder for JWPlayerItem, ensuring it is built correctly.
See moreDeclaration
Swift
@objcMembers public final class JWPlayerItemBuilder : NSObject, JWBuilder, JWJSONDecodable
-
Defines a player item which contains the information about the media content.
See moreDeclaration
-
The builder for JWPlayerSkin.
See moreDeclaration
Swift
@objcMembers public class JWPlayerSkinBuilder : NSObject, JWPrototypingBuilder
-
A configuration object for handling related content loading and display.
Declaration
Swift
@objc public class JWRelatedContentConfiguration : NSObject
-
Defines the style for the control bar on a player.
See moreDeclaration
-
The builder for JWTimeSliderStyle.
See moreDeclaration
Swift
@objcMembers public final class JWTimeSliderStyleBuilder : NSObject, JWPrototypingBuilder
-
Defines a video source which represents a visual quality level of the video.
See moreDeclaration
Swift
@objcMembers public class JWVideoSource : NSObject
-
A description of a video quality level.
See moreDeclaration
Swift
@objcMembers public class JWVisualQualityLevel : NSObject
-
See moreJWVisualQuality
represents the quality of a video stream.Declaration
Swift
@objcMembers public class JWVisualQuality : NSObject
-
This loader is used to interface with FairPlay and decode streams for download.
See moreDeclaration
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 moreDeclaration
Swift
@objcMembers public class JWLockScreenManager : NSObject
-
Access log metadata. Fires when a new access log entry has been added for the JWPlayerItem.
See moreDeclaration
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 moreDeclaration
Swift
@objcMembers public class JWDateRangeMetadata : NSObject
-
Metadata that can be passed externally to supplement the encoded metadata of the underlying media asset.
See moreDeclaration
Swift
@objcMembers public class JWExternalMetadata : NSObject
-
ID3 metadata. Fires when playback buffers a section of an HLS stream containing ID3 tags.
See moreDeclaration
Swift
@objcMembers public class JWID3Metadata : NSObject
-
Media metadata. Fires when the initial metadata of content has loaded.
See moreDeclaration
Swift
@objcMembers public class JWMediaMetadata : NSObject
-
Delegates that surface different types of metadata from the player.
See moreDeclaration
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 moreDeclaration
Swift
@objcMembers public class JWProgramDateTimeMetadata : NSObject
-
JWPlayerKitLicense is a static interface into our SDK for accomplishing basic tasks outside of a JWPlayer instance.
See moreDeclaration
Swift
@objcMembers public class JWPlayerKitLicense : NSObject
-
A structure describing settings for the ad interface.
Declaration
Swift
@objc public class JWAdInterfaceStyle : NSObject
-
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.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 moreDeclaration
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 forJWPlayerView
orJWPlayer
and its related delegate properties, nor forJWPlayer.adTimeObserver
andJWPlayer.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 toJWPlayerObjViewController
and subclass that instead.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 moreDeclaration
Swift
@objcMembers @MainActor public class JWPlayerView : UIView, JWPlayerViewProtocol, ViewabilityHandlerDelegate