private void VlcControl1_Playing(object sender, Vlc.DotNet.Core.VlcMediaPlayerPlayingEventArgs e) { this.InvokeIfRequired(() => { }); EnableButtons(); }
private void MediaPlayer_Playing(object sender, Vlc.DotNet.Core.VlcMediaPlayerPlayingEventArgs e) { //Start Visibility Delay showTimer.Stop(); showTimer.Start(); //Console.WriteLine("Playing"); }
private void MediaPlayer_Playing(object sender, Vlc.DotNet.Core.VlcMediaPlayerPlayingEventArgs e) { doform(() => toolStripStatusLabel1.Text = "播放中"); var m = mediaPlayer.GetMedia(); string desc = m.Title; doform(() => toolStripStatusLabel2.Text = desc); }
private void SetProgresMax(object sender, Vlc.DotNet.Core.VlcMediaPlayerPlayingEventArgs e) { Invoke(new Action(() => { mediaTrack.Value = mediaTrack.Minimum; var vlc = (VlcControl)sender; mediaTrack.Maximum = (int)vlc.Length / 1000; a = (int)vlc.Length / 1000; // Length (s) c = a / 60; // Length (m) a = a % 60; // Length (s) timeLbl.Text = 0 + "/" + c + ":" + a; })); }
private void MediaPlayer_Playing(object sender, Vlc.DotNet.Core.VlcMediaPlayerPlayingEventArgs e) { if (!isSame) { _viewModel.CurrentPos = VlcPlayer.SourceProvider.MediaPlayer.GetMedia() + ""; _viewModel.PlayTime = (long)VlcPlayer.SourceProvider.MediaPlayer.GetMedia().Duration.TotalSeconds; _viewModel.MaxPos = TransTimeSecondIntToString((long)VlcPlayer.SourceProvider.MediaPlayer.GetMedia().Duration.TotalSeconds); _viewModel.MinPos = "00:00:00"; //// _viewModel.VideoTitle = VlcPlayer.SourceProvider.MediaPlayer.GetMedia().Title; //Thread thGetPos = new Thread(GetPos); //thGetPos.IsBackground = true; //thGetPos.Start(); } }
private void Media_Playing(object sender, Vlc.DotNet.Core.VlcMediaPlayerPlayingEventArgs e) { if (closeOnStop) { return; } try { Invoke((MethodInvoker) delegate { btnPlay.Text = "Pause"; btnPlay.ImageIndex = 1; }); } catch { } }
private void OnVlcPlaying(object sender, Vlc.DotNet.Core.VlcMediaPlayerPlayingEventArgs e) { VlcControl vlc = (VlcControl)sender; vlc.UseWaitCursor = false; vlcOverlay[vlc.TabIndex].HideNotification(); var mediaInformations = vlc.GetCurrentMedia().TracksInformations; foreach (var mediaInformation in mediaInformations) { if (mediaInformation.Type == Vlc.DotNet.Core.Interops.Signatures.MediaTrackTypes.Audio) { log.Debug(string.Format("{0} Audio info - Codec: {1}, Channels: {2}, Rate: {3}", vlc.Name, mediaInformation.CodecName, mediaInformation.Audio.Channels, mediaInformation.Audio.Rate)); vlcOverlay[vlc.TabIndex].ShowNotification("Audio stream active", 5000); vlcOverlay[vlc.TabIndex].ShowMuteButton(true); } else if (mediaInformation.Type == Vlc.DotNet.Core.Interops.Signatures.MediaTrackTypes.Video) { log.Debug(string.Format("{0} Video info - Codec: {1}, Height: {2}, Width: {3}", vlc.Name, mediaInformation.CodecName, mediaInformation.Video.Height, mediaInformation.Video.Width)); } } }
private void OnVlcPlaying(object sender, Vlc.DotNet.Core.VlcMediaPlayerPlayingEventArgs e) { #if !NET20 myLblState.InvokeIfRequired(l => l.Text = "Playing"); myLblAudioCodec.InvokeIfRequired(l => l.Text = "Codec: "); myLblAudioChannels.InvokeIfRequired(l => l.Text = "Channels: "); myLblAudioRate.InvokeIfRequired(l => l.Text = "Rate: "); myLblVideoCodec.InvokeIfRequired(l => l.Text = "Codec: "); myLblVideoHeight.InvokeIfRequired(l => l.Text = "Height: "); myLblVideoWidth.InvokeIfRequired(l => l.Text = "Width: "); var mediaInformations = myVlcControl.GetCurrentMedia().TracksInformations; foreach (var mediaInformation in mediaInformations) { if (mediaInformation.Type == Vlc.DotNet.Core.Interops.Signatures.MediaTrackTypes.Audio) { myLblAudioCodec.InvokeIfRequired(l => l.Text += mediaInformation.CodecName); myLblAudioChannels.InvokeIfRequired(l => l.Text += mediaInformation.Audio.Channels); myLblAudioRate.InvokeIfRequired(l => l.Text += mediaInformation.Audio.Rate); } else if (mediaInformation.Type == Vlc.DotNet.Core.Interops.Signatures.MediaTrackTypes.Video) { myLblVideoCodec.InvokeIfRequired(l => l.Text += mediaInformation.CodecName); myLblVideoHeight.InvokeIfRequired(l => l.Text += mediaInformation.Video.Height); myLblVideoWidth.InvokeIfRequired(l => l.Text += mediaInformation.Video.Width); } } myCbxAspectRatio.InvokeIfRequired(c => { if (myVlcControl.Video.AspectRatio != null) { c.Text = myVlcControl.Video.AspectRatio; } c.Enabled = true; }); #else ControlExtensions.InvokeIfRequired(myLblState, c => c.Text = "Playing"); ControlExtensions.InvokeIfRequired(myLblAudioCodec, c => c.Text = "Codec: "); ControlExtensions.InvokeIfRequired(myLblAudioChannels, c => c.Text = "Channels: "); ControlExtensions.InvokeIfRequired(myLblAudioRate, c => c.Text = "Rate: "); ControlExtensions.InvokeIfRequired(myLblVideoCodec, c => c.Text = "Codec: "); ControlExtensions.InvokeIfRequired(myLblVideoHeight, c => c.Text = "Height: "); ControlExtensions.InvokeIfRequired(myLblVideoWidth, c => c.Text = "Width: "); var mediaInformations = myVlcControl.GetCurrentMedia().TracksInformations; foreach (var mediaInformation in mediaInformations) { if (mediaInformation.Type == Core.Interops.Signatures.MediaTrackTypes.Audio) { ControlExtensions.InvokeIfRequired(myLblAudioCodec, c => c.Text += mediaInformation.CodecName); ControlExtensions.InvokeIfRequired(myLblAudioChannels, c => c.Text += mediaInformation.Audio.Channels); ControlExtensions.InvokeIfRequired(myLblAudioRate, c => c.Text += mediaInformation.Audio.Rate); } else if (mediaInformation.Type == Core.Interops.Signatures.MediaTrackTypes.Video) { ControlExtensions.InvokeIfRequired(myLblVideoCodec, c => c.Text += mediaInformation.CodecName); ControlExtensions.InvokeIfRequired(myLblVideoHeight, c => c.Text += mediaInformation.Video.Height); ControlExtensions.InvokeIfRequired(myLblVideoWidth, c => c.Text += mediaInformation.Video.Width); } } ControlExtensions.InvokeIfRequired(myCbxAspectRatio, c => { c.Text = myVlcControl.Video.AspectRatio; c.Enabled = true; }); #endif }
private void VlcControl_Playing(object sender, Vlc.DotNet.Core.VlcMediaPlayerPlayingEventArgs e) { BeginInvoke((MethodInvoker) delegate() { this.Btn_Play.Text = "Pause"; }); }
private void VlcPlayer_Playing(object sender, Vlc.DotNet.Core.VlcMediaPlayerPlayingEventArgs e) { var time = VlcPlayer.Length / 1000; }
private void Control_Playing(object sender, Vlc.DotNet.Core.VlcMediaPlayerPlayingEventArgs e) { Status = MEDIA_STATUS.PLAYING; }