Important:
This class is deprecated. Use QTMovieView
instead.
Inherits from | |
Conforms to | |
Framework | /System/Library/Frameworks/AppKit.framework |
Availability | Available in Mac OS X v10.0 and later. Not available to 64-bit applications. |
Companion guide | |
Declared in | NSMovieView.h |
Related sample code |
Important: This class is deprecated. Use QTMovieView
instead.
An NSMovieView
displays an NSMovie
(a wrapper for a QuickTime movie) in a frame and provides methods for playing and editing the movie. The view can optionally display a standard QuickTime movie controller, or you can provide your own interface linked to NSMovieView
’s action methods.
– loopMode
– setLoopMode:
– playsSelectionOnly
– setPlaysSelectionOnly:
– playsEveryFrame
– setPlaysEveryFrame:
– rate
– setRate:
– isPlaying
– start:
– gotoBeginning:
– gotoEnd:
– gotoPosterFrame:
– stepBack:
– stepForward:
– stop:
– isEditable
– setEditable:
– copy:
– cut:
– delete:
– paste:
– selectAll:
– clear:
Deprecated in Mac OS X v10.3
This action method copies the current movie selection onto the clipboard.
- (void)copy:(id)sender
If there is no selection, the current frame is copied. The movie does not need to be editable.
NSMovieView.h
This action method deletes the current movie selection from the movie, placing it on the clipboard.
- (void)cut:(id)sender
If there is no selection, the current frame is deleted. This action is undoable. If the movie is not editable, this method does nothing.
NSMovieView.h
This action method deletes the current movie selection from the movie, placing it on the clipboard.
- (void)delete:(id)sender
If there is no selection, the current frame is deleted. This action is undoable. If the movie is not editable, this method does nothing.
NSMovieView.h
This action method repositions the play position to the beginning of the movie.
- (void)gotoBeginning:(id)sender
If the movie is playing, the movie continues playing from the new position.
NSMovieView.h
This action method repositions the play position to the end of the movie.
- (void)gotoEnd:(id)sender
If the movie is playing in one of the looping modes, the movie continues playing accordingly; otherwise, play stops.
NSMovieView.h
This action method repositions the play position to the movie’s poster frame.
- (void)gotoPosterFrame:(id)sender
If no poster frame is defined, the movie jumps to the beginning. If the movie is playing, the movie continues playing from the new position.
NSMovieView.h
Returns YES
if the movie controller is visible.
- (BOOL)isControllerVisible
The default is YES
.
NSMovieView.h
Returns YES
if the movie is editable.
- (BOOL)isEditable
When editable, a movie can be modified using the clear:
, cut:
, and paste:
methods and associated key commands. You can also drag movie files into the view, replacing the movie. The default is YES
.
NSMovieView.h
Returns YES
if the movie’s sound is currently muted.
- (BOOL)isMuted
NSMovieView.h
Returns YES
if the movie is currently playing.
- (BOOL)isPlaying
NSMovieView.h
Returns the playback behavior for when the end of the movie is reached.
- (NSQTMovieLoopMode)loopMode
Return value is one of the constants defined in “Constants.” Default is NSQTMovieNormalPlayback
.
NSMovieView.h
Returns the NSMovie object displayed in the view.
- (NSMovie *)movie
NSMovieView.h
Returns a pointer to a QuickTime MovieController
for the Movie
displayed in the view.
- (void *)movieController
Use this method with the QuickTime APIs to enable features not implemented in NSMovieView. A movie controller is available whenever a movie is displayed in a window, even if the controller is itself hidden. If no movie is displayed, movieController
returns NULL
.
NSMovieView.h
Returns the rectangle into which the movie is to be placed.
- (NSRect)movieRect
By default, this method returns the view’s bounding rectangle. Override this method if you want the movie to be positioned or sized differently within the view.
NSMovieView.h
This action method inserts the contents of the clipboard (if it contains a movie clip) into the movie at the current play position.
- (void)paste:(id)sender
This action is undoable. If the movie is not editable, this method does nothing.
NSMovieView.h
Returns YES
if the movie is configured to display every frame when playing.
- (BOOL)playsEveryFrame
Default is NO
.
NSMovieView.h
Returns YES
if the movie is configured to play only the selected portion.
- (BOOL)playsSelectionOnly
Default is NO
.
NSMovieView.h
Returns the relative frame rate at which the movie is to be played.
- (float)rate
The default value of 1.0 indicates the normal frame rate defined by the movie.
NSMovieView.h
Resizes the view’s frame to the size required to display the movie with a magnification of magnification and with a movie controller below it.
- (void)resizeWithMagnification:(float)magnification
NSMovieView.h
This action method selects the entire movie.
- (void)selectAll:(id)sender
NSMovieView.h
Sets whether the movie can be edited.
- (void)setEditable:(BOOL)flag
If flag is YES
, you can use the clear:
, cut:
, and paste:
methods and associated key commands to modify the movie. You can also drag a new movie file into the view, replacing the current movie. If flag is NO
, these features are disabled.
NSMovieView.h
Sets the playback behavior for when the end of the movie is reached.
- (void)setLoopMode:(NSQTMovieLoopMode)flag
flag is one of the constants defined in “Constants.” If flag is NSQTMovieNormalPlayback
, the movie stops playing when it reaches the end. If flag is NSQTMovieLoopingPlayback
, the movie will continue playing at the beginning. If flag is NSQTMovieLoopingBackAndForthPlayback
, the movie will play in reverse, then forward again, as it reaches each end of the movie. If playsSelectionOnly
is YES
, these behaviors apply to the endpoints of the selection, not the movie.
NSMovieView.h
Sets the NSMovie displayed in the view to movie.
- (void)setMovie:(NSMovie *)movie
NSMovieView.h
Sets whether the movie’s sound is muted.
- (void)setMuted:(BOOL)flag
When flag is YES
, muting is turned on. When muting is turned off again by sending NO
for flag, the previous sound volume is restored.
NSMovieView.h
Sets whether the movie plays every frame of the movie.
- (void)setPlaysEveryFrame:(BOOL)flag
If flag is YES
, every frame of the movie is displayed, even if this requires playing the movie slower than its preferred rate. If flag is NO
, the movie may skip some frames if needed to maintain its time sequence.
If flag is YES
, audio is not played.
NSMovieView.h
Sets whether only the selected portion of the movie is played to flag.
- (void)setPlaysSelectionOnly:(BOOL)flag
If there is no selection, the entire movie is played.
NSMovieView.h
Sets the frame rate, relative to the movie’s internal frame rate, at which to play the movie.
- (void)setRate:(float)rate
The default rate of 1.0 indicates the movie is played at its normal rate. Larger values indicate faster rates, and fractional values indicate slower rates. Negative values are allowed, causing the movie to play in reverse. Invoking this method does not automatically start the movie playing.
This value is ignored if the movie is started using the movie controller, which always plays the movie at the normal rate.
NSMovieView.h
Sets the relative sound volume of the movie.
- (void)setVolume:(float)volume
The default volume of 1.0 indicates the current system volume.
NSMovieView.h
Sets whether a standard QuickTime movie controller is displayed beneath the movie to show.
- (void)showController:(BOOL)show adjustingSize:(BOOL)adjustSize
If adjustSize is YES
, the view’s height is modified so that the size and position of the movie are unchanged. If adjustSize is NO
, the view’s size is unchanged, and the movie is resized to fit into the frame. The adjustment is made only if the visibility of the controller is indeed changed.
NSMovieView.h
Returns the required size of the movie view if the movie were magnified to magnification.
- (NSSize)sizeForMagnification:(float)magnification
An extra 16 pixels are added to the vertical dimension to allow room for the movie controller, even if it is currently hidden.
NSMovieView.h
This action method starts the movie playing at its current location.
- (void)start:(id)sender
This method does nothing if the movie is already playing.
NSMovieView.h
This action method repositions the movie’s play position to one frame before the current frame.
- (void)stepBack:(id)sender
If the movie is playing, the movie will stop at the new frame.
NSMovieView.h
This action method repositions the movie’s play position to one frame after the current frame.
- (void)stepForward:(id)sender
If the movie is playing, the movie will stop at the new frame.
NSMovieView.h
This action method stops the movie.
- (void)stop:(id)sender
NSMovieView.h
Returns the relative volume at which the movie is to be played. Default is 1.0.
- (float)volume
NSMovieView.h
These constants specify playback modes.
typedef enum { NSQTMovieNormalPlayback, NSQTMovieLoopingPlayback, NSQTMovieLoopingBackAndForthPlayback } NSQTMovieLoopMode;
NSQTMovieNormalPlayback
Playback stops when end is reached.
Available in Mac OS X v10.0 and later.
Not available to 64-bit applications.
Declared in NSMovieView.h
.
NSQTMovieLoopingPlayback
Restarts playback at beginning when end is reached.
Available in Mac OS X v10.0 and later.
Not available to 64-bit applications.
Declared in NSMovieView.h
.
NSQTMovieLoopingBackAndForthPlayback
Playback runs forward and backward between both endpoints.
Available in Mac OS X v10.0 and later.
Not available to 64-bit applications.
Declared in NSMovieView.h
.
NSMovieView.h
© 2007 Apple Inc. All Rights Reserved. (Last updated: 2007-04-02)