Click here to Skip to main content
15,887,485 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Am using MediaElement in my program.

XML
<MediaElement MediaEnded="MediaEnded" MediaOpened="MediaOpened" LoadedBehavior="Manual" Visibility="Hidden"   Height="230" HorizontalAlignment="Right" Margin="0,0,13,82" Name="MediaPlayer" VerticalAlignment="Bottom" Width="457" Opacity="1" AllowDrop="True" Stretch="Uniform" IsMuted="False" />


And in the back end am assigning the media uri to this MediaElement as like the following.
C#
MediaPlayer.Source =new Uri(@"L:\Melody Hits\1. 03 - Teri Yaadon Mein.mp3",UriKind.Relative); // it does not playing
// no error or exception is throwing


If i give like the following:

C#
MediaPlayer.Source =new Uri(@"L:\Melody Hits\TERE_BIN.mp3",UriKind.Relative);
then it works great.

I had identified that the problem is with the name of the file which i am giving, if the file name contains any special characters then it doesn't work. how can i solve this problem
Posted
Updated 11-Mar-15 0:02am
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900