Skip to content

Commit

Permalink
[BUGFIX] Unpublishing/republishing a video track
Browse files Browse the repository at this point in the history
  • Loading branch information
chivy-we committed Jan 5, 2023
1 parent 53b9df8 commit fd85d20
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -717,7 +717,8 @@ public void toggleVideo(boolean enabled) {

if (localVideoTrack != null) {
localVideoTrack.enable(enabled);
publishLocalVideo(enabled);
// TODO: rollback after core fix, https://github.com/twilio/video-quickstart-android/issues/653
// publishLocalVideo(enabled);

WritableMap event = new WritableNativeMap();
event.putBoolean("videoEnabled", enabled);
Expand Down
7 changes: 4 additions & 3 deletions ios/RCTTWVideoModule.m
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,8 @@ - (bool)_setLocalVideoEnabled:(bool)enabled cameraType:(NSString *)cameraType {
if (enabled) {
[self startCameraCapture:cameraType];
} else {
[self clearCameraInstance];
// TODO: rollback after core fix, https://github.com/twilio/twilio-video-ios/issues/34
// [self clearCameraInstance];
}
return enabled;
}
Expand Down Expand Up @@ -302,7 +303,7 @@ - (bool)_setLocalVideoEnabled:(bool)enabled cameraType:(NSString *)cameraType {
TVILocalParticipant *localParticipant = self.room.localParticipant;
[localParticipant publishVideoTrack:self.localVideoTrack];
}
[self.screen startCapture];
[self.screen startCapture];
} else {
[self unpublishLocalVideo];
[self.screen stopCapture];
Expand Down Expand Up @@ -441,7 +442,7 @@ -(NSMutableDictionary*)convertLocalVideoTrackStats:(TVILocalVideoTrackStats *)st
if (self.localDataTrack) {
builder.dataTracks = @[self.localDataTrack];
}

builder.dominantSpeakerEnabled = dominantSpeakerEnabled ? YES : NO;

builder.roomName = roomName;
Expand Down

0 comments on commit fd85d20

Please sign in to comment.