kakone / VLC.MediaElement

MediaElement clone powered by VLC
GNU Lesser General Public License v2.1
68 stars 33 forks source link

logging event is does not work #75

Open vnikopol opened 6 years ago

vnikopol commented 6 years ago

If i use Logging event, I get an error "The application called an interface that was marshalled for a different thread". I looked at the code, and

private void OnLog(LogLevel level, string message) ... Logging?.Invoke( .... perhaps need to use Dispatcher.RunAsync(()

v01d21 commented 6 years ago

Hi vnikopol, you are right, please try this. Dispatcher.RunAsync(DispatcherPriority.Normal, () => OnLog(LogLevel.Debug, "It works!"));

I hope it would be useful to you.