Build online audio library with ASP.Net + SQL Server - c#

I need some advice on what is the best practice to build an online audio library with ASP.Net + C# + MSSQL. Some key requirements are as follows:
The audio files are stored in database in binary type
On the web UI, user can click on an audio icon to play the audio. The audio will be very short, a few secs max, so there is no need to provide controls except and "play" button.
For playing audio, I don't want to launch a media player explicitly. I just want user to click and s/he will hear the sound.
In addition, I want to stream the audio and I don't want user to be able to download the audio file.
Can anyone shed some light on how to implement this, in particular the playing audio part?

I would use the jQuery Media Plugin. It's freakin awesome!
I would then create an .ashx handler for playing the audio files, and pass those to the media plugin in jQuery.
You can follow this Code Project article, it shows you how to do just about everything you need, except they upload videos. You can easily tweak the code to allow JUST audio though.
It sounds like a very fun project, good luck!

Related

How to stream multimedia files using C# and ASP.NET in P2P manner?

so what I want to do is build up a custom web player that should have the facility to allow any user to select a file from his local hard disk and the play that, so that some other person can view it in real time, just like doing a video chat, but instead of a webcam, there would be a video clip that is being streamed.
so far, what I've come across is Microsoft's SmoothStreaming Framework, but it did not help much. Please help.
Regards.
See following posts, hopefully it might be helpful.
Streaming with Windows Media Services and ASP.NET
Microsoft Media Platform: Player Framework

How to Create a Simple C# Audio/Voice recorder in Visual Studio [duplicate]

I just want to implement audio recording tool in our application.The functionality is as follows.
Record an audio through microphone(voice recording)
stop that audio
saving that audio
generate embed code for the same audio
I appreciate your suggessions to implement this.
thanks very much
ASP.NET on its own is not suited for this kind of application. If you want users to be able to record audio on your website, you could take a look at Silverlight 4.0 (vid).
See also this question:
Recording Audio From Web Page
If that's not what you need, please explain your intended purpose more clearly.
This should be done in flash or silverlight. This has not a lot to do with c#.
See http://activeden.net/item/sound-recorder/104191

Making a video player training software

I am currently making a software that can be used to playback training packages. The features I want to add are:
Ability to read the time of videos
Ability to play and pause videos of various codecs (as bundled in Klite Codec Pack)
Ability to create a custom playlist file and continue from the last stop/pause of the playlist when opened
Generate a report of how the playlist was completed
I know very well how I am going to handle the last two parts but I need help on the first two. The current one simply has to launch the files using an external player on the system, and monitor the launched process for exit... but this is not quite what I want.
If WPF is an option you can use the <MediaElement/> for hosting the video in an application. Specifically you can use the Position property for getting and setting the current time.
As the <MediaElement/> is a wrapper for Windows Media Player, all videos playable in WMP should be playable in the <MediaElement/> (after you installed necessary codecs).
You can use VLC with the .Net Interface to VLC. It supports lots of codecs out of the box and seems to be really easy to use.

How to play a audio sound in a web page as a background music

I want to play an audio file whenever my page gets loaded onto the client browser. And if a user presses a pause button on the web page then the sound gets paused until he leaves the sound and can resume as well. ?
Here's some examples. But as some said before, its not the best idea to have sound. But if yo do at least have a toggle to mute, turn the volume down or disable it totally.
The easy musicplayer for flash is a easy-to-set up MP3 player solution that does what you need. It provides "play" and "pause" buttons.
Until HTML 5, flash is going to be your best solution, this is mostly because it's an intrusion to have a page commandeer control of the user's speakers, and thus why people have recommended not doing this at all or making it so that the user must explicitly click something.
Here's a page with some freebie flash player options:
http://www.premiumbeat.com/flash_resources/free_flash_music_player/
I found this web site helpful for setting up a sound file from within a page. In my case, I only wanted it to play if they clicked something. I would agree with others here who suggested that.
This web site
http://www.phon.ucl.ac.uk/home/mark/audio/play.htm
One problem I have is when I have a number of web pages open and one of them starts making a sound, it is very difficult to find the page to get it to shut up. It is better to have the user launch the sound.
I guess achieving the same with jquery plugins won't be less exciting!
The jquery mediaplayer does the same. Using this jquery plugin, you can play your media player files without the need of windows media player. The limitation is that this works only with the media player type of files.
Further, since mp3 files are highly used in web pages, we could use the bssound jquery plugin to embed mp3 file in our web page.

ASP.NET video and audio handler

I am using ASP.NET's "handler" to show images in an application. I need to play files of audio and video like I do with the image: I recover it from database and show it on an aspx page. Can I create a "handler" for the video and the audio? I don't want that a dialog box is opened asking to the user if he wants to play or save the video file.
I want to play it like YouTube does.
Maybe I can use silverlight for that.
Thank you!
It consists of two parts.
A handler or something that streams the video under the hood.
A client (can be implemented in Silverlight or Flash) that's on an standard HTML page that fetches the video from the handler and displays it.
It's certainly possible to write a handler that pulls video/audio content out of a database and streams it to the client. That would work much the same was as your existing image one.
The way to stop the dialog is to present your video within a video viewing control on the web page. For example, a silverlight control with a MediaElement in it.
Check out this guide to writing a silverlight media player: http://www.learn-silverlight-tutorial.com/StreamingMediaUsingSilverlight.cfm
This won't necessarily be the most performant way of serving video content, if you want lots of performance, look into buying commercial media streaming solution that can be integrated with your site.

Categories