Example #1
0
 public void OnStreamDropped(Session p0, Com.Opentok.Android.Stream p1)
 {
     if (this._subscriber != null)
     {
         UnsubscribeFromStream(p1);
     }
 }
Example #2
0
 public void OnStreamDestroyed(PublisherKit p0, Com.Opentok.Android.Stream p1)
 {
     if ((this._subscriber != null))
     {
         UnsubscribeFromStream(p1);
     }
 }
Example #3
0
 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;
 }
Example #4
0
 public void OnStreamReceived(Session p0, Com.Opentok.Android.Stream p1)
 {
     this._streams.Add(p1);
     if (this._subscriber == null)
     {
         SubscribeToStream(p1);
     }
 }
Example #5
0
 public void OnStreamCreated(PublisherKit p0, Com.Opentok.Android.Stream p1)
 {
     this._streams.Add(p1);
     //if (this._subscriber == null)
     //{
     //    SubscribeToStream(p1);
     //}
 }
Example #6
0
 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]);
         }
     }
 }