/** * 本地媒体变化时,改变推送方式 */ private void _localChanged(ILocalMediaSource source, bool enabled) { foreach (var remote in this.remotes.Values) { remote.localChanged(); } }
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); } }
/** * 获得播放流 */ private void _mediaChanged(ILocalMediaSource source, bool enabled) { this.Changed?.Invoke(source, enabled); }