Ejemplo n.º 1
0
 public void StartLocalMedia(MainPage videoWindow, Action <Exception> callback)
 {
     if (localMedia == null)
     {
         localMedia = new LocalMedia();
         localMedia.Start(videoWindow, callback);
     }
     else
     {
         callback(new Exception(string.Format("Error starting local media. {0}", localMedia.LastStartException.Message)));
     }
 }
Ejemplo n.º 2
0
 public void StopLocalMedia(Action<string> callback)
 {
     LocalMedia.Stop(callback);
     LocalMedia = null;
 }
Ejemplo n.º 3
0
 public void StartLocalMedia(VideoChat videoChat, Action<string> callback)
 {
     LocalMedia = new LocalMedia();
     LocalMedia.Start(videoChat, callback);
 }
		public ConferenceWrapper(string sessionId, 
		                         LocalMedia localMedia)
		{
			this.LocalMedia = localMedia;
			InitAudioAndVideoStreams();

			// Create a conference using our stream descriptions.
			conference = new FM.IceLink.Conference(this.IceServers, new Stream[] { audioStream, videoStream });

			// Use our pre-generated DTLS certificate.
			conference.DtlsCertificate = Certificate;

			// Supply TURN relay credentials in case we are behind a
			// highly restrictive firewall. These credentials will be
			// verified by the TURN server.
			conference.RelayUsername = "******";
			conference.RelayPassword = "******";
			conference.ServerPort = 3478;

			// Add a few event handlers to the conference so we can see
			// when a new P2P link is created or changes state.
			conference.OnLinkInit += LogLinkInit;
			conference.OnLinkUp += LogLinkUp;
			conference.OnLinkDown += LogLinkDown;

			conference.OnLinkOfferAnswer += OnLinkSendOfferAnswer;
			conference.OnLinkCandidate += OnLinkSendCandidate;
			conference.Timeout = ConferenceTimeout;

#if __ANDROID__
			// Start echo canceller.
			OpusEchoCanceller = new OpusEchoCanceller(OpusClockRate, OpusChannels);
			OpusEchoCanceller.Start();
#endif

			this.sessionId = sessionId;
		}
Ejemplo n.º 5
0
 public void StopLocalMedia(Action <string> callback)
 {
     LocalMedia.Stop(callback);
     LocalMedia = null;
 }
Ejemplo n.º 6
0
 public void StartLocalMedia(VideoChat videoChat, Action <string> callback)
 {
     LocalMedia = new LocalMedia();
     LocalMedia.Start(videoChat, callback);
 }
Ejemplo n.º 7
0
 public void StartLocalMedia(MainPage videoWindow, Action<Exception> callback)
 {
     if (localMedia == null)
     {
         localMedia = new LocalMedia();
         localMedia.Start(videoWindow, callback);
     }
     else
     {
         callback(new Exception(string.Format("Error starting local media. {0}", localMedia.LastStartException.Message)));
     }
 }