Class MPMusicPlayerController

    • Constructor Detail

      • MPMusicPlayerController

        protected MPMusicPlayerController​(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)
      • applicationMusicPlayer

        public static MPMusicPlayerController applicationMusicPlayer()
        Playing items with applicationMusicPlayer does not affect Music's playback state.
      • 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()
      • 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()
      • systemMusicPlayer

        public static MPMusicPlayerController systemMusicPlayer()
        Playing media items with the systemMusicPlayer will replace the user's current Music state.
      • version_static

        public static long version_static()
      • beginGeneratingPlaybackNotifications

        public void beginGeneratingPlaybackNotifications()
        These methods determine whether playback notifications will be generated. Calls to begin/endGeneratingPlaybackNotifications are nestable.
      • currentPlaybackRate

        public float currentPlaybackRate()
        Description copied from interface: MPMediaPlayback
        The current playback rate of the now playing item. Default is 1.0 (normal speed). Pausing will set the rate to 0.0. Setting the rate to non-zero implies playing.
        Specified by:
        currentPlaybackRate in interface MPMediaPlayback
      • endGeneratingPlaybackNotifications

        public void endGeneratingPlaybackNotifications()
      • indexOfNowPlayingItem

        public long indexOfNowPlayingItem()
        Returns the index of the now playing item in the current playback queue. May return NSNotFound if the index is not valid (e.g. an empty queue or an infinite playlist).
      • nowPlayingItem

        public MPMediaItem nowPlayingItem()
        Returns the currently playing media item, or nil if none is playing. Setting the nowPlayingItem to an item in the current queue will begin playback at that item.
      • play

        public void play()
        Description copied from interface: MPMediaPlayback
        Plays items from the current queue, resuming paused playback if possible.
        Specified by:
        play in interface MPMediaPlayback
      • playbackState

        public long playbackState()
        Returns the current playback state of the music player
      • prepareToPlay

        public void prepareToPlay()
        Description copied from interface: MPMediaPlayback
        Prepares the current queue for playback, interrupting any active (non-mixible) audio sessions. Automatically invoked when -play is called if the player is not already prepared.
        Specified by:
        prepareToPlay in interface MPMediaPlayback
      • prepareToPlayWithCompletionHandler

        public void prepareToPlayWithCompletionHandler​(MPMusicPlayerController.Block_prepareToPlayWithCompletionHandler completionHandler)
        The completion handler will be called when the first item from the queue is buffered and ready to play. If a first item has been specified using MPMusicPlayerQueueDescriptor, the error will be non-nil if the specified item cannot be prepared for playback. If a first item is not specified, the error will be non-nil if an item cannot be prepared for playback. Errors will be in MPErrorDomain.
      • repeatMode

        public long repeatMode()
        Determines how music repeats after playback completes. Defaults to MPMusicRepeatModeDefault.
      • setCurrentPlaybackRate

        public void setCurrentPlaybackRate​(float value)
        Description copied from interface: MPMediaPlayback
        The current playback rate of the now playing item. Default is 1.0 (normal speed). Pausing will set the rate to 0.0. Setting the rate to non-zero implies playing.
        Specified by:
        setCurrentPlaybackRate in interface MPMediaPlayback
      • setCurrentPlaybackTime

        public void setCurrentPlaybackTime​(double value)
        Description copied from interface: MPMediaPlayback
        The current playback time of the now playing item in seconds.
        Specified by:
        setCurrentPlaybackTime in interface MPMediaPlayback
      • setNowPlayingItem

        public void setNowPlayingItem​(MPMediaItem value)
        Returns the currently playing media item, or nil if none is playing. Setting the nowPlayingItem to an item in the current queue will begin playback at that item.
      • setQueueWithItemCollection

        public void setQueueWithItemCollection​(MPMediaItemCollection itemCollection)
      • setQueueWithQuery

        public void setQueueWithQuery​(MPMediaQuery query)
        Call -play to begin playback after setting an item queue source. Setting a query will implicitly use MPMediaGroupingTitle.
      • setQueueWithStoreIDs

        public void setQueueWithStoreIDs​(NSArray<java.lang.String> storeIDs)
      • setRepeatMode

        public void setRepeatMode​(long value)
        Determines how music repeats after playback completes. Defaults to MPMusicRepeatModeDefault.
      • setShuffleMode

        public void setShuffleMode​(long value)
        Determines how music is shuffled when playing. Defaults to MPMusicShuffleModeDefault.
      • setVolume

        @Deprecated
        public void setVolume​(float value)
        Deprecated.
        The current volume of playing music, in the range of 0.0 to 1.0. This property is deprecated -- use MPVolumeView for volume control instead.
      • shuffleMode

        public long shuffleMode()
        Determines how music is shuffled when playing. Defaults to MPMusicShuffleModeDefault.
      • skipToBeginning

        public void skipToBeginning()
        Restarts playback at the beginning of the currently playing media item.
      • skipToNextItem

        public void skipToNextItem()
        Skips to the next item in the queue. If already at the last item, this resets the queue to the first item in a paused playback state.
      • skipToPreviousItem

        public void skipToPreviousItem()
        Skips to the previous item in the queue. If already at the first item, this will end playback.
      • stop

        public void stop()
        Description copied from interface: MPMediaPlayback
        Ends playback. Calling -play again will start from the beginnning of the queue.
        Specified by:
        stop in interface MPMediaPlayback
      • volume

        @Deprecated
        public float volume()
        Deprecated.
        The current volume of playing music, in the range of 0.0 to 1.0. This property is deprecated -- use MPVolumeView for volume control instead.
      • appendQueueDescriptor

        public void appendQueueDescriptor​(MPMusicPlayerQueueDescriptor descriptor)
        Adds the contents of the queue descriptor to the end of the queue
      • applicationQueuePlayer

        public static MPMusicPlayerApplicationController applicationQueuePlayer()
        Similar to applicationMusicPlayer, but allows direct manipulation of the queue.
      • prependQueueDescriptor

        public void prependQueueDescriptor​(MPMusicPlayerQueueDescriptor descriptor)
        Inserts the contents of the queue descriptor after the now playing item