Skip to content

Commit

Permalink
Don't call startVideo if you've already called switchSource (#79)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gemakk authored Jul 14, 2021
1 parent 2447555 commit 81fee0f
Showing 1 changed file with 1 addition and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -237,13 +237,7 @@ public CompletableFuture switchCameraAsync() {
desiredCamera = getFrontCamera();
}
localVideoStream.switchSource(desiredCamera).thenRun(() -> {
if (call != null) {
call.startVideo(appContext, localVideoStream).thenRun(() -> {
localVideoStreamCompletableFuture.complete(localVideoStream);
});
} else {
localVideoStreamCompletableFuture.complete(localVideoStream);
}
localVideoStreamCompletableFuture.complete(localVideoStream);
});
});
}
Expand Down

0 comments on commit 81fee0f

Please sign in to comment.