예제 #1
0
 /**
  * 本地媒体变化时,改变推送方式
  */
 private void _localChanged(ILocalMediaSource source, bool enabled)
 {
     foreach (var remote in this.remotes.Values)
     {
         remote.localChanged();
     }
 }
예제 #2
0
 public LocalMedia(ILocalMediaSource video, ILocalMediaSource audio)
 {
     if (video != null)
     {
         this.video          = video;
         this.all["video"]   = this.video;
         this.video.Changed += enabled => this._mediaChanged(this.video, enabled);
     }
     if (audio != null)
     {
         this.audio          = audio;
         this.all["audio"]   = this.audio;
         this.audio.Changed += enabled => this._mediaChanged(this.audio, enabled);
     }
 }
예제 #3
0
 /**
  * 获得播放流
  */
 private void _mediaChanged(ILocalMediaSource source, bool enabled)
 {
     this.Changed?.Invoke(source, enabled);
 }