wpf - setting URL as mediaElement source -


i keep getting "object reference not set instance of object" , have absolutely no idea why!

mediaelement1.source = new uri(trackstream(0), urikind.absolute) 

if mouseover check seems fine, variable position contains direct link mp3, says if mouseover source has been set url error.

i trying set url first in list have downloaded textfile previously, put array. have tried changing urlkind , omitting it.

this works:

 public mainwindow()     {         string[] trackstream = new string[] { @"c:\users\public\music\sample music\sound.wma" };          initializecomponent();         media.source = new uri(trackstream[0], urikind.absolute);      } 

Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -