kakone / VLC.MediaElement

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

MediaOpened event fails every time. #65

Closed JunielKatarn closed 6 years ago

JunielKatarn commented 6 years ago

(See https://github.com/JunielKatarn/TestVlc/blob/master/TestVlc/MainPage.xaml#L20 and https://github.com/JunielKatarn/TestVlc/blob/master/TestVlc/MainPage.xaml.cs#L43).

No matter if I define the event programmatically or in XAML. Moreover, the sample app I point has an empty method wired to the event. Setting the OnMediaOpened event always throws an exception with the following message:

The application called an interface that was marshalled for a different thread. (Exception from HRESULT: 0x8001010E (RPC_E_WRONG_THREAD))

Note, this has nothing to do with the media being played, or its source (local or remote). Is there a correct way to track/notify when the media has been opened?