Class AVPlayerInterstitialEvent

  • All Implemented Interfaces:
    NSCopying, NSObject

    public class AVPlayerInterstitialEvent
    extends NSObject
    implements NSCopying
    AVPlayerInterstitialEvent An AVPlayerInterstitialEvent provides instructions for temporarily suspending the playback of primary content in order to play alternative interstitial content instead, resuming playback of the primary content when playback of the interstitial content is complete or is canceled. The primary content is specified as an instance of AVPlayerItem, designated as the primary item of the interstitial event. The timing of interstitial playback is specified as a date within the date range of the primary item. Interstitial events are currently possible only for items with an intrinsic mapping from their timeline to real-time dates. The alternative interstitial content is specified as an array of one or more AVPlayerItems that will be used as templates for the creation of items for interstitial playback. In other words, these template items are not the actual items that will be played during interstitial playback; instead they are used to generate the items that are to be played, with property values that match the configuration of your template items. If you wish to observe the scheduling and progress of interstitial events, use an AVPlayerInterstitialEventMonitor. If you wish to specify your own schedule of interstitial events, use an AVPlayerInterstitialEventController. Note that while previously AVPlayerInterstitialEvent was an immutable object, it is now mutable. This allows it to be created and customized before being set on an AVPlayerInterstitialEventController. API-Since: 15.0
    • Constructor Detail

      • AVPlayerInterstitialEvent

        protected AVPlayerInterstitialEvent​(org.moe.natj.general.Pointer peer)
    • Method Detail

      • accessInstanceVariablesDirectly

        public static boolean accessInstanceVariablesDirectly()
      • automaticallyNotifiesObserversForKey

        public static boolean automaticallyNotifiesObserversForKey​(@NotNull
                                                                   @NotNull java.lang.String key)
      • cancelPreviousPerformRequestsWithTarget

        public static void cancelPreviousPerformRequestsWithTarget​(@NotNull
                                                                   @NotNull java.lang.Object aTarget)
      • cancelPreviousPerformRequestsWithTargetSelectorObject

        public static void cancelPreviousPerformRequestsWithTargetSelectorObject​(@NotNull
                                                                                 @NotNull java.lang.Object aTarget,
                                                                                 @NotNull
                                                                                 @NotNull org.moe.natj.objc.SEL aSelector,
                                                                                 @Nullable
                                                                                 @Nullable java.lang.Object anArgument)
      • classFallbacksForKeyedArchiver

        @NotNull
        public static @NotNull NSArray<java.lang.String> classFallbacksForKeyedArchiver()
      • classForKeyedUnarchiver

        @NotNull
        public static @NotNull org.moe.natj.objc.Class classForKeyedUnarchiver()
      • date

        @Nullable
        public @Nullable NSDate date()
        [@property] date The date within the date range of the primary item at which playback of the primary content should be temporarily suspended and the interstitial items played. Will have a value of nil if the event was initialized with a time instead of a date.
      • debugDescription_static

        public static java.lang.String debugDescription_static()
      • description_static

        public static java.lang.String description_static()
      • hash_static

        public static long hash_static()
      • identifier

        @NotNull
        public @NotNull java.lang.String identifier()
        [@property] identifier An external identifier for the event. If an event is set on an AVPlayerInterstitialEventController that already has an event with the same identifier, the old event will be replaced by the new one.
      • instanceMethodSignatureForSelector

        public static NSMethodSignature instanceMethodSignatureForSelector​(org.moe.natj.objc.SEL aSelector)
      • instancesRespondToSelector

        public static boolean instancesRespondToSelector​(org.moe.natj.objc.SEL aSelector)
      • interstitialEventWithPrimaryItemIdentifierDateTemplateItemsRestrictionsResumptionOffsetPlayoutLimitUserDefinedAttributes

        @Deprecated
        public static AVPlayerInterstitialEvent interstitialEventWithPrimaryItemIdentifierDateTemplateItemsRestrictionsResumptionOffsetPlayoutLimitUserDefinedAttributes​(@NotNull
                                                                                                                                                                         @NotNull AVPlayerItem primaryItem,
                                                                                                                                                                         @Nullable
                                                                                                                                                                         @Nullable java.lang.String identifier,
                                                                                                                                                                         @NotNull
                                                                                                                                                                         @NotNull NSDate date,
                                                                                                                                                                         @NotNull
                                                                                                                                                                         @NotNull NSArray<? extends AVPlayerItem> templateItems,
                                                                                                                                                                         long restrictions,
                                                                                                                                                                         CMTime resumptionOffset,
                                                                                                                                                                         CMTime playoutLimit,
                                                                                                                                                                         @Nullable
                                                                                                                                                                         @Nullable NSDictionary<?,​?> userDefinedAttributes)
        Deprecated.
        interstitialEventWithPrimaryItem:date:templateItems:restrictions:resumptionOffset: Returns an instance of AVPlayerInterstitialEvent for use in scheduling interstitial playback.
        Parameters:
        primaryItem - An AVPlayerItem representing the primary content during the playback of which the interstitial event should occur. The primaryItem must have an AVAsset that provides an intrinsic mapping from its timeline to real-time dates.
        identifier - An external identifier for the event.
        date - The date within the date range of the primary item at which playback of the primary content should be temporarily suspended and the interstitial items played.
        templateItems - An array of AVPlayerItems with configurations that will be reproduced for the playback of interstitial content. An NSInvalidArgumentException will be raised if any of the template items employs an AVAsset that lacks a URL, such as an AVComposition.
        restrictions - Indicates restrictions on the use of end user playback controls that are imposed by the event.
        resumptionOffset - Specifies the offset in time at which playback of the primary item should resume after interstitial playback has finished. Definite numeric values are supported. The value kCMTimeIndefinite can also be used, in order to specify that the effective resumption time offset should accord with the wallclock time elapsed during interstitial playback.
        playoutLimit - Specifies the offset from the beginning of the interstitial at which interstitial playback should end, if the interstitial asset(s) are longer. Pass a positive numeric value, or kCMTimeInvalid to indicate no playout limit.
        userDefinedAttributes - Storage for attributes defined by the client or the content vendor. Attribute names should begin with X- for uniformity with server insertion.
        Returns:
        An instance of AVPlayerInterstitialEvent. API-Since: 15.0 Deprecated-Since: 100000.0
      • interstitialEventWithPrimaryItemIdentifierTimeTemplateItemsRestrictionsResumptionOffsetPlayoutLimitUserDefinedAttributes

        @Deprecated
        public static AVPlayerInterstitialEvent interstitialEventWithPrimaryItemIdentifierTimeTemplateItemsRestrictionsResumptionOffsetPlayoutLimitUserDefinedAttributes​(@NotNull
                                                                                                                                                                         @NotNull AVPlayerItem primaryItem,
                                                                                                                                                                         @Nullable
                                                                                                                                                                         @Nullable java.lang.String identifier,
                                                                                                                                                                         CMTime time,
                                                                                                                                                                         @NotNull
                                                                                                                                                                         @NotNull NSArray<? extends AVPlayerItem> templateItems,
                                                                                                                                                                         long restrictions,
                                                                                                                                                                         CMTime resumptionOffset,
                                                                                                                                                                         CMTime playoutLimit,
                                                                                                                                                                         @Nullable
                                                                                                                                                                         @Nullable NSDictionary<?,​?> userDefinedAttributes)
        Deprecated.
        interstitialEventWithPrimaryItem:time:templateItems:restrictions:resumptionOffset: Returns an instance of AVPlayerInterstitialEvent for use in scheduling interstitial playback.
        Parameters:
        primaryItem - An AVPlayerItem representing the primary content during the playback of which the interstitial event should occur. The primaryItem must have an AVAsset that provides an intrinsic mapping from its timeline to real-time dates.
        identifier - An external identifier for the event.
        time - The time within the duration of the primary item at which playback of the primary content should be temporarily suspended and the interstitial items played.
        templateItems - An array of AVPlayerItems with configurations that will be reproduced for the playback of interstitial content. An NSInvalidArgumentException will be raised if any of the template items employs an AVAsset that lacks a URL, such as an AVComposition.
        restrictions - Indicates restrictions on the use of end user playback controls that are imposed by the event.
        resumptionOffset - Specifies the offset in time at which playback of the primary item should resume after interstitial playback has finished. Definite numeric values are supported. The value kCMTimeIndefinite can also be used, in order to specify that the effective resumption time offset should accord with the wallclock time elapsed during interstitial playback.
        playoutLimit - Specifies the offset from the beginning of the interstitial at which interstitial playback should end, if the interstitial asset(s) are longer. Pass a positive numeric value, or kCMTimeInvalid to indicate no playout limit.
        userDefinedAttributes - Storage for attributes defined by the client or the content vendor. Attribute names should begin with X- for uniformity with server insertion.
        Returns:
        An instance of AVPlayerInterstitialEvent. API-Since: 15.0 Deprecated-Since: 100000.0
      • isSubclassOfClass

        public static boolean isSubclassOfClass​(org.moe.natj.objc.Class aClass)
      • keyPathsForValuesAffectingValueForKey

        @NotNull
        public static @NotNull NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey​(@NotNull
                                                                                             @NotNull java.lang.String key)
      • playoutLimit

        public CMTime playoutLimit()
        [@property] playoutLimit Specifies the offset in time at which playback of the interstitial event should end. Can be any positive numeric value, or invalid. The default value is kCMTimeInvalid, which means there is no limit.
      • primaryItem

        @Nullable
        public @Nullable AVPlayerItem primaryItem()
        [@property] primaryItem An AVPlayerItem representing the primary content during the playback of which the interstitial event should occur. The primaryItem must have an AVAsset that provides an intrinsic mapping from its timeline to real-time dates.
      • resolveClassMethod

        public static boolean resolveClassMethod​(org.moe.natj.objc.SEL sel)
      • resolveInstanceMethod

        public static boolean resolveInstanceMethod​(org.moe.natj.objc.SEL sel)
      • restrictions

        public long restrictions()
        [@property] restrictions Indicates restrictions on the use of end user playback controls that are imposed by the event.
      • resumptionOffset

        public CMTime resumptionOffset()
        [@property] resumptionOffset Specifies the offset in time at which playback of the primary item should resume after interstitial playback has finished. Definite numeric values are supported. The value kCMTimeIndefinite can also be used, in order to specify that the effective resumption time offset should accord with the wallclock time elapsed during interstitial playback; this value is typically suitable for live broadcasts. The default value is kCMTimeZero.
      • setVersion_static

        public static void setVersion_static​(long aVersion)
      • superclass_static

        public static org.moe.natj.objc.Class superclass_static()
      • templateItems

        @NotNull
        public @NotNull NSArray<? extends AVPlayerItem> templateItems()
        [@property] templateItems An array of AVPlayerItems with configurations that will be reproduced for the playback of interstitial content. If you want the instances of AVURLAsset used during interstitial playback to be identical to the ones you specify for templateItems in AVPlayerInterstitialEvents that you set on an AVPlayerInterstitialEventController, rather than equivalent AVURLAssets with the same URL, you must create them with a value for the key AVURLAssetPrimarySessionIdentifierKey that's equal to the httpSessionIdentifier of the primary AVPlayerItem's asset. See AVAsset.h. This is especially useful if you require the use of a custom AVAssetResourceLoader delegate for interstitial assets. An NSInvalidArgumentException will be raised if any of the template items employs an AVAsset that lacks a URL, such as an AVComposition.
      • time

        public CMTime time()
        [@property] time The time within the duration of the primary item at which playback of the primary content should be temporarily suspended and the interstitial items played. Will have a value equal to kCMTimeInvalid if the event was initialized with a date instead of a time.
      • userDefinedAttributes

        @NotNull
        public @NotNull NSDictionary<?,​?> userDefinedAttributes()
        [@property] userDefinedAttributes Attributes of the event defined by the content vendor or the client. Dictionary keys are attribute names. Dictionary values are attribute values.
      • version_static

        public static long version_static()
      • alignsResumptionWithPrimarySegmentBoundary

        public boolean alignsResumptionWithPrimarySegmentBoundary()
        [@property] alignsResumptionWithPrimarySegmentBoundary Specifies that the resumption time of primary playback should be snapped to a segment boundary of the primary asset If true, the resumption time of primary playback following an interstitial will be adjusted to the nearest segment boundary when the primary player is playing an HTTP Live Streaming asset. API-Since: 16.0
      • alignsStartWithPrimarySegmentBoundary

        public boolean alignsStartWithPrimarySegmentBoundary()
        [@property] alignsStartWithPrimarySegmentBoundary Specifies that the start time of interstitial playback should be snapped to a segment boundary of the primary asset If true, the start time or date of the interstitial will be adjusted to the nearest segment boundary when the primary player is playing an HTTP Live Streaming asset. API-Since: 16.0
      • copyWithZone

        @NotNull
        public @NotNull java.lang.Object copyWithZone​(@Nullable
                                                      @Nullable org.moe.natj.general.ptr.VoidPtr zone)
        Specified by:
        copyWithZone in interface NSCopying
      • cue

        @NotNull
        public @NotNull java.lang.String cue()
        [@property] cue The cue property is used to schedule event playback at a predefined position of primary playback. API-Since: 16.0
      • interstitialEventWithPrimaryItemDate

        public static AVPlayerInterstitialEvent interstitialEventWithPrimaryItemDate​(@NotNull
                                                                                     @NotNull AVPlayerItem primaryItem,
                                                                                     @NotNull
                                                                                     @NotNull NSDate date)
        interstitialEventWithPrimaryItem:date: Returns an instance of AVPlayerInterstitialEvent for use in scheduling interstitial playback.
        Parameters:
        primaryItem - An AVPlayerItem representing the primary content during the playback of which the interstitial event should occur. The primaryItem must have an AVAsset that provides an intrinsic mapping from its timeline to real-time dates.
        date - The date within the date range of the primary item at which playback of the primary content should be temporarily suspended and the interstitial items played.
        Returns:
        An instance of AVPlayerInterstitialEvent. API-Since: 16.0
      • interstitialEventWithPrimaryItemTime

        public static AVPlayerInterstitialEvent interstitialEventWithPrimaryItemTime​(@NotNull
                                                                                     @NotNull AVPlayerItem primaryItem,
                                                                                     CMTime time)
        interstitialEventWithPrimaryItem:time: Returns an instance of AVPlayerInterstitialEvent for use in scheduling interstitial playback.
        Parameters:
        primaryItem - An AVPlayerItem representing the primary content during the playback of which the interstitial event should occur. The primaryItem must have an AVAsset that provides an intrinsic mapping from its timeline to real-time dates.
        time - The time within the duration of the primary item at which playback of the primary content should be temporarily suspended and the interstitial items played.
        Returns:
        An instance of AVPlayerInterstitialEvent. API-Since: 16.0
      • setAlignsResumptionWithPrimarySegmentBoundary

        public void setAlignsResumptionWithPrimarySegmentBoundary​(boolean value)
        API-Since: 16.0
      • setAlignsStartWithPrimarySegmentBoundary

        public void setAlignsStartWithPrimarySegmentBoundary​(boolean value)
        API-Since: 16.0
      • setCue

        public void setCue​(@NotNull
                           @NotNull java.lang.String value)
        API-Since: 16.0
      • setDate

        public void setDate​(@Nullable
                            @Nullable NSDate value)
        API-Since: 16.0
      • setIdentifier

        public void setIdentifier​(@NotNull
                                  @NotNull java.lang.String value)
        API-Since: 16.0
      • setPlayoutLimit

        public void setPlayoutLimit​(CMTime value)
        API-Since: 16.0
      • setPrimaryItem_unsafe

        public void setPrimaryItem_unsafe​(@Nullable
                                          @Nullable AVPlayerItem value)
        API-Since: 16.0
      • setPrimaryItem

        public void setPrimaryItem​(@Nullable
                                   @Nullable AVPlayerItem value)
        API-Since: 16.0
      • setRestrictions

        public void setRestrictions​(long value)
        API-Since: 16.0
      • setResumptionOffset

        public void setResumptionOffset​(CMTime value)
        API-Since: 16.0
      • setTemplateItems

        public void setTemplateItems​(@NotNull
                                     @NotNull NSArray<? extends AVPlayerItem> value)
        API-Since: 16.0
      • setTime

        public void setTime​(CMTime value)
        API-Since: 16.0
      • setUserDefinedAttributes

        public void setUserDefinedAttributes​(@NotNull
                                             @NotNull NSDictionary<?,​?> value)
        API-Since: 16.0
      • setWillPlayOnce

        public void setWillPlayOnce​(boolean value)
        API-Since: 16.0
      • willPlayOnce

        public boolean willPlayOnce()
        [@property] willPlayOnce Specifies that the interstitial should be scheduled for playback once only, and suppressed for subsequent replay. The "once" provision takes effect at the start of interstitial playback. The interstitial will not be scheduled again even if the first playback is canceled before completion. API-Since: 16.0
      • assetListResponse

        @Nullable
        public @Nullable NSDictionary<?,​?> assetListResponse()
        [@property] assetListResponse The asset list JSON response as a dictionary, or nil if no asset list response has been loaded for the event. If the AVPlayerInterstitialEvent's templateItems is empty and the assetListResponse is nil, then an asset list read is expected. If the AVPlayerInterstitialEvent's templateItems is not empty and the assetListResponse is nil, then an asset list read is not expected. API-Since: 16.4
      • useStoredAccessor

        @Deprecated
        public static boolean useStoredAccessor()
        Deprecated.