public void OnStreamDropped(Session p0, Com.Opentok.Android.Stream p1) { if (this._subscriber != null) { UnsubscribeFromStream(p1); } }
public void OnStreamDestroyed(PublisherKit p0, Com.Opentok.Android.Stream p1) { if ((this._subscriber != null)) { UnsubscribeFromStream(p1); } }
private void SubscribeToStream(Com.Opentok.Android.Stream stream) { this._subscriber = new Subscriber(this, stream); this._subscriber.SetVideoListener(this); this._session.Subscribe(_subscriber); // start loading spinning this._loadingSub.Visibility = ViewStates.Visible; }
public void OnStreamReceived(Session p0, Com.Opentok.Android.Stream p1) { this._streams.Add(p1); if (this._subscriber == null) { SubscribeToStream(p1); } }
public void OnStreamCreated(PublisherKit p0, Com.Opentok.Android.Stream p1) { this._streams.Add(p1); //if (this._subscriber == null) //{ // SubscribeToStream(p1); //} }
private void UnsubscribeFromStream(Com.Opentok.Android.Stream stream) { this._streams.Remove(stream); if (this._subscriber.Stream.StreamId.Equals(stream.StreamId)) { this._subscriberViewContainer.RemoveView(this._subscriber.View); this._subscriber = null; if (this._streams.Count != 0) { SubscribeToStream(this._streams[0]); } } }