修改为静音播放视频,不再播放声音

This commit is contained in:
wbzhan
2019-07-23 13:50:58 +08:00
parent 0b7755866e
commit e5c41967ab
5 changed files with 8 additions and 38 deletions
@@ -102,16 +102,10 @@
#pragma mark- 暂停 挂断
-(void)stopP2PPlayingGLViewVideo{
if(!self.isReject){
self.isReject = !self.isReject;
while (self.isPlaying) {
usleep(50*1000);
}
if ([self.player isPlaying]) {
[self.player p2pStop];
}
}
#pragma mark -已有人观看事件
@@ -465,6 +465,7 @@
//添加播放器VC
self.player = [[GWP2PVideoPlayer alloc] init];
self.player.delegate = self;
self.player.mute = YES;
self.player.viewController.view.backgroundColor = [UIColor clearColor];
[self.canvasView addSubview:self.player.viewController.view];
[self addChildViewController:self.player.viewController];