mirror of
https://github.com/nextcloud/talk-android
synced 2025-01-18 21:18:15 +00:00
Move attributes to local variables
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
This commit is contained in:
parent
0ec5175c61
commit
8644d05636
@ -62,9 +62,6 @@ public class PeerConnectionWrapper {
|
|||||||
private final List<DataChannelMessage> pendingDataChannelMessages = new ArrayList<>();
|
private final List<DataChannelMessage> pendingDataChannelMessages = new ArrayList<>();
|
||||||
private final SdpObserver sdpObserver;
|
private final SdpObserver sdpObserver;
|
||||||
|
|
||||||
private final boolean hasInitiated;
|
|
||||||
|
|
||||||
private final MediaStream localStream;
|
|
||||||
private final boolean isMCUPublisher;
|
private final boolean isMCUPublisher;
|
||||||
private final String videoStreamType;
|
private final String videoStreamType;
|
||||||
|
|
||||||
@ -113,14 +110,13 @@ public class PeerConnectionWrapper {
|
|||||||
boolean isMCUPublisher, boolean hasMCU, String videoStreamType,
|
boolean isMCUPublisher, boolean hasMCU, String videoStreamType,
|
||||||
SignalingMessageReceiver signalingMessageReceiver,
|
SignalingMessageReceiver signalingMessageReceiver,
|
||||||
SignalingMessageSender signalingMessageSender) {
|
SignalingMessageSender signalingMessageSender) {
|
||||||
this.localStream = localStream;
|
|
||||||
this.videoStreamType = videoStreamType;
|
this.videoStreamType = videoStreamType;
|
||||||
|
|
||||||
this.sessionId = sessionId;
|
this.sessionId = sessionId;
|
||||||
this.mediaConstraints = mediaConstraints;
|
this.mediaConstraints = mediaConstraints;
|
||||||
|
|
||||||
sdpObserver = new SdpObserver();
|
sdpObserver = new SdpObserver();
|
||||||
hasInitiated = sessionId.compareTo(localSession) < 0;
|
boolean hasInitiated = sessionId.compareTo(localSession) < 0;
|
||||||
this.isMCUPublisher = isMCUPublisher;
|
this.isMCUPublisher = isMCUPublisher;
|
||||||
|
|
||||||
PeerConnection.RTCConfiguration configuration = new PeerConnection.RTCConfiguration(iceServerList);
|
PeerConnection.RTCConfiguration configuration = new PeerConnection.RTCConfiguration(iceServerList);
|
||||||
@ -133,12 +129,12 @@ public class PeerConnectionWrapper {
|
|||||||
this.signalingMessageSender = signalingMessageSender;
|
this.signalingMessageSender = signalingMessageSender;
|
||||||
|
|
||||||
if (peerConnection != null) {
|
if (peerConnection != null) {
|
||||||
if (this.localStream != null) {
|
if (localStream != null) {
|
||||||
List<String> localStreamIds = Collections.singletonList(this.localStream.getId());
|
List<String> localStreamIds = Collections.singletonList(localStream.getId());
|
||||||
for(AudioTrack track : this.localStream.audioTracks) {
|
for(AudioTrack track : localStream.audioTracks) {
|
||||||
peerConnection.addTrack(track, localStreamIds);
|
peerConnection.addTrack(track, localStreamIds);
|
||||||
}
|
}
|
||||||
for(VideoTrack track : this.localStream.videoTracks) {
|
for(VideoTrack track : localStream.videoTracks) {
|
||||||
peerConnection.addTrack(track, localStreamIds);
|
peerConnection.addTrack(track, localStreamIds);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user