Class AVPlayerItem

    • Constructor Detail

      • AVPlayerItem

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

      • accessInstanceVariablesDirectly

        public static boolean accessInstanceVariablesDirectly()
      • allocWithZone

        public static java.lang.Object allocWithZone​(org.moe.natj.general.ptr.VoidPtr zone)
      • automaticallyNotifiesObserversForKey

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

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

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

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

        public static org.moe.natj.objc.Class classForKeyedUnarchiver()
      • 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()
      • instanceMethodSignatureForSelector

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

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

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

        public static NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey​(java.lang.String key)
      • new_objc

        public static java.lang.Object new_objc()
      • playerItemWithAsset

        public static AVPlayerItem playerItemWithAsset​(AVAsset asset)
        playerItemWithAsset: Returns an instance of AVPlayerItem for playing an AVAsset. Equivalent to +playerItemWithAsset:automaticallyLoadedAssetKeys:, passing @[ @"duration" ] as the value of automaticallyLoadedAssetKeys.
        Parameters:
        asset -
        Returns:
        An instance of AVPlayerItem.
      • playerItemWithAssetAutomaticallyLoadedAssetKeys

        public static AVPlayerItem playerItemWithAssetAutomaticallyLoadedAssetKeys​(AVAsset asset,
                                                                                   NSArray<java.lang.String> automaticallyLoadedAssetKeys)
        playerItemWithAsset:automaticallyLoadedAssetKeys: Returns an instance of AVPlayerItem for playing an AVAsset. The value of each key in automaticallyLoadedAssetKeys will be automatically be loaded by the underlying AVAsset before the receiver achieves the status AVPlayerItemStatusReadyToPlay; i.e. when the item is ready to play, the value of -[[AVPlayerItem asset] statusOfValueForKey:error:] will be one of the terminal status values greater than AVKeyValueStatusLoading.
        Parameters:
        asset -
        automaticallyLoadedAssetKeys - An NSArray of NSStrings, each representing a property key defined by AVAsset. See AVAsset.h for property keys, e.g. duration.
        Returns:
        An instance of AVPlayerItem.
      • playerItemWithURL

        public static AVPlayerItem playerItemWithURL​(NSURL URL)
        playerItemWithURL: Returns an instance of AVPlayerItem for playing a resource at the specified location. Equivalent to +playerItemWithAsset:, passing [AVAsset assetWithURL:URL] as the value of asset.
        Parameters:
        URL -
        Returns:
        An instance of AVPlayerItem.
      • resolveClassMethod

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

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

        public static void setVersion_static​(long aVersion)
      • superclass_static

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

        public static long version_static()
      • accessLog

        public AVPlayerItemAccessLog accessLog()
        accessLog Returns an object that represents a snapshot of the network access log. Can be nil. An AVPlayerItemAccessLog provides methods to retrieve the network access log in a format suitable for serialization. If nil is returned then there is no logging information currently available for this AVPlayerItem. An AVPlayerItemNewAccessLogEntryNotification will be posted when new logging information becomes available. However, accessLog might already return a non-nil value even before the first notification is posted.
        Returns:
        An autoreleased AVPlayerItemAccessLog instance.
      • addMediaDataCollector

        public void addMediaDataCollector​(AVPlayerItemMediaDataCollector collector)
        addMediaDataCollector: Adds the specified instance of AVPlayerItemMediaDataCollector to the receiver's collection of mediaDataCollectors. This method may incur additional I/O to collect the requested media data asynchronously.
        Parameters:
        collector - An instance of AVPlayerItemMediaDataCollector
      • addOutput

        public void addOutput​(AVPlayerItemOutput output)
        addOutput: Adds the specified instance of AVPlayerItemOutput to the receiver's collection of outputs. The class of AVPlayerItemOutput provided dictates the data structure that decoded samples are vended in. When an AVPlayerItemOutput is associated with an AVPlayerItem, samples are provided for a media type in accordance with the rules for mixing, composition, or exclusion that the AVPlayer honors among multiple enabled tracks of that media type for its own rendering purposes. For example, video media will be composed according to the instructions provided via AVPlayerItem.videoComposition, if present. Audio media will be mixed according to the parameters provided via AVPlayerItem.audioMix, if present.
        Parameters:
        output - An instance of AVPlayerItemOutput
      • asset

        public AVAsset asset()
        [@property] asset Accessor for underlying AVAsset.
      • audioMix

        public AVAudioMix audioMix()
        [@property] audioMix Indicates the audio mix parameters to be applied during playback The inputParameters of the AVAudioMix must have trackIDs that correspond to a track of the receiver's asset. Otherwise they will be ignored. (See AVAudioMix.h for the declaration of AVAudioMixInputParameters and AVPlayerItem's asset property.)
      • audioTimePitchAlgorithm

        public java.lang.String audioTimePitchAlgorithm()
        [@property] audioTimePitchAlgorithm Indicates the processing algorithm used to manage audio pitch at varying rates and for scaled audio edits. Constants for various time pitch algorithms, e.g. AVAudioTimePitchSpectral, are defined in AVAudioProcessingSettings.h. The default value on iOS is AVAudioTimePitchAlgorithmLowQualityZeroLatency and on OS X is AVAudioTimePitchAlgorithmSpectral.
      • automaticallyLoadedAssetKeys

        public NSArray<java.lang.String> automaticallyLoadedAssetKeys()
        [@property] automaticallyLoadedAssetKeys An array of property keys defined on AVAsset. The value of each key in the array is automatically loaded while the receiver is being made ready to play. The value of each key in automaticallyLoadedAssetKeys will be automatically be loaded by the underlying AVAsset before the receiver achieves the status AVPlayerItemStatusReadyToPlay; i.e. when the item is ready to play, the value of -[[AVPlayerItem asset] statusOfValueForKey:error:] will be AVKeyValueStatusLoaded. If loading of any of the values fails, the status of the AVPlayerItem will change instead to AVPlayerItemStatusFailed..
      • canPlayFastForward

        public boolean canPlayFastForward()
        For releases of OS X prior to 10.9 and releases of iOS prior to 7.0, indicates whether the item can be played at rates greater than 1.0. Starting with OS X 10.9 and iOS 7.0, all AVPlayerItems with status AVPlayerItemReadyToPlay can be played at rates between 1.0 and 2.0, inclusive, even if canPlayFastForward is NO; for those releases canPlayFastForward indicates whether the item can be played at rates greater than 2.0.
      • canPlayFastReverse

        public boolean canPlayFastReverse()
        indicates whether the item can be played at rates less than -1.0
      • canPlayReverse

        public boolean canPlayReverse()
        indicates whether the item can be played at rate -1.0
      • canPlaySlowForward

        public boolean canPlaySlowForward()
        indicates whether the item can be played at rates between 0.0 and 1.0
      • canPlaySlowReverse

        public boolean canPlaySlowReverse()
        indicates whether the item can be played at rates less between 0.0 and -1.0
      • canStepBackward

        public boolean canStepBackward()
        indicates whether the item supports stepping backward; see -stepByCount:. Once the item has become ready to play, the value of canStepBackward does not change even when boundary conditions are reached, such as when the item's currentTime is equal to kCMTimeZero.
      • canStepForward

        public boolean canStepForward()
        Indicates whether the item supports stepping forward; see -stepByCount:. Once the item has become ready to play, the value of canStepForward does not change even when boundary conditions are reached, such as when the item's currentTime is its end time.
      • canUseNetworkResourcesForLiveStreamingWhilePaused

        public boolean canUseNetworkResourcesForLiveStreamingWhilePaused()
        [@property] canUseNetworkResourcesForLiveStreamingWhilePaused Indicates whether the player item can use network resources to keep playback state up to date while paused For live streaming content, the player item may need to use extra networking and power resources to keep playback state up to date when paused. For example, when this property is set to YES, the seekableTimeRanges property will be periodically updated to reflect the current state of the live stream. For clients linked on or after OS X 10.11 or iOS 9.0, the default value is NO. To minimize power usage, avoid setting this property to YES when you do not need playback state to stay up to date while paused.
      • cancelPendingSeeks

        public void cancelPendingSeeks()
        cancelPendingSeeks Cancel any pending seek requests and invoke the corresponding completion handlers if present. Use this method to cancel and release the completion handlers of pending seeks. The finished parameter of the completion handlers will be set to NO.
      • copyWithZone

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

        public NSDate currentDate()
        currentDate If currentTime is mapped to a particular (real-time) date, return that date.
        Returns:
        Returns the date of current playback, or nil if playback is not mapped to any date.
      • currentMediaSelection

        public AVMediaSelection currentMediaSelection()
        [@property] currentMediaSelection Provides an instance of AVMediaSelection carrying current selections for each of the receiver's media selection groups.
      • currentTime

        public CMTime currentTime()
        currentTime Returns the current time of the item. Returns the current time of the item. Not key-value observable; use -[AVPlayer addPeriodicTimeObserverForInterval:queue:usingBlock:] instead.
        Returns:
        A CMTime
      • customVideoCompositor

        public AVVideoCompositing customVideoCompositor()
        [@property] customVideoCompositor Indicates the custom video compositor instance. This property is nil if there is no video compositor, or if the internal video compositor is in use. This reference can be used to provide extra context to the custom video compositor instance if required.
      • duration

        public CMTime duration()
        [@property] duration Indicates the duration of the item, not considering either its forwardPlaybackEndTime or reversePlaybackEndTime. This property is observable. The duration of an item can change dynamically during playback. Unless you omit @"duration" from the array of asset keys you pass to +playerItemWithAsset:automaticallyLoadedAssetKeys: or -initWithAsset:automaticallyLoadedAssetKeys:, the value of this property will accord with the properties of the underlying AVAsset and the current state of playback once the receiver becomes ready to play. Before the underlying duration has been loaded, the value of this property is kCMTimeIndefinite. Use key-value observation to obtain a valid duration as soon as it becomes available. (Note that the value of duration may remain kCMTimeIndefinite, e.g. for live streams.)
      • error

        public NSError error()
        [@property] error If the receiver's status is AVPlayerItemStatusFailed, this describes the error that caused the failure. The value of this property is an NSError that describes what caused the receiver to no longer be able to be played. If the receiver's status is not AVPlayerItemStatusFailed, the value of this property is nil.
      • errorLog

        public AVPlayerItemErrorLog errorLog()
        errorLog Returns an object that represents a snapshot of the error log. Can be nil. An AVPlayerItemErrorLog provides methods to retrieve the error log in a format suitable for serialization. If nil is returned then there is no logging information currently available for this AVPlayerItem.
        Returns:
        An autoreleased AVPlayerItemErrorLog instance.
      • forwardPlaybackEndTime

        public CMTime forwardPlaybackEndTime()
        [@property] forwardPlaybackEndTime The end time for forward playback. Specifies the time at which playback should end when the playback rate is positive (see AVPlayer's rate property). The default value is kCMTimeInvalid, which indicates that no end time for forward playback is specified. In this case, the effective end time for forward playback is the receiver's duration. When the end time is reached, the receiver will post AVPlayerItemDidPlayToEndTimeNotification and the AVPlayer will take the action indicated by the value of its actionAtItemEnd property (see AVPlayerActionAtItemEnd in AVPlayer.h). The value of this property has no effect on playback when the rate is negative.
      • initWithAsset

        public AVPlayerItem initWithAsset​(AVAsset asset)
        initWithAsset: Initializes an AVPlayerItem with an AVAsset. Equivalent to -initWithAsset:automaticallyLoadedAssetKeys:, passing @[ @"duration" ] as the value of automaticallyLoadedAssetKeys.
        Parameters:
        asset -
        Returns:
        An instance of AVPlayerItem
      • initWithAssetAutomaticallyLoadedAssetKeys

        public AVPlayerItem initWithAssetAutomaticallyLoadedAssetKeys​(AVAsset asset,
                                                                      NSArray<java.lang.String> automaticallyLoadedAssetKeys)
        initWithAsset:automaticallyLoadedAssetKeys: Initializes an AVPlayerItem with an AVAsset. The value of each key in automaticallyLoadedAssetKeys will be automatically be loaded by the underlying AVAsset before the receiver achieves the status AVPlayerItemStatusReadyToPlay; i.e. when the item is ready to play, the value of -[[AVPlayerItem asset] statusOfValueForKey:error:] will be one of the terminal status values greater than AVKeyValueStatusLoading.
        Parameters:
        asset - An instance of AVAsset.
        automaticallyLoadedAssetKeys - An NSArray of NSStrings, each representing a property key defined by AVAsset. See AVAsset.h for property keys, e.g. duration.
        Returns:
        An instance of AVPlayerItem
      • initWithURL

        public AVPlayerItem initWithURL​(NSURL URL)
        initWithURL: Initializes an AVPlayerItem with an NSURL. Equivalent to -initWithAsset:, passing [AVAsset assetWithURL:URL] as the value of asset.
        Parameters:
        URL -
        Returns:
        An instance of AVPlayerItem
      • isPlaybackBufferEmpty

        public boolean isPlaybackBufferEmpty()
        indicates that playback has consumed all buffered media and that playback will stall or end
      • isPlaybackBufferFull

        public boolean isPlaybackBufferFull()
        [@property] playbackBufferFull Indicates that the internal media buffer is full and that further I/O is suspended. This property reports that the data buffer used for playback has reach capacity. Despite the playback buffer reaching capacity there might not exist sufficient statistical data to support a playbackLikelyToKeepUp prediction of YES. See playbackLikelyToKeepUp above.
      • isPlaybackLikelyToKeepUp

        public boolean isPlaybackLikelyToKeepUp()
        [@property] playbackLikelyToKeepUp Indicates whether the item will likely play through without stalling. This property communicates a prediction of playability. Factors considered in this prediction include I/O throughput and media decode performance. It is possible for playbackLikelyToKeepUp to indicate NO while the property playbackBufferFull indicates YES. In this event the playback buffer has reached capacity but there isn't the statistical data to support a prediction that playback is likely to keep up. It is left to the application programmer to decide to continue media playback or not. See playbackBufferFull below.
      • loadedTimeRanges

        public NSArray<? extends NSValue> loadedTimeRanges()
        [@property] loadedTimeRanges This property provides a collection of time ranges for which the player has the media data readily available. The ranges provided might be discontinuous. Returns an NSArray of NSValues containing CMTimeRanges.
      • preferredForwardBufferDuration

        public double preferredForwardBufferDuration()
        [@property] preferredForwardBufferDuration Indicates the media duration the caller prefers the player to buffer from the network ahead of the playhead to guard against playback disruption. The value is in seconds. If it is set to 0, the player will choose an appropriate level of buffering for most use cases. Note that setting this property to a low value will increase the chance that playback will stall and re-buffer, while setting it to a high value will increase demand on system resources. Note that the system may buffer less than the value of this property in order to manage resource consumption.
      • preferredPeakBitRate

        public double preferredPeakBitRate()
        [@property] preferredPeakBitRate Indicates the desired limit of network bandwidth consumption for this item. Set preferredPeakBitRate to non-zero to indicate that the player should attempt to limit item playback to that bit rate, expressed in bits per second. If network bandwidth consumption cannot be lowered to meet the preferredPeakBitRate, it will be reduced as much as possible while continuing to play the item.
      • presentationSize

        public CGSize presentationSize()
        [@property] presentationSize The size of the receiver as presented by the player. Indicates the size at which the visual portion of the item is presented by the player; can be scaled from this size to fit within the bounds of an AVPlayerLayer via its videoGravity property. Can be scaled arbitarily for presentation via the frame property of an AVPlayerLayer. The value of this property will accord with the properties of the underlying media resource when the receiver becomes ready to play. Before the underlying media resource is sufficiently loaded, its value is CGSizeZero. Use key-value observation to obtain a valid presentationSize as soon as it becomes available. (Note that the value of presentationSize may remain CGSizeZero, e.g. for audio-only items.)
      • removeMediaDataCollector

        public void removeMediaDataCollector​(AVPlayerItemMediaDataCollector collector)
        removeMediaDataCollector: Removes the specified instance of AVPlayerItemMediaDataCollector from the receiver's collection of mediaDataCollectors.
        Parameters:
        collector - An instance of AVPlayerItemMediaDataCollector
      • removeOutput

        public void removeOutput​(AVPlayerItemOutput output)
        removeOutput: Removes the specified instance of AVPlayerItemOutput from the receiver's collection of outputs.
        Parameters:
        output - An instance of AVPlayerItemOutput
      • reversePlaybackEndTime

        public CMTime reversePlaybackEndTime()
        [@property] reversePlaybackEndTime The end time for reverse playback. Specifies the time at which playback should end when the playback rate is negative (see AVPlayer's rate property). The default value is kCMTimeInvalid, which indicates that no end time for reverse playback is specified. In this case, the effective end time for reverse playback is kCMTimeZero. When the end time is reached, the receiver will post AVPlayerItemDidPlayToEndTimeNotification and the AVPlayer will take the action indicated by the value of its actionAtItemEnd property (see AVPlayerActionAtItemEnd in AVPlayer.h). The value of this property has no effect on playback when the rate is positive.
      • seekToDate

        public boolean seekToDate​(NSDate date)
        seekToDate move playhead to a point corresponding to a particular date. For playback content that is associated with a range of dates, move the playhead to point within that range. Will fail if the supplied date is outside the range or if the content is not associated with a range of dates.
        Parameters:
        date - The new position for the playhead.
        Returns:
        Returns true if the playhead was moved to the supplied date.
      • seekToDateCompletionHandler

        public boolean seekToDateCompletionHandler​(NSDate date,
                                                   AVPlayerItem.Block_seekToDateCompletionHandler completionHandler)
        seekToDate:completionHandler: move playhead to a point corresponding to a particular date, and invokes the specified block when the seek operation has either been completed or been interrupted. For playback content that is associated with a range of dates, move the playhead to point within that range and invokes the completion handler when the seek operation is complete. Will fail if the supplied date is outside the range or if the content is not associated with a range of dates. The completion handler for any prior seek request that is still in process will be invoked immediately with the finished parameter set to NO. If the new request completes without being interrupted by another seek request or by any other operation, the specified completion handler will be invoked with the finished parameter set to YES.
        Parameters:
        date - The new position for the playhead.
        completionHandler - The block to invoke when seek operation is complete
        Returns:
        Returns true if the playhead was moved to the supplied date.
      • seekToTime

        public void seekToTime​(CMTime time)
        seekToTime: Moves the playback cursor. Use this method to seek to a specified time for the item. The time seeked to may differ from the specified time for efficiency. For sample accurate seeking see seekToTime:toleranceBefore:toleranceAfter:. If the seek time is outside of seekable time ranges as indicated by seekableTimeRanges property, the seek request will be cancelled.
        Parameters:
        time -
      • seekToTimeCompletionHandler

        public void seekToTimeCompletionHandler​(CMTime time,
                                                AVPlayerItem.Block_seekToTimeCompletionHandler completionHandler)
        seekToTime:completionHandler: Moves the playback cursor and invokes the specified block when the seek operation has either been completed or been interrupted. Use this method to seek to a specified time for the item and to be notified when the seek operation is complete. The completion handler for any prior seek request that is still in process will be invoked immediately with the finished parameter set to NO. If the new request completes without being interrupted by another seek request or by any other operation the specified completion handler will be invoked with the finished parameter set to YES. If the seek time is outside of seekable time ranges as indicated by seekableTimeRanges property, the seek request will be cancelled and the completion handler will be invoked with the finished parameter set to NO.
        Parameters:
        time -
        completionHandler -
      • seekToTimeToleranceBeforeToleranceAfter

        public void seekToTimeToleranceBeforeToleranceAfter​(CMTime time,
                                                            CMTime toleranceBefore,
                                                            CMTime toleranceAfter)
        seekToTime:toleranceBefore:toleranceAfter: Moves the playback cursor within a specified time bound. Use this method to seek to a specified time for the item. The time seeked to will be within the range [time-toleranceBefore, time+toleranceAfter] and may differ from the specified time for efficiency. Pass kCMTimeZero for both toleranceBefore and toleranceAfter to request sample accurate seeking which may incur additional decoding delay. Messaging this method with beforeTolerance:kCMTimePositiveInfinity and afterTolerance:kCMTimePositiveInfinity is the same as messaging seekToTime: directly. Seeking is constrained by the collection of seekable time ranges. If you seek to a time outside all of the seekable ranges the seek will result in a currentTime within the seekable ranges. If the seek time is outside of seekable time ranges as indicated by seekableTimeRanges property, the seek request will be cancelled.
        Parameters:
        time -
        toleranceBefore -
        toleranceAfter -
      • seekToTimeToleranceBeforeToleranceAfterCompletionHandler

        public void seekToTimeToleranceBeforeToleranceAfterCompletionHandler​(CMTime time,
                                                                             CMTime toleranceBefore,
                                                                             CMTime toleranceAfter,
                                                                             AVPlayerItem.Block_seekToTimeToleranceBeforeToleranceAfterCompletionHandler completionHandler)
        seekToTime:toleranceBefore:toleranceAfter:completionHandler: Moves the playback cursor within a specified time bound and invokes the specified block when the seek operation has either been completed or been interrupted. Use this method to seek to a specified time for the item and to be notified when the seek operation is complete. The time seeked to will be within the range [time-toleranceBefore, time+toleranceAfter] and may differ from the specified time for efficiency. Pass kCMTimeZero for both toleranceBefore and toleranceAfter to request sample accurate seeking which may incur additional decoding delay. Messaging this method with beforeTolerance:kCMTimePositiveInfinity and afterTolerance:kCMTimePositiveInfinity is the same as messaging seekToTime: directly. The completion handler for any prior seek request that is still in process will be invoked immediately with the finished parameter set to NO. If the new request completes without being interrupted by another seek request or by any other operation the specified completion handler will be invoked with the finished parameter set to YES. If the seek time is outside of seekable time ranges as indicated by seekableTimeRanges property, the seek request will be cancelled and the completion handler will be invoked with the finished parameter set to NO.
        Parameters:
        time -
        toleranceBefore -
        toleranceAfter -
        completionHandler -
      • seekableTimeRanges

        public NSArray<? extends NSValue> seekableTimeRanges()
        [@property] seekableTimeRanges This property provides a collection of time ranges that the player item can seek to. The ranges provided might be discontinous. Returns an NSArray of NSValues containing CMTimeRanges.
      • seekingWaitsForVideoCompositionRendering

        public boolean seekingWaitsForVideoCompositionRendering()
        [@property] seekingWaitsForVideoCompositionRendering Indicates whether the item's timing follows the displayed video frame when seeking with a video composition By default, item timing is updated as quickly as possible, not waiting for media at new times to be rendered when seeking or during normal playback. The latency that occurs, for example, between the completion of a seek operation and the display of a video frame at a new time is negligible in most situations. However, when video compositions are in use, the processing of video for any particular time may introduce noticeable latency. Therefore it may be desirable when a video composition is in use for the item's timing be updated only after the video frame for a time has been displayed. This allows, for instance, an AVSynchronizedLayer associated with an AVPlayerItem to remain in synchronization with the displayed video and for the currentTime property to return the time of the displayed video. This property has no effect on items for which videoComposition is nil.
      • selectMediaOptionInMediaSelectionGroup

        public void selectMediaOptionInMediaSelectionGroup​(AVMediaSelectionOption mediaSelectionOption,
                                                           AVMediaSelectionGroup mediaSelectionGroup)
        selectMediaOption:inMediaSelectionGroup: Selects the media option described by the specified instance of AVMediaSelectionOption in the specified AVMediaSelectionGroup and deselects all other options in that group. If the specified media selection option isn't a member of the specified media selection group, no change in presentation state will result. If the value of the property allowsEmptySelection of the AVMediaSelectionGroup is YES, you can pass nil for mediaSelectionOption to deselect all media selection options in the group. Note that if multiple options within a group meet your criteria for selection according to locale or other considerations, and if these options are otherwise indistinguishable to you according to media characteristics that are meaningful for your application, content is typically authored so that the first available option that meets your criteria is appropriate for selection.
        Parameters:
        mediaSelectionOption - The option to select.
        mediaSelectionGroup - The media selection group, obtained from the receiver's asset, that contains the specified option.
      • selectMediaOptionAutomaticallyInMediaSelectionGroup

        public void selectMediaOptionAutomaticallyInMediaSelectionGroup​(AVMediaSelectionGroup mediaSelectionGroup)
        selectMediaOptionAutomaticallyInMediaSelectionGroup: Selects the media option in the specified media selection group that best matches the AVPlayer's current automatic selection criteria. Also allows automatic selection to be re-applied to the specified group subsequently if the relevant criteria are changed. Has no effect unless the appliesMediaSelectionCriteriaAutomatically property of the associated AVPlayer is YES and unless automatic media selection has previously been overridden via -[AVPlayerItem selectMediaOption:inMediaSelectionGroup:].
        Parameters:
        mediaSelectionGroup - The media selection group, obtained from the receiver's asset, that contains the specified option.
      • selectedMediaOptionInMediaSelectionGroup

        public AVMediaSelectionOption selectedMediaOptionInMediaSelectionGroup​(AVMediaSelectionGroup mediaSelectionGroup)
        selectedMediaOptionInMediaSelectionGroup: Indicates the media selection option that's currently selected from the specified group. May be nil. If the value of the property allowsEmptySelection of the AVMediaSelectionGroup is YES, the currently selected option in the group may be nil.
        Parameters:
        mediaSelectionGroup - A media selection group obtained from the receiver's asset.
        Returns:
        An instance of AVMediaSelectionOption that describes the currently selection option in the group.
      • setAudioMix

        public void setAudioMix​(AVAudioMix value)
        [@property] audioMix Indicates the audio mix parameters to be applied during playback The inputParameters of the AVAudioMix must have trackIDs that correspond to a track of the receiver's asset. Otherwise they will be ignored. (See AVAudioMix.h for the declaration of AVAudioMixInputParameters and AVPlayerItem's asset property.)
      • setAudioTimePitchAlgorithm

        public void setAudioTimePitchAlgorithm​(java.lang.String value)
        [@property] audioTimePitchAlgorithm Indicates the processing algorithm used to manage audio pitch at varying rates and for scaled audio edits. Constants for various time pitch algorithms, e.g. AVAudioTimePitchSpectral, are defined in AVAudioProcessingSettings.h. The default value on iOS is AVAudioTimePitchAlgorithmLowQualityZeroLatency and on OS X is AVAudioTimePitchAlgorithmSpectral.
      • setCanUseNetworkResourcesForLiveStreamingWhilePaused

        public void setCanUseNetworkResourcesForLiveStreamingWhilePaused​(boolean value)
        [@property] canUseNetworkResourcesForLiveStreamingWhilePaused Indicates whether the player item can use network resources to keep playback state up to date while paused For live streaming content, the player item may need to use extra networking and power resources to keep playback state up to date when paused. For example, when this property is set to YES, the seekableTimeRanges property will be periodically updated to reflect the current state of the live stream. For clients linked on or after OS X 10.11 or iOS 9.0, the default value is NO. To minimize power usage, avoid setting this property to YES when you do not need playback state to stay up to date while paused.
      • setForwardPlaybackEndTime

        public void setForwardPlaybackEndTime​(CMTime value)
        [@property] forwardPlaybackEndTime The end time for forward playback. Specifies the time at which playback should end when the playback rate is positive (see AVPlayer's rate property). The default value is kCMTimeInvalid, which indicates that no end time for forward playback is specified. In this case, the effective end time for forward playback is the receiver's duration. When the end time is reached, the receiver will post AVPlayerItemDidPlayToEndTimeNotification and the AVPlayer will take the action indicated by the value of its actionAtItemEnd property (see AVPlayerActionAtItemEnd in AVPlayer.h). The value of this property has no effect on playback when the rate is negative.
      • setPreferredForwardBufferDuration

        public void setPreferredForwardBufferDuration​(double value)
        [@property] preferredForwardBufferDuration Indicates the media duration the caller prefers the player to buffer from the network ahead of the playhead to guard against playback disruption. The value is in seconds. If it is set to 0, the player will choose an appropriate level of buffering for most use cases. Note that setting this property to a low value will increase the chance that playback will stall and re-buffer, while setting it to a high value will increase demand on system resources. Note that the system may buffer less than the value of this property in order to manage resource consumption.
      • setPreferredPeakBitRate

        public void setPreferredPeakBitRate​(double value)
        [@property] preferredPeakBitRate Indicates the desired limit of network bandwidth consumption for this item. Set preferredPeakBitRate to non-zero to indicate that the player should attempt to limit item playback to that bit rate, expressed in bits per second. If network bandwidth consumption cannot be lowered to meet the preferredPeakBitRate, it will be reduced as much as possible while continuing to play the item.
      • setReversePlaybackEndTime

        public void setReversePlaybackEndTime​(CMTime value)
        [@property] reversePlaybackEndTime The end time for reverse playback. Specifies the time at which playback should end when the playback rate is negative (see AVPlayer's rate property). The default value is kCMTimeInvalid, which indicates that no end time for reverse playback is specified. In this case, the effective end time for reverse playback is kCMTimeZero. When the end time is reached, the receiver will post AVPlayerItemDidPlayToEndTimeNotification and the AVPlayer will take the action indicated by the value of its actionAtItemEnd property (see AVPlayerActionAtItemEnd in AVPlayer.h). The value of this property has no effect on playback when the rate is positive.
      • setSeekingWaitsForVideoCompositionRendering

        public void setSeekingWaitsForVideoCompositionRendering​(boolean value)
        [@property] seekingWaitsForVideoCompositionRendering Indicates whether the item's timing follows the displayed video frame when seeking with a video composition By default, item timing is updated as quickly as possible, not waiting for media at new times to be rendered when seeking or during normal playback. The latency that occurs, for example, between the completion of a seek operation and the display of a video frame at a new time is negligible in most situations. However, when video compositions are in use, the processing of video for any particular time may introduce noticeable latency. Therefore it may be desirable when a video composition is in use for the item's timing be updated only after the video frame for a time has been displayed. This allows, for instance, an AVSynchronizedLayer associated with an AVPlayerItem to remain in synchronization with the displayed video and for the currentTime property to return the time of the displayed video. This property has no effect on items for which videoComposition is nil.
      • setTextStyleRules

        public void setTextStyleRules​(NSArray<? extends AVTextStyleRule> value)
        [@property] textStyleRules An array of AVTextStyleRules representing text styling that can be applied to subtitles and other legible media. The styling information contained in each AVTextStyleRule object in the array is used only when no equivalent styling information is provided by the media resource being played. For example, if the text style rules specify Courier font but the media resource specifies Helvetica font, the text will be drawn using Helvetica font. This property has an effect only for tracks with media subtype kCMSubtitleFormatType_WebVTT.
      • setVideoComposition

        public void setVideoComposition​(AVVideoComposition value)
        [@property] videoComposition Indicates the video composition settings to be applied during playback.
      • status

        public long status()
        [@property] status The ability of the receiver to be used for playback. The value of this property is an AVPlayerItemStatus that indicates whether the receiver can be used for playback. When the value of this property is AVPlayerItemStatusFailed, the receiver can no longer be used for playback and a new instance needs to be created in its place. When this happens, clients can check the value of the error property to determine the nature of the failure. The value of this property will not be updated after the receiver is removed from an AVPlayer. This property is key value observable.
      • stepByCount

        public void stepByCount​(long stepCount)
        stepByCount: Moves player's current item's current time forward or backward by the specified number of steps. The size of each step depends on the enabled AVPlayerItemTracks of the AVPlayerItem.
        Parameters:
        stepCount - The number of steps by which to move. A positive number results in stepping forward, a negative number in stepping backward.
      • textStyleRules

        public NSArray<? extends AVTextStyleRule> textStyleRules()
        [@property] textStyleRules An array of AVTextStyleRules representing text styling that can be applied to subtitles and other legible media. The styling information contained in each AVTextStyleRule object in the array is used only when no equivalent styling information is provided by the media resource being played. For example, if the text style rules specify Courier font but the media resource specifies Helvetica font, the text will be drawn using Helvetica font. This property has an effect only for tracks with media subtype kCMSubtitleFormatType_WebVTT.
      • timebase

        public CMTimebaseRef timebase()
        [@property] timebase The item's timebase. You can examine the timebase to discover the relationship between the item's time and the master clock used for drift synchronization. This timebase is read-only; you cannot set its time or rate to affect playback. The value of this property may change during playback.
      • timedMetadata

        public NSArray<? extends AVMetadataItem> timedMetadata()
        [@property] timedMetadata Provides an NSArray of AVMetadataItems representing the timed metadata encountered most recently within the media as it plays. May be nil. Notifications of changes are available via key-value observation. As an optimization for playback, AVPlayerItem may omit the processing of timed metadata when no observer of this property is registered. Therefore, when no such observer is registered, the value of the timedMetadata property may remain nil regardless of the contents of the underlying media.
      • tracks

        public NSArray<? extends AVPlayerItemTrack> tracks()
        [@property] tracks Provides array of AVPlayerItem tracks. Observable (can change dynamically during playback). The value of this property will accord with the properties of the underlying media resource when the receiver becomes ready to play. Before the underlying media resource has been sufficiently loaded, its value is an empty NSArray. Use key-value observation to obtain a valid array of tracks as soon as it becomes available.
      • videoComposition

        public AVVideoComposition videoComposition()
        [@property] videoComposition Indicates the video composition settings to be applied during playback.
      • preferredMaximumResolution

        public CGSize preferredMaximumResolution()
        [@property] preferredMaximumResolution Indicates a preferred upper limit on the resolution of the video to be downloaded (or otherwise transferred) and rendered by the player. The default value is CGSizeZero, which indicates that the client enforces no limit on video resolution. Other values indicate a preferred maximum video resolution. It only applies to HTTP Live Streaming asset.
      • setPreferredMaximumResolution

        public void setPreferredMaximumResolution​(CGSize value)
        [@property] preferredMaximumResolution Indicates a preferred upper limit on the resolution of the video to be downloaded (or otherwise transferred) and rendered by the player. The default value is CGSizeZero, which indicates that the client enforces no limit on video resolution. Other values indicate a preferred maximum video resolution. It only applies to HTTP Live Streaming asset.
      • setVideoApertureMode

        public void setVideoApertureMode​(java.lang.String value)
        [@property] videoApertureMode Specifies the video aperture mode to apply during playback. See AVVideoApertureMode constants defined in AVVideoSettings.h. Default is AVVideoApertureModeCleanAperture.
      • videoApertureMode

        public java.lang.String videoApertureMode()
        [@property] videoApertureMode Specifies the video aperture mode to apply during playback. See AVVideoApertureMode constants defined in AVVideoSettings.h. Default is AVVideoApertureModeCleanAperture.
      • automaticallyPreservesTimeOffsetFromLive

        public boolean automaticallyPreservesTimeOffsetFromLive()
        [@property] automaticallyPreservesTimeOffsetFromLive Indicates that after the player spends a period of time buffering media, it will skip forward if necessary to restore the playhead's distance from the live edge of the presentation to what it was when buffering began. If the value of this property is YES and the player must buffer media from the network in order to resume playback, the player will seek forward if necessary before resuming playback to restore the position that the playhead had when rebuffering began, relative to the end of the current AVPlayerItem's seekableTimeRange. This behavior applies to media buffering that occurs as a consequence of starting playback, seeking, and recovering from a playback stall. Note that if the network cannot deliver media quickly enough to maintain the playback rate, playback may stall interminably. This property value has no effect if the asset is not a live stream. The default value of this property is NO.
      • configuredTimeOffsetFromLive

        public CMTime configuredTimeOffsetFromLive()
        [@property] configuredTimeOffsetFromLive Indicates how close to the latest content in a live stream playback will begin after a live start or a seek to kCMTimePositiveInfinity. For non-live assets this value is kCMTimeInvalid.
      • isAudioSpatializationAllowed

        public boolean isAudioSpatializationAllowed()
        [@property] audioSpatializationAllowed Indicates whether audio spatialization is allowed When audio spatialization is allowed for an AVPlayerItem, the AVPlayer may render multichannel audio if available even if the output device doesn't support multichannel audio on its own, via use of a synthetic channel layout. When audio spatialization is not allowed, the AVPlayer must render audio with a channel layout that best matches the capabilities of the output device. This property is not observable. Defaults to YES.
      • recommendedTimeOffsetFromLive

        public CMTime recommendedTimeOffsetFromLive()
        [@property] recommendedTimeOffsetFromLive A recommended value for configuredTimeOffsetFromLive, based on observed network conditions. For non-live assets this value is kCMTimeInvalid.
      • setAudioSpatializationAllowed

        public void setAudioSpatializationAllowed​(boolean value)
        [@property] audioSpatializationAllowed Indicates whether audio spatialization is allowed When audio spatialization is allowed for an AVPlayerItem, the AVPlayer may render multichannel audio if available even if the output device doesn't support multichannel audio on its own, via use of a synthetic channel layout. When audio spatialization is not allowed, the AVPlayer must render audio with a channel layout that best matches the capabilities of the output device. This property is not observable. Defaults to YES.
      • setAutomaticallyPreservesTimeOffsetFromLive

        public void setAutomaticallyPreservesTimeOffsetFromLive​(boolean value)
        [@property] automaticallyPreservesTimeOffsetFromLive Indicates that after the player spends a period of time buffering media, it will skip forward if necessary to restore the playhead's distance from the live edge of the presentation to what it was when buffering began. If the value of this property is YES and the player must buffer media from the network in order to resume playback, the player will seek forward if necessary before resuming playback to restore the position that the playhead had when rebuffering began, relative to the end of the current AVPlayerItem's seekableTimeRange. This behavior applies to media buffering that occurs as a consequence of starting playback, seeking, and recovering from a playback stall. Note that if the network cannot deliver media quickly enough to maintain the playback rate, playback may stall interminably. This property value has no effect if the asset is not a live stream. The default value of this property is NO.
      • setConfiguredTimeOffsetFromLive

        public void setConfiguredTimeOffsetFromLive​(CMTime value)
        [@property] configuredTimeOffsetFromLive Indicates how close to the latest content in a live stream playback will begin after a live start or a seek to kCMTimePositiveInfinity. For non-live assets this value is kCMTimeInvalid.
      • externalMetadata

        public NSArray<? extends AVMetadataItem> externalMetadata()
        [@property] externalMetadata Supplements metadata contained in the asset. AVPlayerViewController will publish this metadata as now playing info when AVPlayerViewController.updatesNowPlayingInfoCenter is YES.
      • setExternalMetadata

        public void setExternalMetadata​(NSArray<? extends AVMetadataItem> value)
        [@property] externalMetadata Supplements metadata contained in the asset. AVPlayerViewController will publish this metadata as now playing info when AVPlayerViewController.updatesNowPlayingInfoCenter is YES.
      • allowedAudioSpatializationFormats

        public long allowedAudioSpatializationFormats()
        [@property] allowedAudioSpatializationFormats Indicates the source audio channel layouts allowed by the receiver for spatialization. Spatialization uses psychoacoustic methods to create a more immersive audio rendering when the content is played on specialized headphones and speaker arrangements. When an AVPlayerItem's allowedAudioSpatializationFormats property is set to AVAudioSpatializationFormatMonoAndStereo the AVPlayer will attempt to spatialize content tagged with a stereo channel layout, two-channel content with no layout specified as well as mono. It is considered incorrect to render a binaural recording with spatialization. A binaural recording is captured using two carefully placed microphones at each ear where the intent, when played on headphones, is to reproduce a naturally occurring spatial effect. Content tagged with a binaural channel layout will ignore this property value. When an AVPlayerItem's allowedAudioSpatializationFormats property is set to AVAudioSpatializationFormatMultichannel the AVPlayer will attempt to spatialize any decodable multichannel layout. Setting this property to AVAudioSpatializationFormatMonoStereoAndMultichannel indicates that the sender allows the AVPlayer to spatialize any decodable mono, stereo or multichannel layout. This property is not observable. The default value for this property is AVAudioSpatializationFormatMultichannel.
      • setAllowedAudioSpatializationFormats

        public void setAllowedAudioSpatializationFormats​(long value)
        [@property] allowedAudioSpatializationFormats Indicates the source audio channel layouts allowed by the receiver for spatialization. Spatialization uses psychoacoustic methods to create a more immersive audio rendering when the content is played on specialized headphones and speaker arrangements. When an AVPlayerItem's allowedAudioSpatializationFormats property is set to AVAudioSpatializationFormatMonoAndStereo the AVPlayer will attempt to spatialize content tagged with a stereo channel layout, two-channel content with no layout specified as well as mono. It is considered incorrect to render a binaural recording with spatialization. A binaural recording is captured using two carefully placed microphones at each ear where the intent, when played on headphones, is to reproduce a naturally occurring spatial effect. Content tagged with a binaural channel layout will ignore this property value. When an AVPlayerItem's allowedAudioSpatializationFormats property is set to AVAudioSpatializationFormatMultichannel the AVPlayer will attempt to spatialize any decodable multichannel layout. Setting this property to AVAudioSpatializationFormatMonoStereoAndMultichannel indicates that the sender allows the AVPlayer to spatialize any decodable mono, stereo or multichannel layout. This property is not observable. The default value for this property is AVAudioSpatializationFormatMultichannel.
      • setStartsOnFirstEligibleVariant

        public void setStartsOnFirstEligibleVariant​(boolean value)
        [@property] startsOnFirstEligibleVariant Directs the player to start playback with the first eligible variant that appears in the stream's master playlist. This property influences AVPlayer's algorithm for selecting which of the eligible variant streams in an HTTP Live Streaming master playlist is selected when playback first begins. In all cases, AVPlayer may switch to other variants during playback. On releases prior to macOS 10.15, iOS 13, tvOS 13 and watchOS 6, AVPlayer starts HLS playback with the first eligible variant in the master playlist. On releases starting with macOS 10.15, iOS 13, tvOS 13 and watchOS 6, AVPlayer starts HLS playback by choosing an initial variant that optimizes the startup experience. On releases starting with macOS 11.0, iOS 14, tvOS 14 and watchOS 7, applications may set this property to YES to request that AVPlayer use the previous behaviour of using the first eligible variant in the master playlist. This would be appropriate, for example, for applications which wish to control initial variant selection by ordering the variants in the master playlist. Note that changing this property may impact stream startup performance and quality. In order to be effective this property must be set before initial variant selection occurs. This property only applies to HTTP Live Streaming assets. The default value of this property is NO.
      • startsOnFirstEligibleVariant

        public boolean startsOnFirstEligibleVariant()
        [@property] startsOnFirstEligibleVariant Directs the player to start playback with the first eligible variant that appears in the stream's master playlist. This property influences AVPlayer's algorithm for selecting which of the eligible variant streams in an HTTP Live Streaming master playlist is selected when playback first begins. In all cases, AVPlayer may switch to other variants during playback. On releases prior to macOS 10.15, iOS 13, tvOS 13 and watchOS 6, AVPlayer starts HLS playback with the first eligible variant in the master playlist. On releases starting with macOS 10.15, iOS 13, tvOS 13 and watchOS 6, AVPlayer starts HLS playback by choosing an initial variant that optimizes the startup experience. On releases starting with macOS 11.0, iOS 14, tvOS 14 and watchOS 7, applications may set this property to YES to request that AVPlayer use the previous behaviour of using the first eligible variant in the master playlist. This would be appropriate, for example, for applications which wish to control initial variant selection by ordering the variants in the master playlist. Note that changing this property may impact stream startup performance and quality. In order to be effective this property must be set before initial variant selection occurs. This property only applies to HTTP Live Streaming assets. The default value of this property is NO.
      • appliesPerFrameHDRDisplayMetadata

        public boolean appliesPerFrameHDRDisplayMetadata()
        default is YES
      • setAppliesPerFrameHDRDisplayMetadata

        public void setAppliesPerFrameHDRDisplayMetadata​(boolean value)
        default is YES