CCVideoPlayer Class Reference
| Inherits from | NSObject |
| Declared in | CCVideoPlayer.h |
Tasks
-
+ setDelegate:Sets new delegate (weak ref) for playback start/stop callbacs.
-
+ setNoSkip:If YES – user can’t skip video by mouse/key/touch event. Default is NO.
-
+ playMovieWithFile:Start playing movie with given filename
-
+ cancelPlayingStop playing video if it’s playing.
-
+ userCancelPlayingStop playing video if it’s playing and noSkip is NO.
-
+ isPlayingReturns YES if video is currently playing. Otherwise returns NO.
-
+ updateOrientationWithOrientation:Updates video player view transform for newOrientation.
-
+ reAttachViewReattaches movie view to the Cocos Window. (Mac only)
Class Methods
isPlaying
Returns YES if video is currently playing. Otherwise returns NO.
+ (BOOL)isPlayingDeclared In
CCVideoPlayer.hplayMovieWithFile:
Start playing movie with given filename
+ (void)playMovieWithFile:(NSString *)fileDeclared In
CCVideoPlayer.hreAttachView
Reattaches movie view to the Cocos Window. (Mac only)
+ (void)reAttachViewDiscussion
Call it after changing to/from fullscreen.
Declared In
CCVideoPlayer.hsetDelegate:
Sets new delegate (weak ref) for playback start/stop callbacs.
+ (void)setDelegate:(id<CCVideoPlayerDelegate>)aDelegateDiscussion
ATTENTION: You need to call this method before invoking playMovieWithFile: or you will not receive movieStartsPlaying callback.
Declared In
CCVideoPlayer.hsetNoSkip:
If YES – user can’t skip video by mouse/key/touch event. Default is NO.
+ (void)setNoSkip:(BOOL)valueDeclared In
CCVideoPlayer.h