关键代码
self.video = [LjjPlayerVideo videoPlayView];
self.video.view.frame= self.video.frame;
self.video.videoUrl = @"http://120.25.226.186:32812/resources/videos/minion_02.mp4";
self.video.contrainerViewController = self;
self.video.barrageData = [NSMutableArray arrayWithObjects:@"我是弹幕1我是弹幕1",@"我是弹幕2",@"我是弹幕33",@"888",@"666",nil];
[self.view addSubview:self.video.view];
self.video.backBlockCrossScreen = ^(id type) {
NSLog(@"竖屏切横屏");
};
self.video.backBlockVerticalScreen = ^(id type) {
NSLog(@"横屏切竖屏");
};
self.video.barrage = ^(NSString *text) {
NSLog(@"发送的弹幕内容为:%@",text);
};
后期会持续更新