Interface AVPlayerPlaybackCoordinatorDelegate


  • public interface AVPlayerPlaybackCoordinatorDelegate
    [@protocol] AVPlayerPlaybackCoordinatorDelegate Delegate protocol for AVPlayerPlaybackCoordinator. API-Since: 15.0
    • Method Detail

      • playbackCoordinatorIdentifierForPlayerItem

        @NotNull
        default @NotNull java.lang.String playbackCoordinatorIdentifierForPlayerItem​(@NotNull
                                                                                     @NotNull AVPlayerPlaybackCoordinator coordinator,
                                                                                     @NotNull
                                                                                     @NotNull AVPlayerItem playerItem)
        playbackCoordinator:identifierForPlayerItem: Called by the coordinator to identify AVPlayerItems played by the coordinator's AVPlayer. Implementing this method allows the coordinator to establish identity of two items created from different URLs, e.g., because one participant is using a local cache and the other a remote URL. If the method is not implemented, the coordinator will derive the identifier from the item's asset.
      • playbackCoordinatorInterstitialTimeRangesForPlayerItem

        @NotNull
        default @NotNull NSArray<? extends NSValue> playbackCoordinatorInterstitialTimeRangesForPlayerItem​(@NotNull
                                                                                                           @NotNull AVPlayerPlaybackCoordinator coordinator,
                                                                                                           @NotNull
                                                                                                           @NotNull AVPlayerItem playerItem)
        playbackCoordinator:interstitialTimeRangesForPlayerItem: Called by the coordinator to obtain time ranges in the AVPlayerItem that do not correspond to the primary content. Implement this method to provide the coordinator a list of sample accurate time ranges that represent interstitials in the player item. The coordinator would use this along with the waiting policy for the playingInterstitial suspension to coordinate playback across the group. If the playingInterstitial suspension is part of AVPlaybackCoordinator.suspensionReasonsThatTriggerWaiting, then the coordinator would wait for other participants to complete the interstitial before proceeding with playback. And if the playingInterstitial suspension is not a part of AVPlaybackCoordinator.suspensionReasonsThatTriggerWaiting then the coordinator will not wait for the participant playing the interstitial. Instead, that participant would jump to catch up with the rest of the group when they finish playing the interstitial. This delegate method is expected to return an array of NSValues with each value containing a CMTimeRange that represents the interstitial. If the method is not implemented, the coordinator would assume that the entire item corresponds to the primary content. API-Since: 15.4