使用注意
● 存放VLC的文件夹名不要有空格
● 一旦执行过编译脚本sh,就别再修改存放VLC的文件夹名
编译
编译
集成
self.vlcPlayer = [[VLCMediaPlayer alloc] init];
self.vlcPlayer.drawable = self.view;
self.vlcPlayer.media = [VLCMedia mediaWithURL:[NSURL
URLWithString:@"http://streams.videolan.org/streams/mp4/Mr_Mr
sSmith-h264_aac.mp4"]];
[self.vlcPlayer play];
- (BOOL)play;
- (void)pause;
- (void)stop;
- (BOOL)isPlaying;
@property float rate; // 播放速率
● 播放进度
- (void)setTime:(VLCTime *)value; // 当前的播放时间
- (VLCTime *)time;
@property (readonly) VLCTime *remainingTime; // 剩余的播放时间
- (void)setPosition:(float)newPosition; // 播放进度(0.0 ~ 1.0)
- (float)position;
- (void)setMedia:(VLCMedia *)value;
● 播放的载体(显示到哪里, 一般是一个UIView)
@property (retain) id drawable;
● - (VLCMediaPlayerState)state;
VLCMediaPlayerStateStopped,// 播放器已经停止
VLCMediaPlayerStateOpening, // 流正在打开
VLCMediaPlayerStateBuffering,// 流正在缓冲
VLCMediaPlayerStateEnded,// 流已经结束
VLCMediaPlayerStateError,// 播放器产生了错误
VLCMediaPlayerStatePlaying,// 流正在播放
VLCMediaPlayerStatePaused// 流被暂停了
};
- (void)mediaPlayerStateChanged:(NSNotification
*)aNotification;
● 当播放器的时间改变就调用
- (void)mediaPlayerTimeChanged:(NSNotification
*)aNotification;