I am new to this. I am trying to do a Audio Message Player on Rasp Pi 3 with Win IoT core. I manage to play audio file from my USB thumbdrive but I need to know when the audio file has completed playing.
mediaPlayer = new MediaPlayer();
mediaPlayer.MediaEnded += MediaPlayer_MediaEnded;
private void MediaPlayer_MediaEnded(MediaPlayer sender, object args)
{
GeneralMessage.Text = "Message Complete!";
}
i get an error message with the above code.
System.Exception occurred
HResult=0x8001010E
Message=The application called an interface that was marshalled for a
different thread. (Exception from HRESULT: 0x8001010E (RPC_E_WRONG_THREAD))
Please help.
i manage to solve the invoke thingy.. code as follow