mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-21 12:39:58 +01:00
Post MediaStreamEvent when the stream is actually added
The MediaStreamEvent was posted when the connection with the remote peer was established. However, the MediaStream is added earlier (as soon as the remote description is received), so the event is moved to better reflect that. Note that checking if the connection is an MCU publisher is no longer needed, as publisher connections are sender only and therefore no remote stream is added for publisher connections. In any case, note that the stream will not start until the connection is established, and a progress bar will be anyway shown on the ParticipantDisplayItem until it is connected. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
This commit is contained in:
parent
29117e8b1b
commit
30aafed0e8
@ -100,7 +100,6 @@ public class PeerConnectionWrapper {
|
||||
private final MediaConstraints mediaConstraints;
|
||||
private DataChannel dataChannel;
|
||||
private final MagicSdpObserver magicSdpObserver;
|
||||
private MediaStream remoteStream;
|
||||
|
||||
private final boolean hasInitiated;
|
||||
|
||||
@ -416,10 +415,6 @@ public class PeerConnectionWrapper {
|
||||
EventBus.getDefault().post(new PeerConnectionEvent(PeerConnectionEvent.PeerConnectionEventType.PEER_CONNECTED,
|
||||
sessionId, null, null, videoStreamType));
|
||||
|
||||
if (!isMCUPublisher) {
|
||||
EventBus.getDefault().post(new MediaStreamEvent(remoteStream, sessionId, videoStreamType));
|
||||
}
|
||||
|
||||
if (hasInitiated) {
|
||||
sendInitialMediaStatus();
|
||||
}
|
||||
@ -477,7 +472,7 @@ public class PeerConnectionWrapper {
|
||||
|
||||
@Override
|
||||
public void onAddStream(MediaStream mediaStream) {
|
||||
remoteStream = mediaStream;
|
||||
EventBus.getDefault().post(new MediaStreamEvent(mediaStream, sessionId, videoStreamType));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user