Answered by:
Metro App That Plays Music

Question
-
Hi,
I am sort of new to coding and I am trying to make a metro app that plays music (for no reason). I know that you can play music using:
<audio msaudiocategory="BackgroundCapableMedia" controls="controls">
<source src="... />
</audio>But I also want to also display the information about (e.g. length, name, artist, etc.) I found on a post how to do that: http://social.msdn.microsoft.com/Forums/vstudio/en-US/0aa2f0a9-942c-44cf-9df6-f8aefa10ab1f/how-to-read-metadata-information-of-music-file-in-windows-8-metro-style-app?forum=winappswithcsharp. So I tried to do that but because I am a new to coding I got errors. I know that I need to put that code in a .js file (I'm not that dumb), but I want to know if I can somehow use that code (add to it), so that it finds all the music in the Music folder and then displays all of the information for all of the files it found on an html page. I'm not sure if I said so, but I want the <audio msaudio... to
That probably didn't make sense, so, in short, I pretty much want to find a way to make program like the Xbox Music App (in terms of finding all the songs in my Music folder and then displaying a playing symbol and information for each song).
Sorry in advance if you read my question as to me it sounds pretty hard to know what I'm asking.
Thanks.
- Moved by Matt SmallMicrosoft employee, Moderator Monday, July 14, 2014 12:51 PM JS app
Monday, July 14, 2014 6:37 AM
Answers
-
I think this sample will help: http://code.msdn.microsoft.com/windowsapps/Media-playback-start-to-3a858ab6
The code about getting music metadata from your post is exactly what you would do in the javascript version. If you can, please post your code and explain where you're getting the errors.
Matt Small - Microsoft Escalation Engineer - Forum Moderator
If my reply answers your question, please mark this post as answered.
NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.- Marked as answer by deguppy Tuesday, July 15, 2014 10:12 AM
Monday, July 14, 2014 1:00 PMModerator
All replies
-
I think this sample will help: http://code.msdn.microsoft.com/windowsapps/Media-playback-start-to-3a858ab6
The code about getting music metadata from your post is exactly what you would do in the javascript version. If you can, please post your code and explain where you're getting the errors.
Matt Small - Microsoft Escalation Engineer - Forum Moderator
If my reply answers your question, please mark this post as answered.
NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.- Marked as answer by deguppy Tuesday, July 15, 2014 10:12 AM
Monday, July 14, 2014 1:00 PMModerator -
Thanks,
That thread pretty much answered my questions.
Thanks again.
Tuesday, July 15, 2014 10:12 AM