Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9243131
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T08:44:30+00:00 2026-06-18T08:44:30+00:00

I have incorporated ActiveX VLC pligin to WPF application . And VLC Plugin is

  • 0

I have incorporated ActiveX VLC pligin to WPF application. And VLC Plugin is working fine.

AxVLCPlugin   vlc = new AxVLCPlugin();
vlc.MediaPlayerEncounteredError += vlc_MediaPlayerEncounteredError;
vlc.MediaPlayerOpening += vlc_MediaPlayerOpening;
vlc.MediaPlayerBuffering += vlc_MediaPlayerBuffering;
vlc.MediaPlayerEndReached += vlc_MediaPlayerEndReached;
 //
// Other code 
// like    windowsFormsHost1.Child = vlc; and etc
vlc.addTarget(videoURL, null, AXVLC.VLCPlaylistMode.VLCPlayListReplace, 1);
vlc.play();

But some how all events of VLC are not working at all.

I mean these events:

vlc.MediaPlayerEncounteredError += vlc_MediaPlayerEncounteredError;
vlc.MediaPlayerOpening += vlc_MediaPlayerOpening;
vlc.MediaPlayerBuffering += vlc_MediaPlayerBuffering;
vlc.MediaPlayerEndReached += vlc_MediaPlayerEndReached;

 void vlc_MediaPlayerEndReached(object sender, EventArgs e)
        {
            Debug.WriteLine("[P] - StreamingVideo -  END REACHED + " + DateTime.Now);
        }

        void vlc_MediaPlayerBuffering(object sender, DVLCEvents_MediaPlayerBufferingEvent e)
        {
            Debug.WriteLine("[P] - StreamingVideo -  BUFFERING + " + DateTime.Now);
        }

        void vlc_MediaPlayerOpening(object sender, EventArgs e)
        {
            Debug.WriteLine("[P] - StreamingVideo -  OPENING + " + DateTime.Now);
        }

        void vlc_MediaPlayerEncounteredError(object sender, EventArgs e)
        {
            Debug.WriteLine("[P] - StreamingVideo -  ERROR + " + DateTime.Now);
        }

They are not firing. (Sure, I put breakpoints in those methods.)

What I really need is catch the streaming errors and re-apply videoURL another time. So I am experimenting with events to see which of them I can use to reach that goal.

Any clue why is it?

P.S. This link doesn’t help also VLC player event catch

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T08:44:31+00:00Added an answer on June 18, 2026 at 8:44 am

    I don’t think you are doing anything wrong. It seems; those events are not implemented (or unimplemented) for some reason (even in the latest version of the activeX). I’ve read that those events are either too buggy or not firing at all in some browser plugin versions too.

    However, it still has 3 useful and working events you can count on.
    Events Firing: playEvent, pauseEvent and stopEvent
    Events Not Firing: all events starting with MediaPlayer…

    Anyway, code below works with the events I mentioned:

        AxVLCPlugin vlc;
        public MainWindow()
        {
            InitializeComponent();
    
            vlc = new AxVLCPlugin();
            windowsFormsHost1.Child = vlc;
    
            vlc.pauseEvent += new EventHandler(vlc_pauseEvent);
            vlc.playEvent += new EventHandler(vlc_playEvent);
            vlc.stopEvent += new EventHandler(vlc_stopEvent);
        }
    
        void vlc_playEvent(object sender, EventArgs e)
        {
            Debug.WriteLine("playEvent fired!");
        }
    
        void vlc_pauseEvent(object sender, EventArgs e)
        {
            Debug.WriteLine("pauseEvent fired!");
        }
    
        void vlc_stopEvent(object sender, EventArgs e)
        {
            Debug.WriteLine("stopEvent fired!");
        }
    
        private void button1_Click(object sender, RoutedEventArgs e)
        {
            OpenFileDialog ofd = new OpenFileDialog();
            ofd.ShowDialog();
            if (ofd.FileName != "")
            {
                Debug.WriteLine(ofd.FileName);
                vlc.addTarget("file:///" + ofd.FileName, null, AXVLC.VLCPlaylistMode.VLCPlayListReplaceAndGo, 0);
                vlc.play();
            }
        }
    

    Still, these events will not inform you about any streaming errors. IMO, only thing you can do is; try-catch where you execute vlc.addTarget(...) and vlc.play(). Check whether the URL is valid beforehand (also don’t forget to include "file:///" infront of the file path with the recent versions of the plugin). And re-apply the videoURL (as you like) only if the caught error is not about non-existing file or invalid path, etc.

    OR you could try some other wrappers/custom libs:

    • VLC DotNet for WinForm & WPF
    • More at this page
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a medium size stylesheet. I've incorporated less, and everything downloads fine. However,
I have incorporated a new theme in Magento v1.4.2.0, and have completed all the
I am using the Business Silverlight application. I have incorporated some MVVM into this
I have incorporated jCarouselLite with my already working site, however the PREV and NEXT
I all, i have a spring application working with role based security. Application is
I am a web application developer using Coldfusion 9. I have incorporated the use
I have incorporated iAds into a new version of my iOS program. Everything seems
I'm still working on my multi-stage form (http://jsfiddle.net/xSkgH/93/) and have incorporated the following solution
I am developing a file storage application, and we have incorporated the FileStream type
I am using Fred LeBlancs roundabout plugin and I have incorporated a lightbox to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.