Fix audio and video enabled flags.

Signed-off-by: Ivan Sein <ivan@nextcloud.com>
This commit is contained in:
Ivan Sein 2019-03-14 12:06:46 +01:00
Родитель bcf8c6e53d
Коммит 3cb00690c4
1 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -160,13 +160,13 @@ static NSString * const kNCVideoTrackKind = @"video";
- (BOOL)isVideoEnabled
{
RTCVideoTrack *videoTrack = [_localStream.videoTracks firstObject];
return videoTrack ? videoTrack.isEnabled : YES;
return videoTrack ? videoTrack.isEnabled : NO;
}
- (BOOL)isAudioEnabled
{
RTCAudioTrack *audioTrack = [_localStream.audioTracks firstObject];
return audioTrack ? audioTrack.isEnabled : YES;
return audioTrack ? audioTrack.isEnabled : NO;
}
- (void)enableVideo:(BOOL)enable
@ -600,7 +600,7 @@ static NSString * const kNCVideoTrackKind = @"video";
}
// Send current video state
if (self.isVideoEnabled && !_isAudioOnly) {
if (self.isVideoEnabled) {
NSLog(@"Send videoOn");
[peerConnection sendDataChannelMessageOfType:@"videoOn" withPayload:nil];
} else {