Class MPMoviePlayerController

  • All Implemented Interfaces:
    MPMediaPlayback, NSObject

    public class MPMoviePlayerController
    extends NSObject
    implements MPMediaPlayback
    ----------------------------------------------------------------------------- Movie Player See MPMediaPlayback.h for the playback methods.
    • Constructor Detail

      • MPMoviePlayerController

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

        @Deprecated
        public MPMovieAccessLog accessLog()
        Deprecated.
        Returns an object that represents a snapshot of the network access log. Can be nil.
      • allowsAirPlay

        public boolean allowsAirPlay()
        Indicates whether the movie player allows AirPlay video playback. Defaults to YES on iOS 5.0 and later.
      • backgroundView

        public UIView backgroundView()
        A view for customization which is always displayed behind movie content.
      • cancelAllThumbnailImageRequests

        public void cancelAllThumbnailImageRequests()
        Cancels all pending asynchronous thumbnail requests.
      • contentURL

        public NSURL contentURL()
      • controlStyle

        public long controlStyle()
        The style of the playback controls. Defaults to MPMovieControlStyleDefault.
      • 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
      • duration

        public double duration()
        The duration of the movie, or 0.0 if not known.
      • endPlaybackTime

        public double endPlaybackTime()
        The end time of movie playback. Defaults to NaN, which indicates natural end time of the movie.
      • errorLog

        @Deprecated
        public MPMovieErrorLog errorLog()
        Deprecated.
        Returns an object that represents a snapshot of the error log. Can be nil.
      • initialPlaybackTime

        public double initialPlaybackTime()
        The start time of movie playback. Defaults to NaN, indicating the natural start time of the movie.
      • isAirPlayVideoActive

        public boolean isAirPlayVideoActive()
        Indicates whether the movie player is currently playing video via AirPlay.
      • isFullscreen

        public boolean isFullscreen()
        Determines if the movie is presented in the entire screen (obscuring all other application content). Default is NO. Setting this property to YES before the movie player's view is visible will have no effect.
      • setFullscreen

        public void setFullscreen​(boolean value)
        Determines if the movie is presented in the entire screen (obscuring all other application content). Default is NO. Setting this property to YES before the movie player's view is visible will have no effect.
      • loadState

        public long loadState()
        Returns the network load state of the movie player.
      • movieMediaTypes

        public long movieMediaTypes()
        The types of media in the movie, or MPMovieMediaTypeNone if not known.
      • movieSourceType

        public long movieSourceType()
        The playback type of the movie. Defaults to MPMovieSourceTypeUnknown. Specifying a playback type before playing the movie can result in faster load times.
      • naturalSize

        public CGSize naturalSize()
        The natural size of the movie, or CGSizeZero if not known/applicable.
      • 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
      • playableDuration

        public double playableDuration()
        The currently playable duration of the movie, for progressively downloaded network content.
      • playbackState

        public long playbackState()
        Returns the current playback state of the movie 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
      • readyForDisplay

        public boolean readyForDisplay()
        Returns YES if the first video frame has been made ready for display for the current item. Will remain NO for items that do not have video tracks associated.
      • repeatMode

        public long repeatMode()
        Determines how the movie player repeats when reaching the end of playback. Defaults to MPMovieRepeatModeNone.
      • requestThumbnailImagesAtTimesTimeOption

        public void requestThumbnailImagesAtTimesTimeOption​(NSArray<?> playbackTimes,
                                                            long option)
        Asynchronously request thumbnails for one or more times, provided as an array of NSNumbers (double). Posts MPMoviePlayerThumbnailImageRequestDidFinishNotification on completion.
      • scalingMode

        public long scalingMode()
        Determines how the content scales to fit the view. Defaults to MPMovieScalingModeAspectFit.
      • setAllowsAirPlay

        public void setAllowsAirPlay​(boolean value)
        Indicates whether the movie player allows AirPlay video playback. Defaults to YES on iOS 5.0 and later.
      • setContentURL

        public void setContentURL​(NSURL value)
      • setControlStyle

        public void setControlStyle​(long value)
        The style of the playback controls. Defaults to MPMovieControlStyleDefault.
      • 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
      • setEndPlaybackTime

        public void setEndPlaybackTime​(double value)
        The end time of movie playback. Defaults to NaN, which indicates natural end time of the movie.
      • setFullscreenAnimated

        public void setFullscreenAnimated​(boolean fullscreen,
                                          boolean animated)
      • setInitialPlaybackTime

        public void setInitialPlaybackTime​(double value)
        The start time of movie playback. Defaults to NaN, indicating the natural start time of the movie.
      • setMovieSourceType

        public void setMovieSourceType​(long value)
        The playback type of the movie. Defaults to MPMovieSourceTypeUnknown. Specifying a playback type before playing the movie can result in faster load times.
      • setRepeatMode

        public void setRepeatMode​(long value)
        Determines how the movie player repeats when reaching the end of playback. Defaults to MPMovieRepeatModeNone.
      • setScalingMode

        public void setScalingMode​(long value)
        Determines how the content scales to fit the view. Defaults to MPMovieScalingModeAspectFit.
      • setShouldAutoplay

        public void setShouldAutoplay​(boolean value)
        Indicates if a movie should automatically start playback when it is likely to finish uninterrupted based on e.g. network conditions. Defaults to YES.
      • setUseApplicationAudioSession

        @Deprecated
        public void setUseApplicationAudioSession​(boolean value)
        Deprecated.
        Indicates if the movie player should inherit the application's audio session instead of creating a new session (which would interrupt the application's session). Defaults to YES. Setting this property during playback will not take effect until playback is stopped and started again.
      • shouldAutoplay

        public boolean shouldAutoplay()
        Indicates if a movie should automatically start playback when it is likely to finish uninterrupted based on e.g. network conditions. Defaults to YES.
      • 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
      • thumbnailImageAtTimeTimeOption

        public UIImage thumbnailImageAtTimeTimeOption​(double playbackTime,
                                                      long option)
        Returns a thumbnail at the given time. Deprecated. Use -requestThumbnailImagesAtTimes:timeOption: / MPMoviePlayerThumbnailImageRequestDidFinishNotification instead.
      • timedMetadata

        @Deprecated
        public NSArray<?> timedMetadata()
        Deprecated.
        Returns an array of the most recent MPTimedMetadata objects provided by the media stream.
      • useApplicationAudioSession

        @Deprecated
        public boolean useApplicationAudioSession()
        Deprecated.
        Indicates if the movie player should inherit the application's audio session instead of creating a new session (which would interrupt the application's session). Defaults to YES. Setting this property during playback will not take effect until playback is stopped and started again.
      • view

        public UIView view()
        The view in which the media and playback controls are displayed.