private void Live2WebSocket_RecieveCurrentStream(Live2CurrentStreamEventArgs e) { Debug.WriteLine(e.Uri); _UIScheduler.Schedule(async() => { _HLSUri = e.Uri; // Note: Hohoemaでは画質の自動設定 abr は扱いません Qualities = e.QualityTypes.Where(x => x != "abr").ToArray(); RaisePropertyChanged(nameof(Qualities)); CurrentQuality = e.Quality; Debug.WriteLine(e.Quality); if (_IsFirstRecieveCurrentStream) { _IsFirstRecieveCurrentStream = false; OpenLive?.Invoke(this); } await RefreshLeoPlayer(); }); }
private async void Live2WebSocket_RecieveCurrentStream(Live2CurrentStreamEventArgs e) { Debug.WriteLine(e.Uri); await HohoemaApp.UIDispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, async() => { _HLSUri = e.Uri; // Note: Hohoemaでは画質の自動設定 abr は扱いません Qualities = e.QualityTypes.Where(x => x != "abr").ToArray(); RaisePropertyChanged(nameof(Qualities)); CurrentQuality = e.Quality; Debug.WriteLine(e.Quality); if (_IsFirstRecieveCurrentStream) { _IsFirstRecieveCurrentStream = false; OpenLive?.Invoke(this); } else { await RefreshLeoPlayer(); } }); }
private async void _RtmpClient_Started(NicovideoRtmpClientStartedEventArgs args) { await HohoemaApp.UIDispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () => { if (_MediaSource == null) { VideoStreamSource = args.MediaStreamSource; _MediaSource = MediaSource.CreateFromMediaStreamSource(args.MediaStreamSource); MediaPlayer.Source = _MediaSource; Debug.WriteLine("recieve start live stream: " + LiveId); OpenLive?.Invoke(this); } }); }