private static void StopPlayingCV(ICapabilityViewer cv) { try { cv.StopPlaying(); } catch (ThreadAbortException) {} catch (Exception e) { eventLog.WriteEntry("CapabilityViewer: " + cv.ToString() + "; " + e.ToString(), EventLogEntryType.Error, 18); } }
private static void AddCapabilityViewer(ICapabilityViewer iCV) { // Update collections if(!capabilities.Contains(iCV.ID)) { capabilities.Add(iCV.ID, iCV); } capabilityViewers.Add(iCV.ID, iCV); if (iCV.Owner != null) { iCV.Owner.AddCapabilityViewer(iCV); } // Call RaiseCapabilityAdded before calling Play RaiseCapabilityAdded(iCV); // If (it's a remote stream, && we want to play remote streams, && this stream is ok to play if remote // -OR- it's a local stream, && we want to play local streams, && this stream is ok to play if local (not audio, for instance) // -OR- it's not an AV-stream // ... Play it. if ( (autoPlayRemote && iCV.AutoPlayRemote && iCV.Owner != LocalParticipant) || (autoPlayLocal && iCV.AutoPlayLocal && iCV.Owner == LocalParticipant) || (iCV.PayloadType != PayloadType.dynamicAudio && iCV.PayloadType != PayloadType.dynamicVideo) ) { iCV.Play(); } }
private static void PlayCV(ICapabilityViewer cv) { try { cv.Play(); } catch (ThreadAbortException) {} catch (Exception e) { eventLog.WriteEntry(string.Format(CultureInfo.CurrentCulture, Strings.CapabilityViewer, cv.ToString(), e.ToString()), EventLogEntryType.Error, 18); } }