Inherits from NSObject
Declared in CCVideoPlayer.h

Overview

@class CCVideoPlayer – Simple Video Player for Cocos2D apps.

Tasks

Class Methods

cancelPlaying

Stop playing video if it’s playing.

+ (void)cancelPlaying

Declared In

CCVideoPlayer.h

isPlaying

Returns YES if video is currently playing. Otherwise returns NO.

+ (BOOL)isPlaying

Declared In

CCVideoPlayer.h

playMovieWithFile:

Start playing movie with given filename

+ (void)playMovieWithFile:(NSString *)file

Declared In

CCVideoPlayer.h

reAttachView

Reattaches movie view to the Cocos Window. (Mac only)

+ (void)reAttachView

Discussion

Call it after changing to/from fullscreen.

Declared In

CCVideoPlayer.h

setDelegate:

Sets new delegate (weak ref) for playback start/stop callbacs.

+ (void)setDelegate:(id<CCVideoPlayerDelegate>)aDelegate

Discussion

ATTENTION: You need to call this method before invoking playMovieWithFile: or you will not receive movieStartsPlaying callback.

Declared In

CCVideoPlayer.h

setNoSkip:

If YES – user can’t skip video by mouse/key/touch event. Default is NO.

+ (void)setNoSkip:(BOOL)value

Declared In

CCVideoPlayer.h

updateOrientationWithOrientation:

Updates video player view transform for newOrientation.

+ (void)updateOrientationWithOrientation:(UIDeviceOrientation)newOrientation

Discussion

Supports only landscape left or landscape right, for other orientations does nothing.

Declared In

CCVideoPlayer.h

userCancelPlaying

Stop playing video if it’s playing and noSkip is NO.

+ (void)userCancelPlaying

Declared In

CCVideoPlayer.h