I created a site where I can upload sound files. Because of licence restrictions I want to focus on ogg files (for music).
Now I created a gridview that displays all my records of the table "sounds" in the database.
I am looking for a possibility to play this songs e. g. by selecting a checkbox in the gridview and click a new play button. Actually I just look for a possibility to play music out of the database. I would prefer to use e. g. the HTML 5 audio control or
something similar. I dont want to use flash or anything else which requires plugins for the browser... How can I achieve this?
Perhaps you could have a try NAudio, NAudio is an open source .NET audio and MIDI library, containing dozens of useful audio related classes intended to speed development of audio related utilities in .NET.
You could learn more information about NAudio
here.
I figured it out.
I created a handler in the same way like for images. It is imported to transfer the content type correctly and everything works fine. By clicking the select link I can change the src url of the audio tag (event of grid view).
Thank you anyway for your help.
regards,
Stefan
Marked as answer by Angie xu - MSFT on Dec 21, 2012 12:17 AM
_Stefan_
0 Points
15 Posts
Play music ogg file from Database
Dec 17, 2012 03:10 PM|LINK
Hey,
I created a site where I can upload sound files. Because of licence restrictions I want to focus on ogg files (for music).
Now I created a gridview that displays all my records of the table "sounds" in the database.
I am looking for a possibility to play this songs e. g. by selecting a checkbox in the gridview and click a new play button. Actually I just look for a possibility to play music out of the database. I would prefer to use e. g. the HTML 5 audio control or something similar. I dont want to use flash or anything else which requires plugins for the browser... How can I achieve this?
regards,
Stefan
Angie xu - M...
All-Star
20275 Points
1725 Posts
Microsoft
Re: Play music ogg file from Database
Dec 19, 2012 06:05 AM|LINK
Hi
Perhaps you could have a try NAudio, NAudio is an open source .NET audio and MIDI library, containing dozens of useful audio related classes intended to speed development of audio related utilities in .NET.
You could learn more information about NAudio here.
I think this is also available when you want to play OGG files (http://www.afterdawn.com/guides/archive/how_to_play_ogg_files.cfm).
hope it helps you,
Kind regards
Feedback to us
Develop and promote your apps in Windows Store
_Stefan_
0 Points
15 Posts
Re: Play music ogg file from Database
Dec 20, 2012 11:17 AM|LINK
Hey,
I figured it out.
I created a handler in the same way like for images. It is imported to transfer the content type correctly and everything works fine. By clicking the select link I can change the src url of the audio tag (event of grid view).
Thank you anyway for your help.
regards,
Stefan