mirror of
https://github.com/nextcloud/talk-android
synced 2025-03-12 02:19:44 +00:00
Fix case of no media stream from remote
Signed-off-by: Mario Danic <mario@lovelyhq.com>
This commit is contained in:
parent
f412ee4ca6
commit
e3581f03f5
@ -59,6 +59,7 @@ public class MagicPeerConnectionWrapper {
|
|||||||
private MediaConstraints mediaConstraints;
|
private MediaConstraints mediaConstraints;
|
||||||
private DataChannel magicDataChannel;
|
private DataChannel magicDataChannel;
|
||||||
private MagicSdpObserver magicSdpObserver;
|
private MagicSdpObserver magicSdpObserver;
|
||||||
|
private MediaStream remoteMediaStream;
|
||||||
|
|
||||||
private boolean remoteVideoOn;
|
private boolean remoteVideoOn;
|
||||||
private boolean remoteAudioOn;
|
private boolean remoteAudioOn;
|
||||||
@ -250,8 +251,10 @@ public class MagicPeerConnectionWrapper {
|
|||||||
@Override
|
@Override
|
||||||
public void onIceConnectionChange(PeerConnection.IceConnectionState iceConnectionState) {
|
public void onIceConnectionChange(PeerConnection.IceConnectionState iceConnectionState) {
|
||||||
if (iceConnectionState.equals(PeerConnection.IceConnectionState.CONNECTED)) {
|
if (iceConnectionState.equals(PeerConnection.IceConnectionState.CONNECTED)) {
|
||||||
EventBus.getDefault().post(new PeerConnectionEvent(PeerConnectionEvent.PeerConnectionEventType
|
/*EventBus.getDefault().post(new PeerConnectionEvent(PeerConnectionEvent.PeerConnectionEventType
|
||||||
.PEER_CONNECTED, sessionId, null, null));
|
.PEER_CONNECTED, sessionId, null, null));*/
|
||||||
|
EventBus.getDefault().post(new MediaStreamEvent(remoteMediaStream, sessionId));
|
||||||
|
|
||||||
if (hasInitiated) {
|
if (hasInitiated) {
|
||||||
sendInitialMediaStatus();
|
sendInitialMediaStatus();
|
||||||
}
|
}
|
||||||
@ -288,7 +291,7 @@ public class MagicPeerConnectionWrapper {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onAddStream(MediaStream mediaStream) {
|
public void onAddStream(MediaStream mediaStream) {
|
||||||
EventBus.getDefault().post(new MediaStreamEvent(mediaStream, sessionId));
|
remoteMediaStream = mediaStream;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user