#pragma once #import @class AVPlayer; @interface VideoPlayerView : UIView { } @property(nonatomic, retain) AVPlayer* player; @end @protocol VideoPlayerDelegate - (void)onPlayerReady; - (void)onPlayerDidFinishPlayingVideo; - (void)onPlayerError:(NSError*)error; @end @interface VideoPlayer : NSObject { id delegate; } @property (nonatomic, retain) id delegate; @property (nonatomic, readonly) AVPlayer* player; + (BOOL)CanPlayToTexture:(NSURL*)url; + (BOOL)CheckScalingModeAspectFill:(CGSize)videoSize screenSize:(CGSize)screenSize; - (BOOL)loadVideo:(NSURL*)url; - (BOOL)readyToPlay; - (void)unloadPlayer; - (BOOL)playToView:(VideoPlayerView*)view; - (BOOL)playToTexture; - (BOOL)playVideoPlayer; - (BOOL)isPlaying; - (intptr_t)curFrameTexture; - (void)pause; - (void)resume; - (void)rewind; - (void)seekToTimestamp:(CMTime)time; - (void)seekTo:(float)timeSeconds; - (BOOL)setAudioVolume:(float)volume; - (CMTime)duration; - (float)durationSeconds; - (CGSize)videoSize; @end